1. Packages
  2. Volcengine
  3. API Docs
  4. tls
  5. TagResource
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
volcengine logo
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine

    Provides a resource to manage tls tag resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    // Example: Add tags to a TLS topic
    const foo = new volcengine.tls.TagResource("foo", {
        resourceId: "bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
        resourceType: "project",
        tags: [
            {
                key: "environment",
                value: "production",
            },
            {
                key: "key1",
                value: "value2",
            },
        ],
    });
    export const tlsTagId = foo.id;
    export const tlsTagResourceId = foo.resourceId;
    export const tlsTagResourceType = foo.resourceType;
    export const tlsTagTags = foo.tags;
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    # Example: Add tags to a TLS topic
    foo = volcengine.tls.TagResource("foo",
        resource_id="bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
        resource_type="project",
        tags=[
            volcengine.tls.TagResourceTagArgs(
                key="environment",
                value="production",
            ),
            volcengine.tls.TagResourceTagArgs(
                key="key1",
                value="value2",
            ),
        ])
    pulumi.export("tlsTagId", foo.id)
    pulumi.export("tlsTagResourceId", foo.resource_id)
    pulumi.export("tlsTagResourceType", foo.resource_type)
    pulumi.export("tlsTagTags", foo.tags)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tls"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Example: Add tags to a TLS topic
    		foo, err := tls.NewTagResource(ctx, "foo", &tls.TagResourceArgs{
    			ResourceId:   pulumi.String("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac"),
    			ResourceType: pulumi.String("project"),
    			Tags: tls.TagResourceTagArray{
    				&tls.TagResourceTagArgs{
    					Key:   pulumi.String("environment"),
    					Value: pulumi.String("production"),
    				},
    				&tls.TagResourceTagArgs{
    					Key:   pulumi.String("key1"),
    					Value: pulumi.String("value2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("tlsTagId", foo.ID())
    		ctx.Export("tlsTagResourceId", foo.ResourceId)
    		ctx.Export("tlsTagResourceType", foo.ResourceType)
    		ctx.Export("tlsTagTags", foo.Tags)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        // Example: Add tags to a TLS topic
        var foo = new Volcengine.Tls.TagResource("foo", new()
        {
            ResourceId = "bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
            ResourceType = "project",
            Tags = new[]
            {
                new Volcengine.Tls.Inputs.TagResourceTagArgs
                {
                    Key = "environment",
                    Value = "production",
                },
                new Volcengine.Tls.Inputs.TagResourceTagArgs
                {
                    Key = "key1",
                    Value = "value2",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["tlsTagId"] = foo.Id,
            ["tlsTagResourceId"] = foo.ResourceId,
            ["tlsTagResourceType"] = foo.ResourceType,
            ["tlsTagTags"] = foo.Tags,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.tls.TagResource;
    import com.pulumi.volcengine.tls.TagResourceArgs;
    import com.pulumi.volcengine.tls.inputs.TagResourceTagArgs;
    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) {
            // Example: Add tags to a TLS topic
            var foo = new TagResource("foo", TagResourceArgs.builder()        
                .resourceId("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac")
                .resourceType("project")
                .tags(            
                    TagResourceTagArgs.builder()
                        .key("environment")
                        .value("production")
                        .build(),
                    TagResourceTagArgs.builder()
                        .key("key1")
                        .value("value2")
                        .build())
                .build());
    
            ctx.export("tlsTagId", foo.id());
            ctx.export("tlsTagResourceId", foo.resourceId());
            ctx.export("tlsTagResourceType", foo.resourceType());
            ctx.export("tlsTagTags", foo.tags());
        }
    }
    
    resources:
      # Example: Add tags to a TLS topic
      foo:
        type: volcengine:tls:TagResource
        properties:
          resourceId: bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac
          resourceType: project
          tags:
            - key: environment
              value: production
            - key: key1
              value: value2
    outputs:
      tlsTagId: ${foo.id}
      tlsTagResourceId: ${foo.resourceId}
      tlsTagResourceType: ${foo.resourceType}
      tlsTagTags: ${foo.tags}
    

    Create TagResource Resource

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

    Constructor syntax

    new TagResource(name: string, args: TagResourceArgs, opts?: CustomResourceOptions);
    @overload
    def TagResource(resource_name: str,
                    args: TagResourceArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TagResource(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    resource_id: Optional[str] = None,
                    resource_type: Optional[str] = None,
                    tags: Optional[Sequence[TagResourceTagArgs]] = None)
    func NewTagResource(ctx *Context, name string, args TagResourceArgs, opts ...ResourceOption) (*TagResource, error)
    public TagResource(string name, TagResourceArgs args, CustomResourceOptions? opts = null)
    public TagResource(String name, TagResourceArgs args)
    public TagResource(String name, TagResourceArgs args, CustomResourceOptions options)
    
    type: volcengine:tls:TagResource
    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 TagResourceArgs
    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 TagResourceArgs
    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 TagResourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagResourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var tagResourceResource = new Volcengine.Tls.TagResource("tagResourceResource", new()
    {
        ResourceId = "string",
        ResourceType = "string",
        Tags = new[]
        {
            new Volcengine.Tls.Inputs.TagResourceTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
    });
    
    example, err := tls.NewTagResource(ctx, "tagResourceResource", &tls.TagResourceArgs{
    	ResourceId:   pulumi.String("string"),
    	ResourceType: pulumi.String("string"),
    	Tags: tls.TagResourceTagArray{
    		&tls.TagResourceTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    })
    
    var tagResourceResource = new TagResource("tagResourceResource", TagResourceArgs.builder()
        .resourceId("string")
        .resourceType("string")
        .tags(TagResourceTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build());
    
    tag_resource_resource = volcengine.tls.TagResource("tagResourceResource",
        resource_id="string",
        resource_type="string",
        tags=[{
            "key": "string",
            "value": "string",
        }])
    
    const tagResourceResource = new volcengine.tls.TagResource("tagResourceResource", {
        resourceId: "string",
        resourceType: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
    });
    
    type: volcengine:tls:TagResource
    properties:
        resourceId: string
        resourceType: string
        tags:
            - key: string
              value: string
    

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

    ResourceId string
    The ID of the resource.
    ResourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    Tags List<TagResourceTag>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    ResourceId string
    The ID of the resource.
    ResourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    Tags []TagResourceTagArgs
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId String
    The ID of the resource.
    resourceType String
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags List<TagResourceTag>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId string
    The ID of the resource.
    resourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags TagResourceTag[]
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resource_id str
    The ID of the resource.
    resource_type str
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags Sequence[TagResourceTagArgs]
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId String
    The ID of the resource.
    resourceType String
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags List<Property Map>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TagResource 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 TagResource Resource

    Get an existing TagResource 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?: TagResourceState, opts?: CustomResourceOptions): TagResource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            resource_id: Optional[str] = None,
            resource_type: Optional[str] = None,
            tags: Optional[Sequence[TagResourceTagArgs]] = None) -> TagResource
    func GetTagResource(ctx *Context, name string, id IDInput, state *TagResourceState, opts ...ResourceOption) (*TagResource, error)
    public static TagResource Get(string name, Input<string> id, TagResourceState? state, CustomResourceOptions? opts = null)
    public static TagResource get(String name, Output<String> id, TagResourceState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:tls:TagResource    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:
    ResourceId string
    The ID of the resource.
    ResourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    Tags List<TagResourceTag>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    ResourceId string
    The ID of the resource.
    ResourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    Tags []TagResourceTagArgs
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId String
    The ID of the resource.
    resourceType String
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags List<TagResourceTag>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId string
    The ID of the resource.
    resourceType string
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags TagResourceTag[]
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resource_id str
    The ID of the resource.
    resource_type str
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags Sequence[TagResourceTagArgs]
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.
    resourceId String
    The ID of the resource.
    resourceType String
    The type of the resource. Valid values: project, topic, shipper, host_group, host, consumer_group, rule, alarm, alarm_notify_group, etl_task, import_task, schedule_sql_task, download_task, trace_instance.
    tags List<Property Map>
    Tags. The tag key must be unique within a resource, and the same tag key is not allowed to be repeated. The tag key must be 1 to 128 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@. The tag value can be empty and must be 0 to 256 characters long, and can contain letters, digits, spaces, and the following special characters: _.:/=+-@.

    Supporting Types

    TagResourceTag, TagResourceTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

    tls tag can be imported using the resource_id:resource_type, e.g.

    $ pulumi import volcengine:tls/tagResource:TagResource default resource-123456:project
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate