1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CamRole
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CamRole

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a CAM role.

    Example Usage

    Create normally

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const info = tencentcloud.getUserInfo({});
    const myUin = info.then(info => info.ownerUin);
    const example = new tencentcloud.CamRole("example", {
        document: JSON.stringify({
            statement: [{
                action: "name/sts:AssumeRole",
                effect: "allow",
                principal: {
                    qcs: [myUin.then(myUin => `qcs::cam::uin/${myUin}:root`)],
                },
            }],
            version: "2.0",
        }),
        consoleLogin: true,
        description: "test",
        sessionDuration: 7200,
        tags: {
            createBy: "Terraform",
        },
    });
    export const uin = myUin;
    export const arn = example.roleArn;
    
    import pulumi
    import json
    import pulumi_tencentcloud as tencentcloud
    
    info = tencentcloud.get_user_info()
    my_uin = info.owner_uin
    example = tencentcloud.CamRole("example",
        document=json.dumps({
            "statement": [{
                "action": "name/sts:AssumeRole",
                "effect": "allow",
                "principal": {
                    "qcs": [f"qcs::cam::uin/{my_uin}:root"],
                },
            }],
            "version": "2.0",
        }),
        console_login=True,
        description="test",
        session_duration=7200,
        tags={
            "createBy": "Terraform",
        })
    pulumi.export("uin", my_uin)
    pulumi.export("arn", example.role_arn)
    
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    
    	"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 {
    		info, err := tencentcloud.GetUserInfo(ctx, &tencentcloud.GetUserInfoArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		myUin := info.OwnerUin
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"statement": []map[string]interface{}{
    				map[string]interface{}{
    					"action": "name/sts:AssumeRole",
    					"effect": "allow",
    					"principal": map[string]interface{}{
    						"qcs": []string{
    							fmt.Sprintf("qcs::cam::uin/%v:root", myUin),
    						},
    					},
    				},
    			},
    			"version": "2.0",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		example, err := tencentcloud.NewCamRole(ctx, "example", &tencentcloud.CamRoleArgs{
    			Document:        pulumi.String(json0),
    			ConsoleLogin:    pulumi.Bool(true),
    			Description:     pulumi.String("test"),
    			SessionDuration: pulumi.Float64(7200),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("Terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("uin", myUin)
    		ctx.Export("arn", example.RoleArn)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var info = Tencentcloud.GetUserInfo.Invoke();
    
        var myUin = info.Apply(getUserInfoResult => getUserInfoResult.OwnerUin);
    
        var example = new Tencentcloud.CamRole("example", new()
        {
            Document = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["action"] = "name/sts:AssumeRole",
                        ["effect"] = "allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["qcs"] = new[]
                            {
                                myUin.Apply(myUin => $"qcs::cam::uin/{myUin}:root"),
                            },
                        },
                    },
                },
                ["version"] = "2.0",
            }),
            ConsoleLogin = true,
            Description = "test",
            SessionDuration = 7200,
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["uin"] = myUin,
            ["arn"] = example.RoleArn,
        };
    });
    
    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.GetUserInfoArgs;
    import com.pulumi.tencentcloud.CamRole;
    import com.pulumi.tencentcloud.CamRoleArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 info = TencentcloudFunctions.getUserInfo();
    
            final var myUin = info.applyValue(getUserInfoResult -> getUserInfoResult.ownerUin());
    
            var example = new CamRole("example", CamRoleArgs.builder()
                .document(serializeJson(
                    jsonObject(
                        jsonProperty("statement", jsonArray(jsonObject(
                            jsonProperty("action", "name/sts:AssumeRole"),
                            jsonProperty("effect", "allow"),
                            jsonProperty("principal", jsonObject(
                                jsonProperty("qcs", jsonArray(String.format("qcs::cam::uin/%s:root", myUin)))
                            ))
                        ))),
                        jsonProperty("version", "2.0")
                    )))
                .consoleLogin(true)
                .description("test")
                .sessionDuration(7200)
                .tags(Map.of("createBy", "Terraform"))
                .build());
    
            ctx.export("uin", myUin);
            ctx.export("arn", example.roleArn());
        }
    }
    
    resources:
      example:
        type: tencentcloud:CamRole
        properties:
          document:
            fn::toJSON:
              statement:
                - action: name/sts:AssumeRole
                  effect: allow
                  principal:
                    qcs:
                      - qcs::cam::uin/${myUin}:root
              version: '2.0'
          consoleLogin: true
          description: test
          sessionDuration: 7200
          tags:
            createBy: Terraform
    variables:
      info:
        fn::invoke:
          function: tencentcloud:getUserInfo
          arguments: {}
      myUin: ${info.ownerUin}
    outputs:
      uin: ${myUin}
      arn: ${example.roleArn}
    

    Or use service

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CamRole("example", {
        document: JSON.stringify({
            statement: [{
                action: "name/sts:AssumeRole",
                effect: "allow",
                principal: {
                    service: ["scf.qcloud.com"],
                },
            }],
            version: "2.0",
        }),
        consoleLogin: true,
        description: "test",
        sessionDuration: 7200,
        tags: {
            createBy: "Terraform",
        },
    });
    
    import pulumi
    import json
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CamRole("example",
        document=json.dumps({
            "statement": [{
                "action": "name/sts:AssumeRole",
                "effect": "allow",
                "principal": {
                    "service": ["scf.qcloud.com"],
                },
            }],
            "version": "2.0",
        }),
        console_login=True,
        description="test",
        session_duration=7200,
        tags={
            "createBy": "Terraform",
        })
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"statement": []map[string]interface{}{
    				map[string]interface{}{
    					"action": "name/sts:AssumeRole",
    					"effect": "allow",
    					"principal": map[string]interface{}{
    						"service": []string{
    							"scf.qcloud.com",
    						},
    					},
    				},
    			},
    			"version": "2.0",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = tencentcloud.NewCamRole(ctx, "example", &tencentcloud.CamRoleArgs{
    			Document:        pulumi.String(json0),
    			ConsoleLogin:    pulumi.Bool(true),
    			Description:     pulumi.String("test"),
    			SessionDuration: pulumi.Float64(7200),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("Terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.CamRole("example", new()
        {
            Document = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["action"] = "name/sts:AssumeRole",
                        ["effect"] = "allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "scf.qcloud.com",
                            },
                        },
                    },
                },
                ["version"] = "2.0",
            }),
            ConsoleLogin = true,
            Description = "test",
            SessionDuration = 7200,
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CamRole;
    import com.pulumi.tencentcloud.CamRoleArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            var example = new CamRole("example", CamRoleArgs.builder()
                .document(serializeJson(
                    jsonObject(
                        jsonProperty("statement", jsonArray(jsonObject(
                            jsonProperty("action", "name/sts:AssumeRole"),
                            jsonProperty("effect", "allow"),
                            jsonProperty("principal", jsonObject(
                                jsonProperty("service", jsonArray("scf.qcloud.com"))
                            ))
                        ))),
                        jsonProperty("version", "2.0")
                    )))
                .consoleLogin(true)
                .description("test")
                .sessionDuration(7200)
                .tags(Map.of("createBy", "Terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CamRole
        properties:
          document:
            fn::toJSON:
              statement:
                - action: name/sts:AssumeRole
                  effect: allow
                  principal:
                    service:
                      - scf.qcloud.com
              version: '2.0'
          consoleLogin: true
          description: test
          sessionDuration: 7200
          tags:
            createBy: Terraform
    

    Create with SAML provider

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const saml_provider = config.get("saml-provider") || "example";
    const info = tencentcloud.getUserInfo({});
    const uin = info.then(info => info.uin);
    const samlProvider = saml_provider;
    const example = new tencentcloud.CamRole("example", {
        document: uin.then(uin => `{
      "version": "2.0",
      "statement": [
        {
          "action": [
            "name/sts:AssumeRole"
          ],
          "effect": "allow",
          "principal": {
            "qcs": [
              "qcs::cam::uin/${uin}:saml-provider/${samlProvider}"
            ]
          }
        }
      ]
    }
    `),
        description: "terraform demo",
        consoleLogin: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    saml_provider = config.get("saml-provider")
    if saml_provider is None:
        saml_provider = "example"
    info = tencentcloud.get_user_info()
    uin = info.uin
    saml_provider = saml_provider
    example = tencentcloud.CamRole("example",
        document=f"""{{
      "version": "2.0",
      "statement": [
        {{
          "action": [
            "name/sts:AssumeRole"
          ],
          "effect": "allow",
          "principal": {{
            "qcs": [
              "qcs::cam::uin/{uin}:saml-provider/{saml_provider}"
            ]
          }}
        }}
      ]
    }}
    """,
        description="terraform demo",
        console_login=True)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		saml_provider := "example"
    		if param := cfg.Get("saml-provider"); param != "" {
    			saml_provider = param
    		}
    		info, err := tencentcloud.GetUserInfo(ctx, &tencentcloud.GetUserInfoArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		uin := info.Uin
    		samlProvider := saml_provider
    		_, err = tencentcloud.NewCamRole(ctx, "example", &tencentcloud.CamRoleArgs{
    			Document: pulumi.Sprintf(`{
      "version": "2.0",
      "statement": [
        {
          "action": [
            "name/sts:AssumeRole"
          ],
          "effect": "allow",
          "principal": {
            "qcs": [
              "qcs::cam::uin/%v:saml-provider/%v"
            ]
          }
        }
      ]
    }
    `, uin, samlProvider),
    			Description:  pulumi.String("terraform demo"),
    			ConsoleLogin: pulumi.Bool(true),
    		})
    		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 config = new Config();
        var saml_provider = config.Get("saml-provider") ?? "example";
        var info = Tencentcloud.GetUserInfo.Invoke();
    
        var uin = info.Apply(getUserInfoResult => getUserInfoResult.Uin);
    
        var samlProvider = saml_provider;
    
        var example = new Tencentcloud.CamRole("example", new()
        {
            Document = uin.Apply(uin => @$"{{
      ""version"": ""2.0"",
      ""statement"": [
        {{
          ""action"": [
            ""name/sts:AssumeRole""
          ],
          ""effect"": ""allow"",
          ""principal"": {{
            ""qcs"": [
              ""qcs::cam::uin/{uin}:saml-provider/{samlProvider}""
            ]
          }}
        }}
      ]
    }}
    "),
            Description = "terraform demo",
            ConsoleLogin = true,
        });
    
    });
    
    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.GetUserInfoArgs;
    import com.pulumi.tencentcloud.CamRole;
    import com.pulumi.tencentcloud.CamRoleArgs;
    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 config = ctx.config();
            final var saml_provider = config.get("saml-provider").orElse("example");
            final var info = TencentcloudFunctions.getUserInfo();
    
            final var uin = info.applyValue(getUserInfoResult -> getUserInfoResult.uin());
    
            final var samlProvider = saml_provider;
    
            var example = new CamRole("example", CamRoleArgs.builder()
                .document("""
    {
      "version": "2.0",
      "statement": [
        {
          "action": [
            "name/sts:AssumeRole"
          ],
          "effect": "allow",
          "principal": {
            "qcs": [
              "qcs::cam::uin/%s:saml-provider/%s"
            ]
          }
        }
      ]
    }
    ", uin,samlProvider))
                .description("terraform demo")
                .consoleLogin(true)
                .build());
    
        }
    }
    
    configuration:
      saml-provider:
        type: string
        default: example
    resources:
      example:
        type: tencentcloud:CamRole
        properties:
          document: |
            {
              "version": "2.0",
              "statement": [
                {
                  "action": [
                    "name/sts:AssumeRole"
                  ],
                  "effect": "allow",
                  "principal": {
                    "qcs": [
                      "qcs::cam::uin/${uin}:saml-provider/${samlProvider}"
                    ]
                  }
                }
              ]
            }        
          description: terraform demo
          consoleLogin: true
    variables:
      info:
        fn::invoke:
          function: tencentcloud:getUserInfo
          arguments: {}
      uin: ${info.uin}
      samlProvider: ${["saml-provider"]}
    

    Create CamRole Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CamRole(name: string, args: CamRoleArgs, opts?: CustomResourceOptions);
    @overload
    def CamRole(resource_name: str,
                args: CamRoleArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CamRole(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                document: Optional[str] = None,
                cam_role_id: Optional[str] = None,
                console_login: Optional[bool] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                session_duration: Optional[float] = None,
                tags: Optional[Mapping[str, str]] = None)
    func NewCamRole(ctx *Context, name string, args CamRoleArgs, opts ...ResourceOption) (*CamRole, error)
    public CamRole(string name, CamRoleArgs args, CustomResourceOptions? opts = null)
    public CamRole(String name, CamRoleArgs args)
    public CamRole(String name, CamRoleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CamRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CamRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CamRoleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CamRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CamRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CamRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CamRole Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CamRole resource accepts the following input properties:

    Document string
    CamRoleId string
    ID of the resource.
    ConsoleLogin bool
    Indicates whether the CAM role can login or not.
    Description string
    Description of the CAM role.
    Name string
    Name of CAM role.
    SessionDuration double
    The maximum validity period of the temporary key for creating a role.
    Tags Dictionary<string, string>
    A list of tags used to associate different resources.
    Document string
    CamRoleId string
    ID of the resource.
    ConsoleLogin bool
    Indicates whether the CAM role can login or not.
    Description string
    Description of the CAM role.
    Name string
    Name of CAM role.
    SessionDuration float64
    The maximum validity period of the temporary key for creating a role.
    Tags map[string]string
    A list of tags used to associate different resources.
    document String
    camRoleId String
    ID of the resource.
    consoleLogin Boolean
    Indicates whether the CAM role can login or not.
    description String
    Description of the CAM role.
    name String
    Name of CAM role.
    sessionDuration Double
    The maximum validity period of the temporary key for creating a role.
    tags Map<String,String>
    A list of tags used to associate different resources.
    document string
    camRoleId string
    ID of the resource.
    consoleLogin boolean
    Indicates whether the CAM role can login or not.
    description string
    Description of the CAM role.
    name string
    Name of CAM role.
    sessionDuration number
    The maximum validity period of the temporary key for creating a role.
    tags {[key: string]: string}
    A list of tags used to associate different resources.
    document str
    cam_role_id str
    ID of the resource.
    console_login bool
    Indicates whether the CAM role can login or not.
    description str
    Description of the CAM role.
    name str
    Name of CAM role.
    session_duration float
    The maximum validity period of the temporary key for creating a role.
    tags Mapping[str, str]
    A list of tags used to associate different resources.
    document String
    camRoleId String
    ID of the resource.
    consoleLogin Boolean
    Indicates whether the CAM role can login or not.
    description String
    Description of the CAM role.
    name String
    Name of CAM role.
    sessionDuration Number
    The maximum validity period of the temporary key for creating a role.
    tags Map<String>
    A list of tags used to associate different resources.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CamRole resource produces the following output properties:

    CreateTime string
    Create time of the CAM role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    RoleArn Information for Roles.
    UpdateTime string
    The last update time of the CAM role.
    CreateTime string
    Create time of the CAM role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    RoleArn Information for Roles.
    UpdateTime string
    The last update time of the CAM role.
    createTime String
    Create time of the CAM role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    RoleArn Information for Roles.
    updateTime String
    The last update time of the CAM role.
    createTime string
    Create time of the CAM role.
    id string
    The provider-assigned unique ID for this managed resource.
    roleArn string
    RoleArn Information for Roles.
    updateTime string
    The last update time of the CAM role.
    create_time str
    Create time of the CAM role.
    id str
    The provider-assigned unique ID for this managed resource.
    role_arn str
    RoleArn Information for Roles.
    update_time str
    The last update time of the CAM role.
    createTime String
    Create time of the CAM role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    RoleArn Information for Roles.
    updateTime String
    The last update time of the CAM role.

    Look up Existing CamRole Resource

    Get an existing CamRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CamRoleState, opts?: CustomResourceOptions): CamRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cam_role_id: Optional[str] = None,
            console_login: Optional[bool] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            document: Optional[str] = None,
            name: Optional[str] = None,
            role_arn: Optional[str] = None,
            session_duration: Optional[float] = None,
            tags: Optional[Mapping[str, str]] = None,
            update_time: Optional[str] = None) -> CamRole
    func GetCamRole(ctx *Context, name string, id IDInput, state *CamRoleState, opts ...ResourceOption) (*CamRole, error)
    public static CamRole Get(string name, Input<string> id, CamRoleState? state, CustomResourceOptions? opts = null)
    public static CamRole get(String name, Output<String> id, CamRoleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CamRole    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CamRoleId string
    ID of the resource.
    ConsoleLogin bool
    Indicates whether the CAM role can login or not.
    CreateTime string
    Create time of the CAM role.
    Description string
    Description of the CAM role.
    Document string
    Name string
    Name of CAM role.
    RoleArn string
    RoleArn Information for Roles.
    SessionDuration double
    The maximum validity period of the temporary key for creating a role.
    Tags Dictionary<string, string>
    A list of tags used to associate different resources.
    UpdateTime string
    The last update time of the CAM role.
    CamRoleId string
    ID of the resource.
    ConsoleLogin bool
    Indicates whether the CAM role can login or not.
    CreateTime string
    Create time of the CAM role.
    Description string
    Description of the CAM role.
    Document string
    Name string
    Name of CAM role.
    RoleArn string
    RoleArn Information for Roles.
    SessionDuration float64
    The maximum validity period of the temporary key for creating a role.
    Tags map[string]string
    A list of tags used to associate different resources.
    UpdateTime string
    The last update time of the CAM role.
    camRoleId String
    ID of the resource.
    consoleLogin Boolean
    Indicates whether the CAM role can login or not.
    createTime String
    Create time of the CAM role.
    description String
    Description of the CAM role.
    document String
    name String
    Name of CAM role.
    roleArn String
    RoleArn Information for Roles.
    sessionDuration Double
    The maximum validity period of the temporary key for creating a role.
    tags Map<String,String>
    A list of tags used to associate different resources.
    updateTime String
    The last update time of the CAM role.
    camRoleId string
    ID of the resource.
    consoleLogin boolean
    Indicates whether the CAM role can login or not.
    createTime string
    Create time of the CAM role.
    description string
    Description of the CAM role.
    document string
    name string
    Name of CAM role.
    roleArn string
    RoleArn Information for Roles.
    sessionDuration number
    The maximum validity period of the temporary key for creating a role.
    tags {[key: string]: string}
    A list of tags used to associate different resources.
    updateTime string
    The last update time of the CAM role.
    cam_role_id str
    ID of the resource.
    console_login bool
    Indicates whether the CAM role can login or not.
    create_time str
    Create time of the CAM role.
    description str
    Description of the CAM role.
    document str
    name str
    Name of CAM role.
    role_arn str
    RoleArn Information for Roles.
    session_duration float
    The maximum validity period of the temporary key for creating a role.
    tags Mapping[str, str]
    A list of tags used to associate different resources.
    update_time str
    The last update time of the CAM role.
    camRoleId String
    ID of the resource.
    consoleLogin Boolean
    Indicates whether the CAM role can login or not.
    createTime String
    Create time of the CAM role.
    description String
    Description of the CAM role.
    document String
    name String
    Name of CAM role.
    roleArn String
    RoleArn Information for Roles.
    sessionDuration Number
    The maximum validity period of the temporary key for creating a role.
    tags Map<String>
    A list of tags used to associate different resources.
    updateTime String
    The last update time of the CAM role.

    Import

    CAM role can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/camRole:CamRole example 4611686018427733635
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack