tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getCamRolePolicyAttachments
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query detailed information of CAM role policy attachments
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = tencentcloud.getCamRolePolicyAttachments({
roleId: tencentcloud_cam_role.foo.id,
});
const bar = tencentcloud.getCamRolePolicyAttachments({
roleId: tencentcloud_cam_role.foo.id,
policyId: tencentcloud_cam_policy.foo.id,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.get_cam_role_policy_attachments(role_id=tencentcloud_cam_role["foo"]["id"])
bar = tencentcloud.get_cam_role_policy_attachments(role_id=tencentcloud_cam_role["foo"]["id"],
policy_id=tencentcloud_cam_policy["foo"]["id"])
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 {
_, err := tencentcloud.GetCamRolePolicyAttachments(ctx, &tencentcloud.GetCamRolePolicyAttachmentsArgs{
RoleId: tencentcloud_cam_role.Foo.Id,
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.GetCamRolePolicyAttachments(ctx, &tencentcloud.GetCamRolePolicyAttachmentsArgs{
RoleId: tencentcloud_cam_role.Foo.Id,
PolicyId: pulumi.StringRef(tencentcloud_cam_policy.Foo.Id),
}, 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(() =>
{
var foo = Tencentcloud.GetCamRolePolicyAttachments.Invoke(new()
{
RoleId = tencentcloud_cam_role.Foo.Id,
});
var bar = Tencentcloud.GetCamRolePolicyAttachments.Invoke(new()
{
RoleId = tencentcloud_cam_role.Foo.Id,
PolicyId = tencentcloud_cam_policy.Foo.Id,
});
});
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.GetCamRolePolicyAttachmentsArgs;
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) {
final var foo = TencentcloudFunctions.getCamRolePolicyAttachments(GetCamRolePolicyAttachmentsArgs.builder()
.roleId(tencentcloud_cam_role.foo().id())
.build());
final var bar = TencentcloudFunctions.getCamRolePolicyAttachments(GetCamRolePolicyAttachmentsArgs.builder()
.roleId(tencentcloud_cam_role.foo().id())
.policyId(tencentcloud_cam_policy.foo().id())
.build());
}
}
variables:
foo:
fn::invoke:
function: tencentcloud:getCamRolePolicyAttachments
arguments:
roleId: ${tencentcloud_cam_role.foo.id}
bar:
fn::invoke:
function: tencentcloud:getCamRolePolicyAttachments
arguments:
roleId: ${tencentcloud_cam_role.foo.id}
policyId: ${tencentcloud_cam_policy.foo.id}
Using getCamRolePolicyAttachments
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 getCamRolePolicyAttachments(args: GetCamRolePolicyAttachmentsArgs, opts?: InvokeOptions): Promise<GetCamRolePolicyAttachmentsResult>
function getCamRolePolicyAttachmentsOutput(args: GetCamRolePolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetCamRolePolicyAttachmentsResult>
def get_cam_role_policy_attachments(create_mode: Optional[float] = None,
id: Optional[str] = None,
policy_id: Optional[str] = None,
policy_type: Optional[str] = None,
result_output_file: Optional[str] = None,
role_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCamRolePolicyAttachmentsResult
def get_cam_role_policy_attachments_output(create_mode: Optional[pulumi.Input[float]] = None,
id: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
policy_type: 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[GetCamRolePolicyAttachmentsResult]
func GetCamRolePolicyAttachments(ctx *Context, args *GetCamRolePolicyAttachmentsArgs, opts ...InvokeOption) (*GetCamRolePolicyAttachmentsResult, error)
func GetCamRolePolicyAttachmentsOutput(ctx *Context, args *GetCamRolePolicyAttachmentsOutputArgs, opts ...InvokeOption) GetCamRolePolicyAttachmentsResultOutput
> Note: This function is named GetCamRolePolicyAttachments
in the Go SDK.
public static class GetCamRolePolicyAttachments
{
public static Task<GetCamRolePolicyAttachmentsResult> InvokeAsync(GetCamRolePolicyAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetCamRolePolicyAttachmentsResult> Invoke(GetCamRolePolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCamRolePolicyAttachmentsResult> getCamRolePolicyAttachments(GetCamRolePolicyAttachmentsArgs args, InvokeOptions options)
public static Output<GetCamRolePolicyAttachmentsResult> getCamRolePolicyAttachments(GetCamRolePolicyAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCamRolePolicyAttachments:getCamRolePolicyAttachments
arguments:
# arguments dictionary
The following arguments are supported:
- Role
Id string - ID of the attached CAM role to be queried.
- Create
Mode double - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Id string
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - Used to save results.
- Role
Id string - ID of the attached CAM role to be queried.
- Create
Mode float64 - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Id string
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - Used to save results.
- role
Id String - ID of the attached CAM role to be queried.
- create
Mode Double - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - id String
- policy
Id String - ID of CAM policy to be queried.
- policy
Type String - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - Used to save results.
- role
Id string - ID of the attached CAM role to be queried.
- create
Mode number - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - id string
- policy
Id string - ID of CAM policy to be queried.
- policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output stringFile - Used to save results.
- role_
id str - ID of the attached CAM role to be queried.
- create_
mode float - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - id str
- policy_
id str - ID of CAM policy to be queried.
- policy_
type str - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- result_
output_ strfile - Used to save results.
- role
Id String - ID of the attached CAM role to be queried.
- create
Mode Number - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - id String
- policy
Id String - ID of CAM policy to be queried.
- policy
Type String - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - Used to save results.
getCamRolePolicyAttachments Result
The following output properties are available:
- Id string
- Role
Id string - ID of CAM role.
- Role
Policy List<GetAttachment Lists Cam Role Policy Attachments Role Policy Attachment List> - A list of CAM role policy attachments. Each element contains the following attributes:
- Create
Mode double - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Policy
Id string - Name of CAM role.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile
- Id string
- Role
Id string - ID of CAM role.
- Role
Policy []GetAttachment Lists Cam Role Policy Attachments Role Policy Attachment List - A list of CAM role policy attachments. Each element contains the following attributes:
- Create
Mode float64 - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Policy
Id string - Name of CAM role.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile
- id String
- role
Id String - ID of CAM role.
- role
Policy List<GetAttachment Lists Cam Role Policy Attachments Role Policy Attachment List> - A list of CAM role policy attachments. Each element contains the following attributes:
- create
Mode Double - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - policy
Id String - Name of CAM role.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile
- id string
- role
Id string - ID of CAM role.
- role
Policy GetAttachment Lists Cam Role Policy Attachments Role Policy Attachment List[] - A list of CAM role policy attachments. Each element contains the following attributes:
- create
Mode number - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - policy
Id string - Name of CAM role.
- policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output stringFile
- id str
- role_
id str - ID of CAM role.
- role_
policy_ Sequence[Getattachment_ lists Cam Role Policy Attachments Role Policy Attachment List] - A list of CAM role policy attachments. Each element contains the following attributes:
- create_
mode float - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - policy_
id str - Name of CAM role.
- policy_
type str - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result_
output_ strfile
- id String
- role
Id String - ID of CAM role.
- role
Policy List<Property Map>Attachment Lists - A list of CAM role policy attachments. Each element contains the following attributes:
- create
Mode Number - Mode of Creation of the CAM role policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - policy
Id String - Name of CAM role.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile
Supporting Types
GetCamRolePolicyAttachmentsRolePolicyAttachmentList
- Create
Mode double - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Create
Time string - Create time of the CAM role policy attachment.
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Name string - Name of the policy.
- Policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- Role
Id string - ID of the attached CAM role to be queried.
- Create
Mode float64 - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - Create
Time string - Create time of the CAM role policy attachment.
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Name string - Name of the policy.
- Policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- Role
Id string - ID of the attached CAM role to be queried.
- create
Mode Double - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - create
Time String - Create time of the CAM role policy attachment.
- policy
Id String - ID of CAM policy to be queried.
- policy
Name String - Name of the policy.
- policy
Type String - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- role
Id String - ID of the attached CAM role to be queried.
- create
Mode number - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - create
Time string - Create time of the CAM role policy attachment.
- policy
Id string - ID of CAM policy to be queried.
- policy
Name string - Name of the policy.
- policy
Type string - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- role
Id string - ID of the attached CAM role to be queried.
- create_
mode float - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - create_
time str - Create time of the CAM role policy attachment.
- policy_
id str - ID of CAM policy to be queried.
- policy_
name str - Name of the policy.
- policy_
type str - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- role_
id str - ID of the attached CAM role to be queried.
- create
Mode Number - Mode of Creation of the CAM user policy attachment.
1
means the cam policy attachment is created by production, and the others indicate syntax strategy ways. - create
Time String - Create time of the CAM role policy attachment.
- policy
Id String - ID of CAM policy to be queried.
- policy
Name String - Name of the policy.
- policy
Type String - Type of the policy strategy. Valid values are 'User', 'QCS'. 'User' means customer strategy and 'QCS' means preset strategy.
- role
Id String - ID of the attached CAM role to be queried.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack