tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getCamGroupPolicyAttachments
Start a Neo task
Explain and create a tencentcloud.getCamGroupPolicyAttachments resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
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";
// query by group_id
const foo = tencentcloud.getCamGroupPolicyAttachments({
groupId: fooTencentcloudCamGroup.id,
});
// query by group_id and policy_id
const bar = tencentcloud.getCamGroupPolicyAttachments({
groupId: fooTencentcloudCamGroup.id,
policyId: fooTencentcloudCamPolicy.id,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
# query by group_id
foo = tencentcloud.get_cam_group_policy_attachments(group_id=foo_tencentcloud_cam_group["id"])
# query by group_id and policy_id
bar = tencentcloud.get_cam_group_policy_attachments(group_id=foo_tencentcloud_cam_group["id"],
policy_id=foo_tencentcloud_cam_policy["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 {
// query by group_id
_, err := tencentcloud.GetCamGroupPolicyAttachments(ctx, &tencentcloud.GetCamGroupPolicyAttachmentsArgs{
GroupId: fooTencentcloudCamGroup.Id,
}, nil)
if err != nil {
return err
}
// query by group_id and policy_id
_, err = tencentcloud.GetCamGroupPolicyAttachments(ctx, &tencentcloud.GetCamGroupPolicyAttachmentsArgs{
GroupId: fooTencentcloudCamGroup.Id,
PolicyId: pulumi.StringRef(fooTencentcloudCamPolicy.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(() =>
{
// query by group_id
var foo = Tencentcloud.GetCamGroupPolicyAttachments.Invoke(new()
{
GroupId = fooTencentcloudCamGroup.Id,
});
// query by group_id and policy_id
var bar = Tencentcloud.GetCamGroupPolicyAttachments.Invoke(new()
{
GroupId = fooTencentcloudCamGroup.Id,
PolicyId = fooTencentcloudCamPolicy.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.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) {
// query by group_id
final var foo = TencentcloudFunctions.getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs.builder()
.groupId(fooTencentcloudCamGroup.id())
.build());
// query by group_id and policy_id
final var bar = TencentcloudFunctions.getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs.builder()
.groupId(fooTencentcloudCamGroup.id())
.policyId(fooTencentcloudCamPolicy.id())
.build());
}
}
variables:
# query by group_id
foo:
fn::invoke:
function: tencentcloud:getCamGroupPolicyAttachments
arguments:
groupId: ${fooTencentcloudCamGroup.id}
# query by group_id and policy_id
bar:
fn::invoke:
function: tencentcloud:getCamGroupPolicyAttachments
arguments:
groupId: ${fooTencentcloudCamGroup.id}
policyId: ${fooTencentcloudCamPolicy.id}
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>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]func GetCamGroupPolicyAttachments(ctx *Context, args *GetCamGroupPolicyAttachmentsArgs, opts ...InvokeOption) (*GetCamGroupPolicyAttachmentsResult, error)
func GetCamGroupPolicyAttachmentsOutput(ctx *Context, args *GetCamGroupPolicyAttachmentsOutputArgs, opts ...InvokeOption) GetCamGroupPolicyAttachmentsResultOutput> 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)
}public static CompletableFuture<GetCamGroupPolicyAttachmentsResult> getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs args, InvokeOptions options)
public static Output<GetCamGroupPolicyAttachmentsResult> getCamGroupPolicyAttachments(GetCamGroupPolicyAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCamGroupPolicyAttachments:getCamGroupPolicyAttachments
arguments:
# arguments dictionaryThe following arguments are supported:
- Group
Id string - ID of the attached CAM group 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.
- Group
Id string - ID of the attached CAM group 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.
- group
Id String - ID of the attached CAM group 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.
- group
Id string - ID of the attached CAM group 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.
- group_
id 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_ strfile - Used to save results.
- group
Id String - ID of the attached CAM group 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.
getCamGroupPolicyAttachments Result
The following output properties are available:
- Group
Id string - ID of CAM group.
- Group
Policy List<GetAttachment Lists Cam Group Policy Attachments Group Policy Attachment List> - A list of CAM group policy attachments. Each element contains the following attributes:
- Id string
- Create
Mode 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.
- Policy
Id string - Name of CAM group.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile
- Group
Id string - ID of CAM group.
- Group
Policy []GetAttachment Lists Cam Group Policy Attachments Group Policy Attachment List - A list of CAM group policy attachments. Each element contains the following attributes:
- Id string
- Create
Mode 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.
- Policy
Id string - Name of CAM group.
- Policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- Result
Output stringFile
- group
Id String - ID of CAM group.
- group
Policy List<GetAttachment Lists Cam Group Policy Attachments Group Policy Attachment List> - A list of CAM group policy attachments. Each element contains the following attributes:
- id String
- create
Mode 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.
- policy
Id String - Name of CAM group.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile
- group
Id string - ID of CAM group.
- group
Policy GetAttachment Lists Cam Group Policy Attachments Group Policy Attachment List[] - A list of CAM group policy attachments. Each element contains the following attributes:
- id string
- create
Mode 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.
- policy
Id string - Name of CAM group.
- policy
Type string - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output stringFile
- group_
id str - ID of CAM group.
- group_
policy_ Sequence[Getattachment_ lists Cam Group Policy Attachments Group Policy Attachment List] - 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_ strfile
- group
Id String - ID of CAM group.
- group
Policy List<Property Map>Attachment Lists - A list of CAM group policy attachments. Each element contains the following attributes:
- id String
- create
Mode 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.
- policy
Id String - Name of CAM group.
- policy
Type String - Type of the policy strategy. 'User' means customer strategy and 'QCS' means preset strategy.
- result
Output StringFile
Supporting Types
GetCamGroupPolicyAttachmentsGroupPolicyAttachmentList
- 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 group policy attachment.
- Group
Id string - ID of the attached CAM group to be queried.
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- 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 group policy attachment.
- Group
Id string - ID of the attached CAM group to be queried.
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- 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 group policy attachment.
- group
Id String - ID of the attached CAM group to be queried.
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- 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 group policy attachment.
- group
Id string - ID of the attached CAM group to be queried.
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- 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 group policy attachment.
- group_
id str - ID of the attached CAM group to be queried.
- 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. 'User' means customer strategy and 'QCS' means preset strategy.
- 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 group policy attachment.
- group
Id String - ID of the attached CAM group to be queried.
- 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. '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
tencentcloudTerraform Provider.
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
