Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.tag.getMetaTags
Explore with Pulumi AI
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:
- Key
Name string - The name of the key.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Key
Name string - The name of the key.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- key
Name String - The name of the key.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- key
Name string - The name of the key.
- output
File 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
).
- key
Name String - The name of the key.
- output
File 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.
- List<Pulumi.
Ali Cloud. Tag. Outputs. Get Meta Tags Tag> - Key
Name string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- []Get
Meta Tags Tag - Key
Name string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- List<Get
Meta Tags Tag> - key
Name String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- Get
Meta Tags Tag[] - key
Name string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- Sequence[Get
Meta Tags Tag] - key_
name str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- List<Property Map>
- key
Name String - output
File String
Supporting Types
GetMetaTagsTag
- category str
- The type of the resource tags.
- key_
name str - The name of the key.
- value_
name str - 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.