1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. getCamPolicyDetail
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack

    Use this data source to query the detail of a CAM policy by its ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getCamPolicyDetail({
        policyId: 236245899,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cam_policy_detail(policy_id=236245899)
    
    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.GetCamPolicyDetail(ctx, &tencentcloud.GetCamPolicyDetailArgs{
    			PolicyId: 236245899,
    		}, 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 example = Tencentcloud.GetCamPolicyDetail.Invoke(new()
        {
            PolicyId = 236245899,
        });
    
    });
    
    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.GetCamPolicyDetailArgs;
    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 example = TencentcloudFunctions.getCamPolicyDetail(GetCamPolicyDetailArgs.builder()
                .policyId(236245899)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getCamPolicyDetail
          arguments:
            policyId: 2.36245899e+08
    
    Example coming soon!
    

    Using getCamPolicyDetail

    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 getCamPolicyDetail(args: GetCamPolicyDetailArgs, opts?: InvokeOptions): Promise<GetCamPolicyDetailResult>
    function getCamPolicyDetailOutput(args: GetCamPolicyDetailOutputArgs, opts?: InvokeOptions): Output<GetCamPolicyDetailResult>
    def get_cam_policy_detail(id: Optional[str] = None,
                              policy_id: Optional[float] = None,
                              result_output_file: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCamPolicyDetailResult
    def get_cam_policy_detail_output(id: pulumi.Input[Optional[str]] = None,
                              policy_id: pulumi.Input[Optional[float]] = None,
                              result_output_file: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCamPolicyDetailResult]
    func GetCamPolicyDetail(ctx *Context, args *GetCamPolicyDetailArgs, opts ...InvokeOption) (*GetCamPolicyDetailResult, error)
    func GetCamPolicyDetailOutput(ctx *Context, args *GetCamPolicyDetailOutputArgs, opts ...InvokeOption) GetCamPolicyDetailResultOutput

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

    public static class GetCamPolicyDetail 
    {
        public static Task<GetCamPolicyDetailResult> InvokeAsync(GetCamPolicyDetailArgs args, InvokeOptions? opts = null)
        public static Output<GetCamPolicyDetailResult> Invoke(GetCamPolicyDetailInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCamPolicyDetailResult> getCamPolicyDetail(GetCamPolicyDetailArgs args, InvokeOptions options)
    public static Output<GetCamPolicyDetailResult> getCamPolicyDetail(GetCamPolicyDetailArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCamPolicyDetail:getCamPolicyDetail
      arguments:
        # arguments dictionary
    data "tencentcloud_getcampolicydetail" "name" {
        # arguments
    }

    The following arguments are supported:

    PolicyId double
    Policy ID.
    Id string
    ResultOutputFile string
    Used to save results.
    PolicyId float64
    Policy ID.
    Id string
    ResultOutputFile string
    Used to save results.
    policy_id number
    Policy ID.
    id string
    result_output_file string
    Used to save results.
    policyId Double
    Policy ID.
    id String
    resultOutputFile String
    Used to save results.
    policyId number
    Policy ID.
    id string
    resultOutputFile string
    Used to save results.
    policy_id float
    Policy ID.
    id str
    result_output_file str
    Used to save results.
    policyId Number
    Policy ID.
    id String
    resultOutputFile String
    Used to save results.

    getCamPolicyDetail Result

    The following output properties are available:

    Id string
    PolicyId double
    PolicyInfos List<GetCamPolicyDetailPolicyInfo>
    Policy detail information.
    ResultOutputFile string
    Id string
    PolicyId float64
    PolicyInfos []GetCamPolicyDetailPolicyInfo
    Policy detail information.
    ResultOutputFile string
    id string
    policy_id number
    policy_infos list(object)
    Policy detail information.
    result_output_file string
    id String
    policyId Double
    policyInfos List<GetCamPolicyDetailPolicyInfo>
    Policy detail information.
    resultOutputFile String
    id string
    policyId number
    policyInfos GetCamPolicyDetailPolicyInfo[]
    Policy detail information.
    resultOutputFile string
    id String
    policyId Number
    policyInfos List<Property Map>
    Policy detail information.
    resultOutputFile String

    Supporting Types

    GetCamPolicyDetailPolicyInfo

    AddTime string
    Time the policy was created.
    Description string
    Policy description.
    IsServiceLinkedRolePolicy double
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    PolicyDocument string
    Policy document.
    PolicyName string
    Policy name.
    PresetAlias string
    Preset policy alias. Note: this field may return null.
    Tags List<GetCamPolicyDetailPolicyInfoTag>
    Tags associated with the policy.
    Type double
    Policy type. 1 means custom policy, 2 means preset policy.
    UpdateTime string
    Time the policy was last updated.
    AddTime string
    Time the policy was created.
    Description string
    Policy description.
    IsServiceLinkedRolePolicy float64
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    PolicyDocument string
    Policy document.
    PolicyName string
    Policy name.
    PresetAlias string
    Preset policy alias. Note: this field may return null.
    Tags []GetCamPolicyDetailPolicyInfoTag
    Tags associated with the policy.
    Type float64
    Policy type. 1 means custom policy, 2 means preset policy.
    UpdateTime string
    Time the policy was last updated.
    add_time string
    Time the policy was created.
    description string
    Policy description.
    is_service_linked_role_policy number
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    policy_document string
    Policy document.
    policy_name string
    Policy name.
    preset_alias string
    Preset policy alias. Note: this field may return null.
    tags list(object)
    Tags associated with the policy.
    type number
    Policy type. 1 means custom policy, 2 means preset policy.
    update_time string
    Time the policy was last updated.
    addTime String
    Time the policy was created.
    description String
    Policy description.
    isServiceLinkedRolePolicy Double
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    policyDocument String
    Policy document.
    policyName String
    Policy name.
    presetAlias String
    Preset policy alias. Note: this field may return null.
    tags List<GetCamPolicyDetailPolicyInfoTag>
    Tags associated with the policy.
    type Double
    Policy type. 1 means custom policy, 2 means preset policy.
    updateTime String
    Time the policy was last updated.
    addTime string
    Time the policy was created.
    description string
    Policy description.
    isServiceLinkedRolePolicy number
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    policyDocument string
    Policy document.
    policyName string
    Policy name.
    presetAlias string
    Preset policy alias. Note: this field may return null.
    tags GetCamPolicyDetailPolicyInfoTag[]
    Tags associated with the policy.
    type number
    Policy type. 1 means custom policy, 2 means preset policy.
    updateTime string
    Time the policy was last updated.
    add_time str
    Time the policy was created.
    description str
    Policy description.
    is_service_linked_role_policy float
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    policy_document str
    Policy document.
    policy_name str
    Policy name.
    preset_alias str
    Preset policy alias. Note: this field may return null.
    tags Sequence[GetCamPolicyDetailPolicyInfoTag]
    Tags associated with the policy.
    type float
    Policy type. 1 means custom policy, 2 means preset policy.
    update_time str
    Time the policy was last updated.
    addTime String
    Time the policy was created.
    description String
    Policy description.
    isServiceLinkedRolePolicy Number
    Whether the policy is a service-linked role policy. 0 means no, 1 means yes.
    policyDocument String
    Policy document.
    policyName String
    Policy name.
    presetAlias String
    Preset policy alias. Note: this field may return null.
    tags List<Property Map>
    Tags associated with the policy.
    type Number
    Policy type. 1 means custom policy, 2 means preset policy.
    updateTime String
    Time the policy was last updated.

    GetCamPolicyDetailPolicyInfoTag

    Key string
    Tag key.
    Value string
    Tag value.
    Key string
    Tag key.
    Value string
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key String
    Tag key.
    value String
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key str
    Tag key.
    value str
    Tag value.
    key String
    Tag key.
    value String
    Tag value.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.82.93
    published on Monday, May 11, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.