tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getCamUserPolicyAttachments
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 user policy attachments
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = tencentcloud.getCamUserPolicyAttachments({
userId: tencentcloud_cam_user.foo.id,
});
const bar = tencentcloud.getCamUserPolicyAttachments({
userId: tencentcloud_cam_user.foo.id,
policyId: tencentcloud_cam_policy.foo.id,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.get_cam_user_policy_attachments(user_id=tencentcloud_cam_user["foo"]["id"])
bar = tencentcloud.get_cam_user_policy_attachments(user_id=tencentcloud_cam_user["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.GetCamUserPolicyAttachments(ctx, &tencentcloud.GetCamUserPolicyAttachmentsArgs{
UserId: pulumi.StringRef(tencentcloud_cam_user.Foo.Id),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.GetCamUserPolicyAttachments(ctx, &tencentcloud.GetCamUserPolicyAttachmentsArgs{
UserId: pulumi.StringRef(tencentcloud_cam_user.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.GetCamUserPolicyAttachments.Invoke(new()
{
UserId = tencentcloud_cam_user.Foo.Id,
});
var bar = Tencentcloud.GetCamUserPolicyAttachments.Invoke(new()
{
UserId = tencentcloud_cam_user.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.GetCamUserPolicyAttachmentsArgs;
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.getCamUserPolicyAttachments(GetCamUserPolicyAttachmentsArgs.builder()
.userId(tencentcloud_cam_user.foo().id())
.build());
final var bar = TencentcloudFunctions.getCamUserPolicyAttachments(GetCamUserPolicyAttachmentsArgs.builder()
.userId(tencentcloud_cam_user.foo().id())
.policyId(tencentcloud_cam_policy.foo().id())
.build());
}
}
variables:
foo:
fn::invoke:
function: tencentcloud:getCamUserPolicyAttachments
arguments:
userId: ${tencentcloud_cam_user.foo.id}
bar:
fn::invoke:
function: tencentcloud:getCamUserPolicyAttachments
arguments:
userId: ${tencentcloud_cam_user.foo.id}
policyId: ${tencentcloud_cam_policy.foo.id}
Using getCamUserPolicyAttachments
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 getCamUserPolicyAttachments(args: GetCamUserPolicyAttachmentsArgs, opts?: InvokeOptions): Promise<GetCamUserPolicyAttachmentsResult>
function getCamUserPolicyAttachmentsOutput(args: GetCamUserPolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetCamUserPolicyAttachmentsResult>
def get_cam_user_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,
user_id: Optional[str] = None,
user_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCamUserPolicyAttachmentsResult
def get_cam_user_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,
user_id: Optional[pulumi.Input[str]] = None,
user_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCamUserPolicyAttachmentsResult]
func GetCamUserPolicyAttachments(ctx *Context, args *GetCamUserPolicyAttachmentsArgs, opts ...InvokeOption) (*GetCamUserPolicyAttachmentsResult, error)
func GetCamUserPolicyAttachmentsOutput(ctx *Context, args *GetCamUserPolicyAttachmentsOutputArgs, opts ...InvokeOption) GetCamUserPolicyAttachmentsResultOutput
> Note: This function is named GetCamUserPolicyAttachments
in the Go SDK.
public static class GetCamUserPolicyAttachments
{
public static Task<GetCamUserPolicyAttachmentsResult> InvokeAsync(GetCamUserPolicyAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetCamUserPolicyAttachmentsResult> Invoke(GetCamUserPolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCamUserPolicyAttachmentsResult> getCamUserPolicyAttachments(GetCamUserPolicyAttachmentsArgs args, InvokeOptions options)
public static Output<GetCamUserPolicyAttachmentsResult> getCamUserPolicyAttachments(GetCamUserPolicyAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCamUserPolicyAttachments:getCamUserPolicyAttachments
arguments:
# arguments dictionary
The following arguments are supported:
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - Used to save results.
- User
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - User
Name string - Name of the attached CAM user as unique key 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. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - Used to save results.
- User
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - User
Name string - Name of the attached CAM user as unique key 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. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - Used to save results.
- user
Id String - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name String - Name of the attached CAM user as unique key 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. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output stringFile - Used to save results.
- user
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name string - Name of the attached CAM user as unique key 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. 'User' means customer strategy and 'QCS' means preset strategy.
- result_
output_ strfile - Used to save results.
- user_
id str - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user_
name str - Name of the attached CAM user as unique key 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. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - Used to save results.
- user
Id String - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name String - Name of the attached CAM user as unique key to be queried.
getCamUserPolicyAttachments Result
The following output properties are available:
- Id string
- User
Policy List<GetAttachment Lists Cam User Policy Attachments User Policy Attachment List> - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - Policy
Id string - Name of CAM user.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - User
Id string - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - User
Name string - Name of CAM user as unique key.
- Id string
- User
Policy []GetAttachment Lists Cam User Policy Attachments User Policy Attachment List - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - Policy
Id string - Name of CAM user.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile - User
Id string - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - User
Name string - Name of CAM user as unique key.
- id String
- user
Policy List<GetAttachment Lists Cam User Policy Attachments User Policy Attachment List> - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - policy
Id String - Name of CAM user.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - user
Id String - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - user
Name String - Name of CAM user as unique key.
- id string
- user
Policy GetAttachment Lists Cam User Policy Attachments User Policy Attachment List[] - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - policy
Id string - Name of CAM user.
- policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output stringFile - user
Id string - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - user
Name string - Name of CAM user as unique key.
- id str
- user_
policy_ Sequence[Getattachment_ lists Cam User Policy Attachments User Policy Attachment List] - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - policy_
id str - Name of CAM user.
- policy_
type str - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result_
output_ strfile - user_
id str - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - user_
name str - Name of CAM user as unique key.
- id String
- user
Policy List<Property Map>Attachment Lists - A list of CAM user policy attachments. Each element contains the following attributes:
- 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. - policy
Id String - Name of CAM user.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile - user
Id String - (Deprecated) It has been deprecated from version 1.59.6. Use
user_name
instead. ID of CAM user. - user
Name String - Name of CAM user as unique key.
Supporting Types
GetCamUserPolicyAttachmentsUserPolicyAttachmentList
- 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 - The create time of the CAM user policy attachment.
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Name string - The name of the policy.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- User
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - User
Name string - Name of the attached CAM user as unique key 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 - The create time of the CAM user policy attachment.
- Policy
Id string - ID of CAM policy to be queried.
- Policy
Name string - The name of the policy.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- User
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - User
Name string - Name of the attached CAM user as unique key 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 - The create time of the CAM user policy attachment.
- policy
Id String - ID of CAM policy to be queried.
- policy
Name String - The name of the policy.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- user
Id String - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name String - Name of the attached CAM user as unique key 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 - The create time of the CAM user policy attachment.
- policy
Id string - ID of CAM policy to be queried.
- policy
Name string - The name of the policy.
- policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- user
Id string - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name string - Name of the attached CAM user as unique key 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 - The create time of the CAM user policy attachment.
- policy_
id str - ID of CAM policy to be queried.
- policy_
name str - The name of the policy.
- policy_
type str - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- user_
id str - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user_
name str - Name of the attached CAM user as unique key 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 - The create time of the CAM user policy attachment.
- policy
Id String - ID of CAM policy to be queried.
- policy
Name String - The name of the policy.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- user
Id String - It has been deprecated from version 1.59.6. Use
user_name
instead. ID of the attached CAM user to be queried. - user
Name String - Name of the attached CAM user as unique key 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