tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getCamPolicies
Start a Neo task
Explain and create a tencentcloud.getCamPolicies resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query detailed information of CAM policies
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
// query by policy_id
const foo = tencentcloud.getCamPolicies({
policyId: fooTencentcloudCamPolicy.id,
});
// query by policy_id and name
const bar = tencentcloud.getCamPolicies({
policyId: fooTencentcloudCamPolicy.id,
name: "tf-auto-test",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
# query by policy_id
foo = tencentcloud.get_cam_policies(policy_id=foo_tencentcloud_cam_policy["id"])
# query by policy_id and name
bar = tencentcloud.get_cam_policies(policy_id=foo_tencentcloud_cam_policy["id"],
name="tf-auto-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 policy_id
_, err := tencentcloud.GetCamPolicies(ctx, &tencentcloud.GetCamPoliciesArgs{
PolicyId: pulumi.StringRef(fooTencentcloudCamPolicy.Id),
}, nil)
if err != nil {
return err
}
// query by policy_id and name
_, err = tencentcloud.GetCamPolicies(ctx, &tencentcloud.GetCamPoliciesArgs{
PolicyId: pulumi.StringRef(fooTencentcloudCamPolicy.Id),
Name: pulumi.StringRef("tf-auto-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 policy_id
var foo = Tencentcloud.GetCamPolicies.Invoke(new()
{
PolicyId = fooTencentcloudCamPolicy.Id,
});
// query by policy_id and name
var bar = Tencentcloud.GetCamPolicies.Invoke(new()
{
PolicyId = fooTencentcloudCamPolicy.Id,
Name = "tf-auto-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.GetCamPoliciesArgs;
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 policy_id
final var foo = TencentcloudFunctions.getCamPolicies(GetCamPoliciesArgs.builder()
.policyId(fooTencentcloudCamPolicy.id())
.build());
// query by policy_id and name
final var bar = TencentcloudFunctions.getCamPolicies(GetCamPoliciesArgs.builder()
.policyId(fooTencentcloudCamPolicy.id())
.name("tf-auto-test")
.build());
}
}
variables:
# query by policy_id
foo:
fn::invoke:
function: tencentcloud:getCamPolicies
arguments:
policyId: ${fooTencentcloudCamPolicy.id}
# query by policy_id and name
bar:
fn::invoke:
function: tencentcloud:getCamPolicies
arguments:
policyId: ${fooTencentcloudCamPolicy.id}
name: tf-auto-test
Using getCamPolicies
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 getCamPolicies(args: GetCamPoliciesArgs, opts?: InvokeOptions): Promise<GetCamPoliciesResult>
function getCamPoliciesOutput(args: GetCamPoliciesOutputArgs, opts?: InvokeOptions): Output<GetCamPoliciesResult>def get_cam_policies(create_mode: Optional[float] = None,
description: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
result_output_file: Optional[str] = None,
type: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetCamPoliciesResult
def get_cam_policies_output(create_mode: Optional[pulumi.Input[float]] = None,
description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCamPoliciesResult]func GetCamPolicies(ctx *Context, args *GetCamPoliciesArgs, opts ...InvokeOption) (*GetCamPoliciesResult, error)
func GetCamPoliciesOutput(ctx *Context, args *GetCamPoliciesOutputArgs, opts ...InvokeOption) GetCamPoliciesResultOutput> Note: This function is named GetCamPolicies in the Go SDK.
public static class GetCamPolicies
{
public static Task<GetCamPoliciesResult> InvokeAsync(GetCamPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetCamPoliciesResult> Invoke(GetCamPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCamPoliciesResult> getCamPolicies(GetCamPoliciesArgs args, InvokeOptions options)
public static Output<GetCamPoliciesResult> getCamPolicies(GetCamPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCamPolicies:getCamPolicies
arguments:
# arguments dictionaryThe following arguments are supported:
- Create
Mode double - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - Description string
- The description of the CAM policy.
- Id string
- Name string
- Name of the CAM policy to be queried.
- Policy
Id string - ID of CAM policy to be queried.
- Result
Output stringFile - Used to save results.
- Type double
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- Create
Mode float64 - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - Description string
- The description of the CAM policy.
- Id string
- Name string
- Name of the CAM policy to be queried.
- Policy
Id string - ID of CAM policy to be queried.
- Result
Output stringFile - Used to save results.
- Type float64
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- create
Mode Double - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - description String
- The description of the CAM policy.
- id String
- name String
- Name of the CAM policy to be queried.
- policy
Id String - ID of CAM policy to be queried.
- result
Output StringFile - Used to save results.
- type Double
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- create
Mode number - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - description string
- The description of the CAM policy.
- id string
- name string
- Name of the CAM policy to be queried.
- policy
Id string - ID of CAM policy to be queried.
- result
Output stringFile - Used to save results.
- type number
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- create_
mode float - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - description str
- The description of the CAM policy.
- id str
- name str
- Name of the CAM policy to be queried.
- policy_
id str - ID of CAM policy to be queried.
- result_
output_ strfile - Used to save results.
- type float
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- create
Mode Number - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - description String
- The description of the CAM policy.
- id String
- name String
- Name of the CAM policy to be queried.
- policy
Id String - ID of CAM policy to be queried.
- result
Output StringFile - Used to save results.
- type Number
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
getCamPolicies Result
The following output properties are available:
- Id string
- Policy
Lists List<GetCam Policies Policy List> - A list of CAM policies. Each element contains the following attributes:
- Create
Mode double - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - Description string
- Description of CAM policy.
- Name string
- Name of CAM policy.
- Policy
Id string - ID of the policy strategy.
- Result
Output stringFile - Type double
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
- Id string
- Policy
Lists []GetCam Policies Policy List - A list of CAM policies. Each element contains the following attributes:
- Create
Mode float64 - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - Description string
- Description of CAM policy.
- Name string
- Name of CAM policy.
- Policy
Id string - ID of the policy strategy.
- Result
Output stringFile - Type float64
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
- id String
- policy
Lists List<GetCam Policies Policy List> - A list of CAM policies. Each element contains the following attributes:
- create
Mode Double - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - description String
- Description of CAM policy.
- name String
- Name of CAM policy.
- policy
Id String - ID of the policy strategy.
- result
Output StringFile - type Double
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
- id string
- policy
Lists GetCam Policies Policy List[] - A list of CAM policies. Each element contains the following attributes:
- create
Mode number - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - description string
- Description of CAM policy.
- name string
- Name of CAM policy.
- policy
Id string - ID of the policy strategy.
- result
Output stringFile - type number
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
- id str
- policy_
lists Sequence[GetCam Policies Policy List] - A list of CAM policies. Each element contains the following attributes:
- create_
mode float - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - description str
- Description of CAM policy.
- name str
- Name of CAM policy.
- policy_
id str - ID of the policy strategy.
- result_
output_ strfile - type float
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
- id String
- policy
Lists List<Property Map> - A list of CAM policies. Each element contains the following attributes:
- create
Mode Number - Mode of creation of policy strategy.
1means policy was created with console, and2means it was created by strategies. - description String
- Description of CAM policy.
- name String
- Name of CAM policy.
- policy
Id String - ID of the policy strategy.
- result
Output StringFile - type Number
- Type of the policy strategy.
1means customer strategy and2means preset strategy.
Supporting Types
GetCamPoliciesPolicyList
- Attachments double
- Number of attached users.
- Create
Mode double - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - Create
Time string - Create time of the CAM policy.
- Description string
- The description of the CAM policy.
- Name string
- Name of the CAM policy to be queried.
- Policy
Id string - ID of CAM policy to be queried.
- Service
Type string - Name of attached products.
- Type double
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- Attachments float64
- Number of attached users.
- Create
Mode float64 - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - Create
Time string - Create time of the CAM policy.
- Description string
- The description of the CAM policy.
- Name string
- Name of the CAM policy to be queried.
- Policy
Id string - ID of CAM policy to be queried.
- Service
Type string - Name of attached products.
- Type float64
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- attachments Double
- Number of attached users.
- create
Mode Double - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - create
Time String - Create time of the CAM policy.
- description String
- The description of the CAM policy.
- name String
- Name of the CAM policy to be queried.
- policy
Id String - ID of CAM policy to be queried.
- service
Type String - Name of attached products.
- type Double
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- attachments number
- Number of attached users.
- create
Mode number - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - create
Time string - Create time of the CAM policy.
- description string
- The description of the CAM policy.
- name string
- Name of the CAM policy to be queried.
- policy
Id string - ID of CAM policy to be queried.
- service
Type string - Name of attached products.
- type number
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- attachments float
- Number of attached users.
- create_
mode float - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - create_
time str - Create time of the CAM policy.
- description str
- The description of the CAM policy.
- name str
- Name of the CAM policy to be queried.
- policy_
id str - ID of CAM policy to be queried.
- service_
type str - Name of attached products.
- type float
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means preset strategy.
- attachments Number
- Number of attached users.
- create
Mode Number - Mode of creation of policy strategy. Valid values:
1,2.1means policy was created with console, and2means it was created by strategies. - create
Time String - Create time of the CAM policy.
- description String
- The description of the CAM policy.
- name String
- Name of the CAM policy to be queried.
- policy
Id String - ID of CAM policy to be queried.
- service
Type String - Name of attached products.
- type Number
- Type of the policy strategy. Valid values:
1,2.1means customer strategy and2means 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
