tencentcloud.CamServiceLinkedRole
Explore with Pulumi AI
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:
- Qcs
Service List<string>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- Cam
Service stringLinked Role Id - ID of the resource.
- Custom
Suffix 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.
- Dictionary<string, string>
- Tag description list.
- Qcs
Service []stringNames - Authorization service, the Tencent Cloud service principal with this role attached.
- Cam
Service stringLinked Role Id - ID of the resource.
- Custom
Suffix 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.
- map[string]string
- Tag description list.
- qcs
Service List<String>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- cam
Service StringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- Map<String,String>
- Tag description list.
- qcs
Service string[]Names - Authorization service, the Tencent Cloud service principal with this role attached.
- cam
Service stringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- {[key: string]: string}
- Tag description list.
- qcs_
service_ Sequence[str]names - Authorization service, the Tencent Cloud service principal with this role attached.
- cam_
service_ strlinked_ role_ id - 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.
- Mapping[str, str]
- Tag description list.
- qcs
Service List<String>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- cam
Service StringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- 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.
- Cam
Service stringLinked Role Id - ID of the resource.
- Custom
Suffix 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.
- Qcs
Service List<string>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- Dictionary<string, string>
- Tag description list.
- Cam
Service stringLinked Role Id - ID of the resource.
- Custom
Suffix 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.
- Qcs
Service []stringNames - Authorization service, the Tencent Cloud service principal with this role attached.
- map[string]string
- Tag description list.
- cam
Service StringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- qcs
Service List<String>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- Map<String,String>
- Tag description list.
- cam
Service stringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- qcs
Service string[]Names - Authorization service, the Tencent Cloud service principal with this role attached.
- {[key: string]: string}
- Tag description list.
- cam_
service_ strlinked_ role_ id - 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_ Sequence[str]names - Authorization service, the Tencent Cloud service principal with this role attached.
- Mapping[str, str]
- Tag description list.
- cam
Service StringLinked Role Id - ID of the resource.
- custom
Suffix 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.
- qcs
Service List<String>Names - Authorization service, the Tencent Cloud service principal with this role attached.
- 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.