1. Packages
  2. AWS
  3. API Docs
  4. resourcegroupstaggingapi
  5. getRequiredTags
AWS v7.20.0 published on Thursday, Feb 19, 2026 by Pulumi
aws logo
AWS v7.20.0 published on Thursday, Feb 19, 2026 by Pulumi

    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 dictionary

    The following arguments are supported:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    getRequiredTags Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    RequiredTags List<GetRequiredTagsRequiredTag>
    List of required tag configurations. See required_tags below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    RequiredTags []GetRequiredTagsRequiredTag
    List of required tag configurations. See required_tags below.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    requiredTags List<GetRequiredTagsRequiredTag>
    List of required tag configurations. See required_tags below.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    requiredTags GetRequiredTagsRequiredTag[]
    List of required tag configurations. See required_tags below.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    required_tags Sequence[GetRequiredTagsRequiredTag]
    List of required tag configurations. See required_tags below.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    requiredTags List<Property Map>
    List of required tag configurations. See required_tags below.

    Supporting Types

    GetRequiredTagsRequiredTag

    CloudFormationResourceTypes List<string>
    CloudFormation resource types assigned the required tag keys.
    ReportingTagKeys List<string>
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    ResourceType string
    Resource type for the required tag keys.
    CloudFormationResourceTypes []string
    CloudFormation resource types assigned the required tag keys.
    ReportingTagKeys []string
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    ResourceType string
    Resource type for the required tag keys.
    cloudFormationResourceTypes List<String>
    CloudFormation resource types assigned the required tag keys.
    reportingTagKeys List<String>
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    resourceType String
    Resource type for the required tag keys.
    cloudFormationResourceTypes string[]
    CloudFormation resource types assigned the required tag keys.
    reportingTagKeys string[]
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    resourceType string
    Resource type for the required tag keys.
    cloud_formation_resource_types Sequence[str]
    CloudFormation resource types assigned the required tag keys.
    reporting_tag_keys Sequence[str]
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    resource_type str
    Resource type for the required tag keys.
    cloudFormationResourceTypes List<String>
    CloudFormation resource types assigned the required tag keys.
    reportingTagKeys List<String>
    Tag keys marked as required in the report_required_tag_for block of the effective tag policy.
    resourceType 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 aws Terraform Provider.
    aws logo
    AWS v7.20.0 published on Thursday, Feb 19, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate