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

tencentcloud.CamServiceLinkedRole

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 service linked role

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CamServiceLinkedRole("example", {
        customSuffix: "tf-example",
        description: "description.",
        qcsServiceNames: [
            "cvm.qcloud.com",
            "ekslog.tke.cloud.tencent.com",
        ],
        tags: {
            createdBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CamServiceLinkedRole("example",
        custom_suffix="tf-example",
        description="description.",
        qcs_service_names=[
            "cvm.qcloud.com",
            "ekslog.tke.cloud.tencent.com",
        ],
        tags={
            "createdBy": "Terraform",
        })
    
    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.NewCamServiceLinkedRole(ctx, "example", &tencentcloud.CamServiceLinkedRoleArgs{
    			CustomSuffix: pulumi.String("tf-example"),
    			Description:  pulumi.String("description."),
    			QcsServiceNames: pulumi.StringArray{
    				pulumi.String("cvm.qcloud.com"),
    				pulumi.String("ekslog.tke.cloud.tencent.com"),
    			},
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("Terraform"),
    			},
    		})
    		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 = new Tencentcloud.CamServiceLinkedRole("example", new()
        {
            CustomSuffix = "tf-example",
            Description = "description.",
            QcsServiceNames = new[]
            {
                "cvm.qcloud.com",
                "ekslog.tke.cloud.tencent.com",
            },
            Tags = 
            {
                { "createdBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CamServiceLinkedRole;
    import com.pulumi.tencentcloud.CamServiceLinkedRoleArgs;
    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 CamServiceLinkedRole("example", CamServiceLinkedRoleArgs.builder()
                .customSuffix("tf-example")
                .description("description.")
                .qcsServiceNames(            
                    "cvm.qcloud.com",
                    "ekslog.tke.cloud.tencent.com")
                .tags(Map.of("createdBy", "Terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CamServiceLinkedRole
        properties:
          customSuffix: tf-example
          description: description.
          qcsServiceNames:
            - cvm.qcloud.com
            - ekslog.tke.cloud.tencent.com
          tags:
            createdBy: Terraform
    

    Create CamServiceLinkedRole Resource

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

    Constructor syntax

    new CamServiceLinkedRole(name: string, args: CamServiceLinkedRoleArgs, opts?: CustomResourceOptions);
    @overload
    def CamServiceLinkedRole(resource_name: str,
                             args: CamServiceLinkedRoleArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def CamServiceLinkedRole(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             qcs_service_names: Optional[Sequence[str]] = None,
                             cam_service_linked_role_id: Optional[str] = None,
                             custom_suffix: Optional[str] = None,
                             description: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None)
    func NewCamServiceLinkedRole(ctx *Context, name string, args CamServiceLinkedRoleArgs, opts ...ResourceOption) (*CamServiceLinkedRole, error)
    public CamServiceLinkedRole(string name, CamServiceLinkedRoleArgs args, CustomResourceOptions? opts = null)
    public CamServiceLinkedRole(String name, CamServiceLinkedRoleArgs args)
    public CamServiceLinkedRole(String name, CamServiceLinkedRoleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CamServiceLinkedRole
    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 CamServiceLinkedRoleArgs
    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 CamServiceLinkedRoleArgs
    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 CamServiceLinkedRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CamServiceLinkedRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CamServiceLinkedRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CamServiceLinkedRole 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 CamServiceLinkedRole resource accepts the following input properties:

    QcsServiceNames List<string>
    Authorization service, the Tencent Cloud service principal with this role attached.
    CamServiceLinkedRoleId string
    ID of the resource.
    CustomSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    Description string
    role description.
    Tags Dictionary<string, string>
    Tag description list.
    QcsServiceNames []string
    Authorization service, the Tencent Cloud service principal with this role attached.
    CamServiceLinkedRoleId string
    ID of the resource.
    CustomSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    Description string
    role description.
    Tags map[string]string
    Tag description list.
    qcsServiceNames List<String>
    Authorization service, the Tencent Cloud service principal with this role attached.
    camServiceLinkedRoleId String
    ID of the resource.
    customSuffix String
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description String
    role description.
    tags Map<String,String>
    Tag description list.
    qcsServiceNames string[]
    Authorization service, the Tencent Cloud service principal with this role attached.
    camServiceLinkedRoleId string
    ID of the resource.
    customSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description string
    role description.
    tags {[key: string]: string}
    Tag description list.
    qcs_service_names Sequence[str]
    Authorization service, the Tencent Cloud service principal with this role attached.
    cam_service_linked_role_id str
    ID of the resource.
    custom_suffix str
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description str
    role description.
    tags Mapping[str, str]
    Tag description list.
    qcsServiceNames List<String>
    Authorization service, the Tencent Cloud service principal with this role attached.
    camServiceLinkedRoleId String
    ID of the resource.
    customSuffix String
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description String
    role description.
    tags Map<String>
    Tag description list.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CamServiceLinkedRole Resource

    Get an existing CamServiceLinkedRole 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?: CamServiceLinkedRoleState, opts?: CustomResourceOptions): CamServiceLinkedRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cam_service_linked_role_id: Optional[str] = None,
            custom_suffix: Optional[str] = None,
            description: Optional[str] = None,
            qcs_service_names: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None) -> CamServiceLinkedRole
    func GetCamServiceLinkedRole(ctx *Context, name string, id IDInput, state *CamServiceLinkedRoleState, opts ...ResourceOption) (*CamServiceLinkedRole, error)
    public static CamServiceLinkedRole Get(string name, Input<string> id, CamServiceLinkedRoleState? state, CustomResourceOptions? opts = null)
    public static CamServiceLinkedRole get(String name, Output<String> id, CamServiceLinkedRoleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CamServiceLinkedRole    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:
    CamServiceLinkedRoleId string
    ID of the resource.
    CustomSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    Description string
    role description.
    QcsServiceNames List<string>
    Authorization service, the Tencent Cloud service principal with this role attached.
    Tags Dictionary<string, string>
    Tag description list.
    CamServiceLinkedRoleId string
    ID of the resource.
    CustomSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    Description string
    role description.
    QcsServiceNames []string
    Authorization service, the Tencent Cloud service principal with this role attached.
    Tags map[string]string
    Tag description list.
    camServiceLinkedRoleId String
    ID of the resource.
    customSuffix String
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description String
    role description.
    qcsServiceNames List<String>
    Authorization service, the Tencent Cloud service principal with this role attached.
    tags Map<String,String>
    Tag description list.
    camServiceLinkedRoleId string
    ID of the resource.
    customSuffix string
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description string
    role description.
    qcsServiceNames string[]
    Authorization service, the Tencent Cloud service principal with this role attached.
    tags {[key: string]: string}
    Tag description list.
    cam_service_linked_role_id str
    ID of the resource.
    custom_suffix str
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description str
    role description.
    qcs_service_names Sequence[str]
    Authorization service, the Tencent Cloud service principal with this role attached.
    tags Mapping[str, str]
    Tag description list.
    camServiceLinkedRoleId String
    ID of the resource.
    customSuffix String
    The custom suffix, based on the string you provide, is combined with the prefix provided by the service to form the full role name. This field is not allowed to contain the character _.
    description String
    role description.
    qcsServiceNames List<String>
    Authorization service, the Tencent Cloud service principal with this role attached.
    tags Map<String>
    Tag description list.

    Import

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

    $ pulumi import tencentcloud:index/camServiceLinkedRole:CamServiceLinkedRole example 4611686018441982195
    

    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