tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getCamRoles
Start a Neo task
Explain and create a tencentcloud.getCamRoles resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query detailed information of CAM roles
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
// query by role_id
const foo = tencentcloud.getCamRoles({
roleId: fooTencentcloudCamRole.id,
});
// query by name
const bar = tencentcloud.getCamRoles({
name: "cam-role-test",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
# query by role_id
foo = tencentcloud.get_cam_roles(role_id=foo_tencentcloud_cam_role["id"])
# query by name
bar = tencentcloud.get_cam_roles(name="cam-role-test")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// query by role_id
_, err := tencentcloud.GetCamRoles(ctx, &tencentcloud.GetCamRolesArgs{
RoleId: pulumi.StringRef(fooTencentcloudCamRole.Id),
}, nil)
if err != nil {
return err
}
// query by name
_, err = tencentcloud.GetCamRoles(ctx, &tencentcloud.GetCamRolesArgs{
Name: pulumi.StringRef("cam-role-test"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
// query by role_id
var foo = Tencentcloud.GetCamRoles.Invoke(new()
{
RoleId = fooTencentcloudCamRole.Id,
});
// query by name
var bar = Tencentcloud.GetCamRoles.Invoke(new()
{
Name = "cam-role-test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetCamRolesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// query by role_id
final var foo = TencentcloudFunctions.getCamRoles(GetCamRolesArgs.builder()
.roleId(fooTencentcloudCamRole.id())
.build());
// query by name
final var bar = TencentcloudFunctions.getCamRoles(GetCamRolesArgs.builder()
.name("cam-role-test")
.build());
}
}
variables:
# query by role_id
foo:
fn::invoke:
function: tencentcloud:getCamRoles
arguments:
roleId: ${fooTencentcloudCamRole.id}
# query by name
bar:
fn::invoke:
function: tencentcloud:getCamRoles
arguments:
name: cam-role-test
Using getCamRoles
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCamRoles(args: GetCamRolesArgs, opts?: InvokeOptions): Promise<GetCamRolesResult>
function getCamRolesOutput(args: GetCamRolesOutputArgs, opts?: InvokeOptions): Output<GetCamRolesResult>def get_cam_roles(description: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
result_output_file: Optional[str] = None,
role_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCamRolesResult
def get_cam_roles_output(description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCamRolesResult]func GetCamRoles(ctx *Context, args *GetCamRolesArgs, opts ...InvokeOption) (*GetCamRolesResult, error)
func GetCamRolesOutput(ctx *Context, args *GetCamRolesOutputArgs, opts ...InvokeOption) GetCamRolesResultOutput> Note: This function is named GetCamRoles in the Go SDK.
public static class GetCamRoles
{
public static Task<GetCamRolesResult> InvokeAsync(GetCamRolesArgs args, InvokeOptions? opts = null)
public static Output<GetCamRolesResult> Invoke(GetCamRolesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCamRolesResult> getCamRoles(GetCamRolesArgs args, InvokeOptions options)
public static Output<GetCamRolesResult> getCamRoles(GetCamRolesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCamRoles:getCamRoles
arguments:
# arguments dictionaryThe following arguments are supported:
- Description string
- The description of the CAM role to be queried.
- Id string
- Name string
- Name of the CAM policy to be queried.
- Result
Output stringFile - Used to save results.
- Role
Id string - ID of the CAM role to be queried.
- Description string
- The description of the CAM role to be queried.
- Id string
- Name string
- Name of the CAM policy to be queried.
- Result
Output stringFile - Used to save results.
- Role
Id string - ID of the CAM role to be queried.
- description String
- The description of the CAM role to be queried.
- id String
- name String
- Name of the CAM policy to be queried.
- result
Output StringFile - Used to save results.
- role
Id String - ID of the CAM role to be queried.
- description string
- The description of the CAM role to be queried.
- id string
- name string
- Name of the CAM policy to be queried.
- result
Output stringFile - Used to save results.
- role
Id string - ID of the CAM role to be queried.
- description str
- The description of the CAM role to be queried.
- id str
- name str
- Name of the CAM policy to be queried.
- result_
output_ strfile - Used to save results.
- role_
id str - ID of the CAM role to be queried.
- description String
- The description of the CAM role to be queried.
- id String
- name String
- Name of the CAM policy to be queried.
- result
Output StringFile - Used to save results.
- role
Id String - ID of the CAM role to be queried.
getCamRoles Result
The following output properties are available:
- Id string
- Role
Lists List<GetCam Roles Role List> - A list of CAM roles. Each element contains the following attributes:
- Description string
- Description of CAM role.
- Name string
- Name of CAM role.
- Result
Output stringFile - Role
Id string - Id of CAM role.
- Id string
- Role
Lists []GetCam Roles Role List - A list of CAM roles. Each element contains the following attributes:
- Description string
- Description of CAM role.
- Name string
- Name of CAM role.
- Result
Output stringFile - Role
Id string - Id of CAM role.
- id String
- role
Lists List<GetCam Roles Role List> - A list of CAM roles. Each element contains the following attributes:
- description String
- Description of CAM role.
- name String
- Name of CAM role.
- result
Output StringFile - role
Id String - Id of CAM role.
- id string
- role
Lists GetCam Roles Role List[] - A list of CAM roles. Each element contains the following attributes:
- description string
- Description of CAM role.
- name string
- Name of CAM role.
- result
Output stringFile - role
Id string - Id of CAM role.
- id str
- role_
lists Sequence[GetCam Roles Role List] - A list of CAM roles. Each element contains the following attributes:
- description str
- Description of CAM role.
- name str
- Name of CAM role.
- result_
output_ strfile - role_
id str - Id of CAM role.
- id String
- role
Lists List<Property Map> - A list of CAM roles. Each element contains the following attributes:
- description String
- Description of CAM role.
- name String
- Name of CAM role.
- result
Output StringFile - role
Id String - Id of CAM role.
Supporting Types
GetCamRolesRoleList
- Console
Login bool - Indicate whether the CAM role can be login or not.
- Create
Time string - The create time of the CAM role.
- Description string
- The description of the CAM role to be queried.
- Document string
- Policy document of CAM role.
- Name string
- Name of the CAM policy to be queried.
- Role
Id string - ID of the CAM role to be queried.
- Update
Time string - The last update time of the CAM role.
- Console
Login bool - Indicate whether the CAM role can be login or not.
- Create
Time string - The create time of the CAM role.
- Description string
- The description of the CAM role to be queried.
- Document string
- Policy document of CAM role.
- Name string
- Name of the CAM policy to be queried.
- Role
Id string - ID of the CAM role to be queried.
- Update
Time string - The last update time of the CAM role.
- console
Login Boolean - Indicate whether the CAM role can be login or not.
- create
Time String - The create time of the CAM role.
- description String
- The description of the CAM role to be queried.
- document String
- Policy document of CAM role.
- name String
- Name of the CAM policy to be queried.
- role
Id String - ID of the CAM role to be queried.
- update
Time String - The last update time of the CAM role.
- console
Login boolean - Indicate whether the CAM role can be login or not.
- create
Time string - The create time of the CAM role.
- description string
- The description of the CAM role to be queried.
- document string
- Policy document of CAM role.
- name string
- Name of the CAM policy to be queried.
- role
Id string - ID of the CAM role to be queried.
- update
Time string - The last update time of the CAM role.
- console_
login bool - Indicate whether the CAM role can be login or not.
- create_
time str - The create time of the CAM role.
- description str
- The description of the CAM role to be queried.
- document str
- Policy document of CAM role.
- name str
- Name of the CAM policy to be queried.
- role_
id str - ID of the CAM role to be queried.
- update_
time str - The last update time of the CAM role.
- console
Login Boolean - Indicate whether the CAM role can be login or not.
- create
Time String - The create time of the CAM role.
- description String
- The description of the CAM role to be queried.
- document String
- Policy document of CAM role.
- name String
- Name of the CAM policy to be queried.
- role
Id String - ID of the CAM role to be queried.
- update
Time String - The last update time of the CAM role.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
