tencentcloud.CamTagRoleAttachment
Explore with Pulumi AI
Provides a resource to create a CAM tag role
Example Usage
Create by role_id
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CamTagRoleAttachment("example", {
roleId: "4611686018441060141",
tags: [{
key: "tagKey",
value: "tagValue",
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CamTagRoleAttachment("example",
role_id="4611686018441060141",
tags=[{
"key": "tagKey",
"value": "tagValue",
}])
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.NewCamTagRoleAttachment(ctx, "example", &tencentcloud.CamTagRoleAttachmentArgs{
RoleId: pulumi.String("4611686018441060141"),
Tags: tencentcloud.CamTagRoleAttachmentTagArray{
&tencentcloud.CamTagRoleAttachmentTagArgs{
Key: pulumi.String("tagKey"),
Value: pulumi.String("tagValue"),
},
},
})
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.CamTagRoleAttachment("example", new()
{
RoleId = "4611686018441060141",
Tags = new[]
{
new Tencentcloud.Inputs.CamTagRoleAttachmentTagArgs
{
Key = "tagKey",
Value = "tagValue",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CamTagRoleAttachment;
import com.pulumi.tencentcloud.CamTagRoleAttachmentArgs;
import com.pulumi.tencentcloud.inputs.CamTagRoleAttachmentTagArgs;
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 CamTagRoleAttachment("example", CamTagRoleAttachmentArgs.builder()
.roleId("4611686018441060141")
.tags(CamTagRoleAttachmentTagArgs.builder()
.key("tagKey")
.value("tagValue")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:CamTagRoleAttachment
properties:
roleId: '4611686018441060141'
tags:
- key: tagKey
value: tagValue
Create by role_name
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CamTagRoleAttachment("example", {
roleName: "tf-example",
tags: [{
key: "tagKey",
value: "tagValue",
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CamTagRoleAttachment("example",
role_name="tf-example",
tags=[{
"key": "tagKey",
"value": "tagValue",
}])
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.NewCamTagRoleAttachment(ctx, "example", &tencentcloud.CamTagRoleAttachmentArgs{
RoleName: pulumi.String("tf-example"),
Tags: tencentcloud.CamTagRoleAttachmentTagArray{
&tencentcloud.CamTagRoleAttachmentTagArgs{
Key: pulumi.String("tagKey"),
Value: pulumi.String("tagValue"),
},
},
})
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.CamTagRoleAttachment("example", new()
{
RoleName = "tf-example",
Tags = new[]
{
new Tencentcloud.Inputs.CamTagRoleAttachmentTagArgs
{
Key = "tagKey",
Value = "tagValue",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CamTagRoleAttachment;
import com.pulumi.tencentcloud.CamTagRoleAttachmentArgs;
import com.pulumi.tencentcloud.inputs.CamTagRoleAttachmentTagArgs;
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 CamTagRoleAttachment("example", CamTagRoleAttachmentArgs.builder()
.roleName("tf-example")
.tags(CamTagRoleAttachmentTagArgs.builder()
.key("tagKey")
.value("tagValue")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:CamTagRoleAttachment
properties:
roleName: tf-example
tags:
- key: tagKey
value: tagValue
Create CamTagRoleAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CamTagRoleAttachment(name: string, args: CamTagRoleAttachmentArgs, opts?: CustomResourceOptions);
@overload
def CamTagRoleAttachment(resource_name: str,
args: CamTagRoleAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CamTagRoleAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
tags: Optional[Sequence[CamTagRoleAttachmentTagArgs]] = None,
cam_tag_role_attachment_id: Optional[str] = None,
role_id: Optional[str] = None,
role_name: Optional[str] = None)
func NewCamTagRoleAttachment(ctx *Context, name string, args CamTagRoleAttachmentArgs, opts ...ResourceOption) (*CamTagRoleAttachment, error)
public CamTagRoleAttachment(string name, CamTagRoleAttachmentArgs args, CustomResourceOptions? opts = null)
public CamTagRoleAttachment(String name, CamTagRoleAttachmentArgs args)
public CamTagRoleAttachment(String name, CamTagRoleAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:CamTagRoleAttachment
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 CamTagRoleAttachmentArgs
- 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 CamTagRoleAttachmentArgs
- 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 CamTagRoleAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CamTagRoleAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CamTagRoleAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CamTagRoleAttachment 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 CamTagRoleAttachment resource accepts the following input properties:
- List<Cam
Tag Role Attachment Tag> - Label.
- Cam
Tag stringRole Attachment Id - ID of the resource.
- Role
Id string - Character ID, at least one input with the character name.
- Role
Name string - Character name, at least one input with the character ID.
- []Cam
Tag Role Attachment Tag Args - Label.
- Cam
Tag stringRole Attachment Id - ID of the resource.
- Role
Id string - Character ID, at least one input with the character name.
- Role
Name string - Character name, at least one input with the character ID.
- List<Cam
Tag Role Attachment Tag> - Label.
- cam
Tag StringRole Attachment Id - ID of the resource.
- role
Id String - Character ID, at least one input with the character name.
- role
Name String - Character name, at least one input with the character ID.
- Cam
Tag Role Attachment Tag[] - Label.
- cam
Tag stringRole Attachment Id - ID of the resource.
- role
Id string - Character ID, at least one input with the character name.
- role
Name string - Character name, at least one input with the character ID.
- Sequence[Cam
Tag Role Attachment Tag Args] - Label.
- cam_
tag_ strrole_ attachment_ id - ID of the resource.
- role_
id str - Character ID, at least one input with the character name.
- role_
name str - Character name, at least one input with the character ID.
- List<Property Map>
- Label.
- cam
Tag StringRole Attachment Id - ID of the resource.
- role
Id String - Character ID, at least one input with the character name.
- role
Name String - Character name, at least one input with the character ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the CamTagRoleAttachment 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 CamTagRoleAttachment Resource
Get an existing CamTagRoleAttachment 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?: CamTagRoleAttachmentState, opts?: CustomResourceOptions): CamTagRoleAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cam_tag_role_attachment_id: Optional[str] = None,
role_id: Optional[str] = None,
role_name: Optional[str] = None,
tags: Optional[Sequence[CamTagRoleAttachmentTagArgs]] = None) -> CamTagRoleAttachment
func GetCamTagRoleAttachment(ctx *Context, name string, id IDInput, state *CamTagRoleAttachmentState, opts ...ResourceOption) (*CamTagRoleAttachment, error)
public static CamTagRoleAttachment Get(string name, Input<string> id, CamTagRoleAttachmentState? state, CustomResourceOptions? opts = null)
public static CamTagRoleAttachment get(String name, Output<String> id, CamTagRoleAttachmentState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CamTagRoleAttachment 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
Tag stringRole Attachment Id - ID of the resource.
- Role
Id string - Character ID, at least one input with the character name.
- Role
Name string - Character name, at least one input with the character ID.
- List<Cam
Tag Role Attachment Tag> - Label.
- Cam
Tag stringRole Attachment Id - ID of the resource.
- Role
Id string - Character ID, at least one input with the character name.
- Role
Name string - Character name, at least one input with the character ID.
- []Cam
Tag Role Attachment Tag Args - Label.
- cam
Tag StringRole Attachment Id - ID of the resource.
- role
Id String - Character ID, at least one input with the character name.
- role
Name String - Character name, at least one input with the character ID.
- List<Cam
Tag Role Attachment Tag> - Label.
- cam
Tag stringRole Attachment Id - ID of the resource.
- role
Id string - Character ID, at least one input with the character name.
- role
Name string - Character name, at least one input with the character ID.
- Cam
Tag Role Attachment Tag[] - Label.
- cam_
tag_ strrole_ attachment_ id - ID of the resource.
- role_
id str - Character ID, at least one input with the character name.
- role_
name str - Character name, at least one input with the character ID.
- Sequence[Cam
Tag Role Attachment Tag Args] - Label.
- cam
Tag StringRole Attachment Id - ID of the resource.
- role
Id String - Character ID, at least one input with the character name.
- role
Name String - Character name, at least one input with the character ID.
- List<Property Map>
- Label.
Supporting Types
CamTagRoleAttachmentTag, CamTagRoleAttachmentTagArgs
Import
CAM tag role can be imported using the id, e.g.
Please use role_name#role_id
$ pulumi import tencentcloud:index/camTagRoleAttachment:CamTagRoleAttachment example tf-example#4611686018441060141
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.