1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. tag
  5. MetaTag
Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi

alicloud.tag.MetaTag

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi

    Provides a Tag Meta Tag resource.

    For information about Tag Meta Tag and how to use it, see What is Meta Tag.

    NOTE: Available since v1.209.0.

    NOTE: Meta Tag Only Support cn-hangzhou Region

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.tag.MetaTag("example", {
        key: "Name1",
        values: ["Desc2"],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.tag.MetaTag("example",
        key="Name1",
        values=["Desc2"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/tag"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tag.NewMetaTag(ctx, "example", &tag.MetaTagArgs{
    			Key: pulumi.String("Name1"),
    			Values: pulumi.StringArray{
    				pulumi.String("Desc2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Tag.MetaTag("example", new()
        {
            Key = "Name1",
            Values = new[]
            {
                "Desc2",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.tag.MetaTag;
    import com.pulumi.alicloud.tag.MetaTagArgs;
    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 MetaTag("example", MetaTagArgs.builder()        
                .key("Name1")
                .values("Desc2")
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:tag:MetaTag
        properties:
          key: Name1
          values:
            - Desc2
    

    Create MetaTag Resource

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

    Constructor syntax

    new MetaTag(name: string, args: MetaTagArgs, opts?: CustomResourceOptions);
    @overload
    def MetaTag(resource_name: str,
                args: MetaTagArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetaTag(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                key: Optional[str] = None,
                values: Optional[Sequence[str]] = None)
    func NewMetaTag(ctx *Context, name string, args MetaTagArgs, opts ...ResourceOption) (*MetaTag, error)
    public MetaTag(string name, MetaTagArgs args, CustomResourceOptions? opts = null)
    public MetaTag(String name, MetaTagArgs args)
    public MetaTag(String name, MetaTagArgs args, CustomResourceOptions options)
    
    type: alicloud:tag:MetaTag
    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 MetaTagArgs
    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 MetaTagArgs
    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 MetaTagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetaTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetaTagArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var metaTagResource = new AliCloud.Tag.MetaTag("metaTagResource", new()
    {
        Key = "string",
        Values = new[]
        {
            "string",
        },
    });
    
    example, err := tag.NewMetaTag(ctx, "metaTagResource", &tag.MetaTagArgs{
    	Key: pulumi.String("string"),
    	Values: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var metaTagResource = new MetaTag("metaTagResource", MetaTagArgs.builder()        
        .key("string")
        .values("string")
        .build());
    
    meta_tag_resource = alicloud.tag.MetaTag("metaTagResource",
        key="string",
        values=["string"])
    
    const metaTagResource = new alicloud.tag.MetaTag("metaTagResource", {
        key: "string",
        values: ["string"],
    });
    
    type: alicloud:tag:MetaTag
    properties:
        key: string
        values:
            - string
    

    MetaTag Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The MetaTag resource accepts the following input properties:

    Key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    Values List<string>
    The values of the tag meta tag.
    Key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    Values []string
    The values of the tag meta tag.
    key String
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values List<String>
    The values of the tag meta tag.
    key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values string[]
    The values of the tag meta tag.
    key str
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values Sequence[str]
    The values of the tag meta tag.
    key String
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values List<String>
    The values of the tag meta tag.

    Outputs

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

    Get an existing MetaTag 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?: MetaTagState, opts?: CustomResourceOptions): MetaTag
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            key: Optional[str] = None,
            values: Optional[Sequence[str]] = None) -> MetaTag
    func GetMetaTag(ctx *Context, name string, id IDInput, state *MetaTagState, opts ...ResourceOption) (*MetaTag, error)
    public static MetaTag Get(string name, Input<string> id, MetaTagState? state, CustomResourceOptions? opts = null)
    public static MetaTag get(String name, Output<String> id, MetaTagState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    Values List<string>
    The values of the tag meta tag.
    Key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    Values []string
    The values of the tag meta tag.
    key String
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values List<String>
    The values of the tag meta tag.
    key string
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values string[]
    The values of the tag meta tag.
    key str
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values Sequence[str]
    The values of the tag meta tag.
    key String
    The key of the tag meta tag. key must be 1 to 128 characters in length.
    values List<String>
    The values of the tag meta tag.

    Import

    Tag Meta Tag can be imported using the id, e.g.

    $ pulumi import alicloud:tag/metaTag:MetaTag example <regionId>:<key>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi