Lists the required tags for supported resource types in an AWS account. Required tags are defined through AWS Organizations tag policies.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.resourcegroupstaggingapi.getRequiredTags({});
import pulumi
import pulumi_aws as aws
example = aws.resourcegroupstaggingapi.get_required_tags()
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/resourcegroupstaggingapi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resourcegroupstaggingapi.GetRequiredTags(ctx, &resourcegroupstaggingapi.GetRequiredTagsArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.ResourceGroupsTaggingApi.GetRequiredTags.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;
import com.pulumi.aws.resourcegroupstaggingapi.inputs.GetRequiredTagsArgs;
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 example = ResourcegroupstaggingapiFunctions.getRequiredTags(GetRequiredTagsArgs.builder()
.build());
}
}
variables:
example:
fn::invoke:
function: aws:resourcegroupstaggingapi:getRequiredTags
arguments: {}
Using getRequiredTags
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 getRequiredTags(args: GetRequiredTagsArgs, opts?: InvokeOptions): Promise<GetRequiredTagsResult>
function getRequiredTagsOutput(args: GetRequiredTagsOutputArgs, opts?: InvokeOptions): Output<GetRequiredTagsResult>def get_required_tags(region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRequiredTagsResult
def get_required_tags_output(region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRequiredTagsResult]func GetRequiredTags(ctx *Context, args *GetRequiredTagsArgs, opts ...InvokeOption) (*GetRequiredTagsResult, error)
func GetRequiredTagsOutput(ctx *Context, args *GetRequiredTagsOutputArgs, opts ...InvokeOption) GetRequiredTagsResultOutput> Note: This function is named GetRequiredTags in the Go SDK.
public static class GetRequiredTags
{
public static Task<GetRequiredTagsResult> InvokeAsync(GetRequiredTagsArgs args, InvokeOptions? opts = null)
public static Output<GetRequiredTagsResult> Invoke(GetRequiredTagsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRequiredTagsResult> getRequiredTags(GetRequiredTagsArgs args, InvokeOptions options)
public static Output<GetRequiredTagsResult> getRequiredTags(GetRequiredTagsArgs args, InvokeOptions options)
fn::invoke:
function: aws:resourcegroupstaggingapi/getRequiredTags:getRequiredTags
arguments:
# arguments dictionaryThe following arguments are supported:
getRequiredTags Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
-
List<Get
Required Tags Required Tag> - List of required tag configurations. See
required_tagsbelow.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
-
[]Get
Required Tags Required Tag - List of required tag configurations. See
required_tagsbelow.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
-
List<Get
Required Tags Required Tag> - List of required tag configurations. See
required_tagsbelow.
- id string
- The provider-assigned unique ID for this managed resource.
- region string
-
Get
Required Tags Required Tag[] - List of required tag configurations. See
required_tagsbelow.
- id str
- The provider-assigned unique ID for this managed resource.
- region str
-
Sequence[Get
Required Tags Required Tag] - List of required tag configurations. See
required_tagsbelow.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- List<Property Map>
- List of required tag configurations. See
required_tagsbelow.
Supporting Types
GetRequiredTagsRequiredTag
- Cloud
Formation List<string>Resource Types - CloudFormation resource types assigned the required tag keys.
- Reporting
Tag List<string>Keys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - Resource
Type string - Resource type for the required tag keys.
- Cloud
Formation []stringResource Types - CloudFormation resource types assigned the required tag keys.
- Reporting
Tag []stringKeys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - Resource
Type string - Resource type for the required tag keys.
- cloud
Formation List<String>Resource Types - CloudFormation resource types assigned the required tag keys.
- reporting
Tag List<String>Keys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - resource
Type String - Resource type for the required tag keys.
- cloud
Formation string[]Resource Types - CloudFormation resource types assigned the required tag keys.
- reporting
Tag string[]Keys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - resource
Type string - Resource type for the required tag keys.
- cloud_
formation_ Sequence[str]resource_ types - CloudFormation resource types assigned the required tag keys.
- reporting_
tag_ Sequence[str]keys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - resource_
type str - Resource type for the required tag keys.
- cloud
Formation List<String>Resource Types - CloudFormation resource types assigned the required tag keys.
- reporting
Tag List<String>Keys - Tag keys marked as required in the
report_required_tag_forblock of the effective tag policy. - resource
Type String - Resource type for the required tag keys.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
