AWS Classic
getDefaultTags
Example Usage
Basic Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.GetDefaultTags.InvokeAsync());
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aws.GetDefaultTags(ctx, nil, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(AwsFunctions.getDefaultTags());
}
}
import pulumi
import pulumi_aws as aws
example = aws.get_default_tags()
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.getDefaultTags());
variables:
example:
Fn::Invoke:
Function: aws:getDefaultTags
Arguments: {}
Dynamically Apply Default Tags to Auto Scaling Group
Coming soon!
Coming soon!
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleDefaultTags = Output.of(AwsFunctions.getDefaultTags());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.dynamic(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
}
}
Coming soon!
Coming soon!
resources:
exampleGroup:
type: aws:autoscaling:Group
properties:
dynamic:
- forEach: ${exampleDefaultTags.tags}
content:
- key: ${tag.key}
value: ${tag.value}
propagateAtLaunch: true
variables:
exampleDefaultTags:
Fn::Invoke:
Function: aws:getDefaultTags
Arguments: {}
Using getDefaultTags
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 getDefaultTags(args: GetDefaultTagsArgs, opts?: InvokeOptions): Promise<GetDefaultTagsResult>
function getDefaultTagsOutput(args: GetDefaultTagsOutputArgs, opts?: InvokeOptions): Output<GetDefaultTagsResult>
def get_default_tags(tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetDefaultTagsResult
def get_default_tags_output(tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDefaultTagsResult]
func GetDefaultTags(ctx *Context, args *GetDefaultTagsArgs, opts ...InvokeOption) (*GetDefaultTagsResult, error)
func GetDefaultTagsOutput(ctx *Context, args *GetDefaultTagsOutputArgs, opts ...InvokeOption) GetDefaultTagsResultOutput
> Note: This function is named GetDefaultTags
in the Go SDK.
public static class GetDefaultTags
{
public static Task<GetDefaultTagsResult> InvokeAsync(GetDefaultTagsArgs args, InvokeOptions? opts = null)
public static Output<GetDefaultTagsResult> Invoke(GetDefaultTagsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDefaultTagsResult> getDefaultTags(GetDefaultTagsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:index/getDefaultTags:getDefaultTags
Arguments:
# Arguments dictionary
The following arguments are supported:
- Dictionary<string, string>
Blocks of default tags set on the provider. See details below.
- map[string]string
Blocks of default tags set on the provider. See details below.
- Map<String,String>
Blocks of default tags set on the provider. See details below.
- {[key: string]: string}
Blocks of default tags set on the provider. See details below.
- Mapping[str, str]
Blocks of default tags set on the provider. See details below.
- Map<String>
Blocks of default tags set on the provider. See details below.
getDefaultTags Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
Blocks of default tags set on the provider. See details below.
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
Blocks of default tags set on the provider. See details below.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String,String>
Blocks of default tags set on the provider. See details below.
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
Blocks of default tags set on the provider. See details below.
- id str
The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
Blocks of default tags set on the provider. See details below.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String>
Blocks of default tags set on the provider. See details below.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.