1. Packages
  2. Alicloud Provider
  3. API Docs
  4. tag
  5. getMetaTags
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.tag.getMetaTags

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the Tag Meta Tags of the current Alibaba Cloud user.

    NOTE: Available in v1.169.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.tag.getMetaTags({
        keyName: "example_value",
    });
    export const tagMetaTagDefault1 = _default.then(_default => _default.tags?.valueName);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.tag.get_meta_tags(key_name="example_value")
    pulumi.export("tagMetaTagDefault1", default.tags.value_name)
    
    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 {
    		_default, err := tag.GetMetaTags(ctx, &tag.GetMetaTagsArgs{
    			KeyName: pulumi.StringRef("example_value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("tagMetaTagDefault1", _default.Tags.ValueName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Tag.GetMetaTags.Invoke(new()
        {
            KeyName = "example_value",
        });
    
        return new Dictionary<string, object?>
        {
            ["tagMetaTagDefault1"] = @default.Apply(@default => @default.Apply(getMetaTagsResult => getMetaTagsResult.Tags?.ValueName)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.tag.TagFunctions;
    import com.pulumi.alicloud.tag.inputs.GetMetaTagsArgs;
    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) {
            final var default = TagFunctions.getMetaTags(GetMetaTagsArgs.builder()
                .keyName("example_value")
                .build());
    
            ctx.export("tagMetaTagDefault1", default_.tags().valueName());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:tag:getMetaTags
          Arguments:
            keyName: example_value
    outputs:
      tagMetaTagDefault1: ${default.tags.valueName}
    

    Using getMetaTags

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMetaTags(args: GetMetaTagsArgs, opts?: InvokeOptions): Promise<GetMetaTagsResult>
    function getMetaTagsOutput(args: GetMetaTagsOutputArgs, opts?: InvokeOptions): Output<GetMetaTagsResult>
    def get_meta_tags(key_name: Optional[str] = None,
                      output_file: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetMetaTagsResult
    def get_meta_tags_output(key_name: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetMetaTagsResult]
    func GetMetaTags(ctx *Context, args *GetMetaTagsArgs, opts ...InvokeOption) (*GetMetaTagsResult, error)
    func GetMetaTagsOutput(ctx *Context, args *GetMetaTagsOutputArgs, opts ...InvokeOption) GetMetaTagsResultOutput

    > Note: This function is named GetMetaTags in the Go SDK.

    public static class GetMetaTags 
    {
        public static Task<GetMetaTagsResult> InvokeAsync(GetMetaTagsArgs args, InvokeOptions? opts = null)
        public static Output<GetMetaTagsResult> Invoke(GetMetaTagsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMetaTagsResult> getMetaTags(GetMetaTagsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:tag/getMetaTags:getMetaTags
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyName string
    The name of the key.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    KeyName string
    The name of the key.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    keyName String
    The name of the key.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    keyName string
    The name of the key.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    key_name str
    The name of the key.
    output_file str
    File name where to save data source results (after running pulumi preview).
    keyName String
    The name of the key.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getMetaTags Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Tags List<Pulumi.AliCloud.Tag.Outputs.GetMetaTagsTag>
    KeyName string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Tags []GetMetaTagsTag
    KeyName string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    tags List<GetMetaTagsTag>
    keyName String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    tags GetMetaTagsTag[]
    keyName string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    tags Sequence[GetMetaTagsTag]
    key_name str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    tags List<Property Map>
    keyName String
    outputFile String

    Supporting Types

    GetMetaTagsTag

    Category string
    The type of the resource tags.
    KeyName string
    The name of the key.
    ValueName string
    The name of the value.
    Category string
    The type of the resource tags.
    KeyName string
    The name of the key.
    ValueName string
    The name of the value.
    category String
    The type of the resource tags.
    keyName String
    The name of the key.
    valueName String
    The name of the value.
    category string
    The type of the resource tags.
    keyName string
    The name of the key.
    valueName string
    The name of the value.
    category str
    The type of the resource tags.
    key_name str
    The name of the key.
    value_name str
    The name of the value.
    category String
    The type of the resource tags.
    keyName String
    The name of the key.
    valueName String
    The name of the value.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi