1. Packages
  2. Volcengine
  3. API Docs
  4. tls
  5. Tag
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

    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.Tag("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;
    export const tlsTagResourceNewId = foo.id;
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    # Example: Add tags to a TLS topic
    foo = volcengine.tls.Tag("foo",
        resource_id="bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
        resource_type="project",
        tags=[
            volcengine.tls.TagTagArgs(
                key="environment",
                value="production",
            ),
            volcengine.tls.TagTagArgs(
                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)
    pulumi.export("tlsTagResourceNewId", foo.id)
    
    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.NewTag(ctx, "foo", &tls.TagArgs{
    			ResourceId:   pulumi.String("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac"),
    			ResourceType: pulumi.String("project"),
    			Tags: tls.TagTagArray{
    				&tls.TagTagArgs{
    					Key:   pulumi.String("environment"),
    					Value: pulumi.String("production"),
    				},
    				&tls.TagTagArgs{
    					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)
    		ctx.Export("tlsTagResourceNewId", foo.ID())
    		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.Tag("foo", new()
        {
            ResourceId = "bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
            ResourceType = "project",
            Tags = new[]
            {
                new Volcengine.Tls.Inputs.TagTagArgs
                {
                    Key = "environment",
                    Value = "production",
                },
                new Volcengine.Tls.Inputs.TagTagArgs
                {
                    Key = "key1",
                    Value = "value2",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["tlsTagId"] = foo.Id,
            ["tlsTagResourceId"] = foo.ResourceId,
            ["tlsTagResourceType"] = foo.ResourceType,
            ["tlsTagTags"] = foo.Tags,
            ["tlsTagResourceNewId"] = foo.Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.tls.Tag;
    import com.pulumi.volcengine.tls.TagArgs;
    import com.pulumi.volcengine.tls.inputs.TagTagArgs;
    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 Tag("foo", TagArgs.builder()        
                .resourceId("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac")
                .resourceType("project")
                .tags(            
                    TagTagArgs.builder()
                        .key("environment")
                        .value("production")
                        .build(),
                    TagTagArgs.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());
            ctx.export("tlsTagResourceNewId", foo.id());
        }
    }
    
    resources:
      # Example: Add tags to a TLS topic
      foo:
        type: volcengine:tls:Tag
        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}
      tlsTagResourceNewId: ${foo.id}
    

    Create Tag Resource

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

    Constructor syntax

    new Tag(name: string, args: TagArgs, opts?: CustomResourceOptions);
    @overload
    def Tag(resource_name: str,
            args: TagArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Tag(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            resource_id: Optional[str] = None,
            resource_type: Optional[str] = None,
            tags: Optional[Sequence[TagTagArgs]] = None)
    func NewTag(ctx *Context, name string, args TagArgs, opts ...ResourceOption) (*Tag, error)
    public Tag(string name, TagArgs args, CustomResourceOptions? opts = null)
    public Tag(String name, TagArgs args)
    public Tag(String name, TagArgs args, CustomResourceOptions options)
    
    type: volcengine:tls:Tag
    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 TagArgs
    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 TagArgs
    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 TagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagArgs
    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 exampletagResourceResourceFromTlstag = new Volcengine.Tls.Tag("exampletagResourceResourceFromTlstag", new()
    {
        ResourceId = "string",
        ResourceType = "string",
        Tags = new[]
        {
            new Volcengine.Tls.Inputs.TagTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
    });
    
    example, err := tls.NewTag(ctx, "exampletagResourceResourceFromTlstag", &tls.TagArgs{
    	ResourceId:   pulumi.String("string"),
    	ResourceType: pulumi.String("string"),
    	Tags: tls.TagTagArray{
    		&tls.TagTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    })
    
    var exampletagResourceResourceFromTlstag = new com.pulumi.volcengine.tls.Tag("exampletagResourceResourceFromTlstag", com.pulumi.volcengine.tls.TagArgs.builder()
        .resourceId("string")
        .resourceType("string")
        .tags(TagTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build());
    
    exampletag_resource_resource_from_tlstag = volcengine.tls.Tag("exampletagResourceResourceFromTlstag",
        resource_id="string",
        resource_type="string",
        tags=[{
            "key": "string",
            "value": "string",
        }])
    
    const exampletagResourceResourceFromTlstag = new volcengine.tls.Tag("exampletagResourceResourceFromTlstag", {
        resourceId: "string",
        resourceType: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
    });
    
    type: volcengine:tls:Tag
    properties:
        resourceId: string
        resourceType: string
        tags:
            - key: string
              value: string
    

    Tag 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 Tag 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<TagTag>
    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 []TagTagArgs
    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<TagTag>
    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 TagTag[]
    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[TagTagArgs]
    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 Tag 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 Tag Resource

    Get an existing Tag 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?: TagState, opts?: CustomResourceOptions): Tag
    @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[TagTagArgs]] = None) -> Tag
    func GetTag(ctx *Context, name string, id IDInput, state *TagState, opts ...ResourceOption) (*Tag, error)
    public static Tag Get(string name, Input<string> id, TagState? state, CustomResourceOptions? opts = null)
    public static Tag get(String name, Output<String> id, TagState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:tls:Tag    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<TagTag>
    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 []TagTagArgs
    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<TagTag>
    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 TagTag[]
    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[TagTagArgs]
    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

    TagTag, TagTagArgs

    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/tag:Tag 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