1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCamGroupPolicyAttachments
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.getCamGroupPolicyAttachments

Explore with Pulumi AI

Use this data source to query detailed information of CAM group policy attachments

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const foo = tencentcloud.getCamGroupPolicyAttachments({
    groupId: tencentcloud_cam_group.foo.id,
});
const bar = tencentcloud.getCamGroupPolicyAttachments({
    groupId: tencentcloud_cam_group.foo.id,
    policyId: tencentcloud_cam_policy.foo.id,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

foo = tencentcloud.get_cam_group_policy_attachments(group_id=tencentcloud_cam_group["foo"]["id"])
bar = tencentcloud.get_cam_group_policy_attachments(group_id=tencentcloud_cam_group["foo"]["id"],
    policy_id=tencentcloud_cam_policy["foo"]["id"])
Copy
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.GetCamGroupPolicyAttachments(ctx, &tencentcloud.GetCamGroupPolicyAttachmentsArgs{
			GroupId: tencentcloud_cam_group.Foo.Id,
		}, nil)
		if err != nil {
			return err
		}
		_, err = tencentcloud.GetCamGroupPolicyAttachments(ctx, &tencentcloud.GetCamGroupPolicyAttachmentsArgs{
			GroupId:  tencentcloud_cam_group.Foo.Id,
			PolicyId: pulumi.StringRef(tencentcloud_cam_policy.Foo.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var foo = Tencentcloud.GetCamGroupPolicyAttachments.Invoke(new()
    {
        GroupId = tencentcloud_cam_group.Foo.Id,
    });

    var bar = Tencentcloud.GetCamGroupPolicyAttachments.Invoke(new()
    {
        GroupId = tencentcloud_cam_group.Foo.Id,
        PolicyId = tencentcloud_cam_policy.Foo.Id,
    });

});
Copy
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.GetCamGroupPolicyAttachmentsArgs;
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.getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs.builder()
            .groupId(tencentcloud_cam_group.foo().id())
            .build());

        final var bar = TencentcloudFunctions.getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs.builder()
            .groupId(tencentcloud_cam_group.foo().id())
            .policyId(tencentcloud_cam_policy.foo().id())
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: tencentcloud:getCamGroupPolicyAttachments
      arguments:
        groupId: ${tencentcloud_cam_group.foo.id}
  bar:
    fn::invoke:
      function: tencentcloud:getCamGroupPolicyAttachments
      arguments:
        groupId: ${tencentcloud_cam_group.foo.id}
        policyId: ${tencentcloud_cam_policy.foo.id}
Copy

Using getCamGroupPolicyAttachments

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 getCamGroupPolicyAttachments(args: GetCamGroupPolicyAttachmentsArgs, opts?: InvokeOptions): Promise<GetCamGroupPolicyAttachmentsResult>
function getCamGroupPolicyAttachmentsOutput(args: GetCamGroupPolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetCamGroupPolicyAttachmentsResult>
Copy
def get_cam_group_policy_attachments(create_mode: Optional[float] = None,
                                     group_id: Optional[str] = None,
                                     id: Optional[str] = None,
                                     policy_id: Optional[str] = None,
                                     policy_type: Optional[str] = None,
                                     result_output_file: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetCamGroupPolicyAttachmentsResult
def get_cam_group_policy_attachments_output(create_mode: Optional[pulumi.Input[float]] = None,
                                     group_id: Optional[pulumi.Input[str]] = 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,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetCamGroupPolicyAttachmentsResult]
Copy
func GetCamGroupPolicyAttachments(ctx *Context, args *GetCamGroupPolicyAttachmentsArgs, opts ...InvokeOption) (*GetCamGroupPolicyAttachmentsResult, error)
func GetCamGroupPolicyAttachmentsOutput(ctx *Context, args *GetCamGroupPolicyAttachmentsOutputArgs, opts ...InvokeOption) GetCamGroupPolicyAttachmentsResultOutput
Copy

> Note: This function is named GetCamGroupPolicyAttachments in the Go SDK.

public static class GetCamGroupPolicyAttachments 
{
    public static Task<GetCamGroupPolicyAttachmentsResult> InvokeAsync(GetCamGroupPolicyAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetCamGroupPolicyAttachmentsResult> Invoke(GetCamGroupPolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCamGroupPolicyAttachmentsResult> getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs args, InvokeOptions options)
public static Output<GetCamGroupPolicyAttachmentsResult> getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCamGroupPolicyAttachments:getCamGroupPolicyAttachments
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

GroupId This property is required. string
ID of the attached CAM group to be queried.
CreateMode 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
PolicyId string
ID of CAM policy to be queried.
PolicyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
ResultOutputFile string
Used to save results.
GroupId This property is required. string
ID of the attached CAM group to be queried.
CreateMode 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
PolicyId string
ID of CAM policy to be queried.
PolicyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
ResultOutputFile string
Used to save results.
groupId This property is required. String
ID of the attached CAM group to be queried.
createMode 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
policyId String
ID of CAM policy to be queried.
policyType String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile String
Used to save results.
groupId This property is required. string
ID of the attached CAM group to be queried.
createMode 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
policyId string
ID of CAM policy to be queried.
policyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile string
Used to save results.
group_id This property is required. str
ID of the attached CAM group 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_file str
Used to save results.
groupId This property is required. String
ID of the attached CAM group to be queried.
createMode 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
policyId String
ID of CAM policy to be queried.
policyType String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile String
Used to save results.

getCamGroupPolicyAttachments Result

The following output properties are available:

GroupId string
ID of CAM group.
GroupPolicyAttachmentLists List<GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList>
A list of CAM group policy attachments. Each element contains the following attributes:
Id string
CreateMode double
Mode of Creation of the CAM group policy attachment. 1 means the cam policy attachment is created by production, and the others indicate syntax strategy ways.
PolicyId string
Name of CAM group.
PolicyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
ResultOutputFile string
GroupId string
ID of CAM group.
GroupPolicyAttachmentLists []GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList
A list of CAM group policy attachments. Each element contains the following attributes:
Id string
CreateMode float64
Mode of Creation of the CAM group policy attachment. 1 means the cam policy attachment is created by production, and the others indicate syntax strategy ways.
PolicyId string
Name of CAM group.
PolicyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
ResultOutputFile string
groupId String
ID of CAM group.
groupPolicyAttachmentLists List<GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList>
A list of CAM group policy attachments. Each element contains the following attributes:
id String
createMode Double
Mode of Creation of the CAM group policy attachment. 1 means the cam policy attachment is created by production, and the others indicate syntax strategy ways.
policyId String
Name of CAM group.
policyType String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile String
groupId string
ID of CAM group.
groupPolicyAttachmentLists GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList[]
A list of CAM group policy attachments. Each element contains the following attributes:
id string
createMode number
Mode of Creation of the CAM group policy attachment. 1 means the cam policy attachment is created by production, and the others indicate syntax strategy ways.
policyId string
Name of CAM group.
policyType string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile string
group_id str
ID of CAM group.
group_policy_attachment_lists Sequence[GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList]
A list of CAM group policy attachments. Each element contains the following attributes:
id str
create_mode float
Mode of Creation of the CAM group 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 group.
policy_type str
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
result_output_file str
groupId String
ID of CAM group.
groupPolicyAttachmentLists List<Property Map>
A list of CAM group policy attachments. Each element contains the following attributes:
id String
createMode Number
Mode of Creation of the CAM group policy attachment. 1 means the cam policy attachment is created by production, and the others indicate syntax strategy ways.
policyId String
Name of CAM group.
policyType String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
resultOutputFile String

Supporting Types

GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList

CreateMode This property is required. 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.
CreateTime This property is required. string
Create time of the CAM group policy attachment.
GroupId This property is required. string
ID of the attached CAM group to be queried.
PolicyId This property is required. string
ID of CAM policy to be queried.
PolicyName This property is required. string
Name of the policy.
PolicyType This property is required. string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
CreateMode This property is required. 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.
CreateTime This property is required. string
Create time of the CAM group policy attachment.
GroupId This property is required. string
ID of the attached CAM group to be queried.
PolicyId This property is required. string
ID of CAM policy to be queried.
PolicyName This property is required. string
Name of the policy.
PolicyType This property is required. string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
createMode This property is required. 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.
createTime This property is required. String
Create time of the CAM group policy attachment.
groupId This property is required. String
ID of the attached CAM group to be queried.
policyId This property is required. String
ID of CAM policy to be queried.
policyName This property is required. String
Name of the policy.
policyType This property is required. String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
createMode This property is required. 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.
createTime This property is required. string
Create time of the CAM group policy attachment.
groupId This property is required. string
ID of the attached CAM group to be queried.
policyId This property is required. string
ID of CAM policy to be queried.
policyName This property is required. string
Name of the policy.
policyType This property is required. string
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
create_mode This property is required. 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 This property is required. str
Create time of the CAM group policy attachment.
group_id This property is required. str
ID of the attached CAM group to be queried.
policy_id This property is required. str
ID of CAM policy to be queried.
policy_name This property is required. str
Name of the policy.
policy_type This property is required. str
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
createMode This property is required. 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.
createTime This property is required. String
Create time of the CAM group policy attachment.
groupId This property is required. String
ID of the attached CAM group to be queried.
policyId This property is required. String
ID of CAM policy to be queried.
policyName This property is required. String
Name of the policy.
policyType This property is required. String
Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.