1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. ec2transitgateway
  6. MeteringPolicy
Viewing docs for AWS v7.27.0
published on Thursday, Apr 23, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.27.0
published on Thursday, Apr 23, 2026 by Pulumi

    Manages an EC2 Transit Gateway Metering Policy for Flexible Cost Allocation (FCA). A metering policy defines how traffic is metered for cost allocation purposes on a Transit Gateway.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.TransitGateway("example", {tags: {
        Name: "example",
    }});
    const exampleMeteringPolicy = new aws.ec2transitgateway.MeteringPolicy("example", {
        transitGatewayId: example.id,
        tags: {
            Name: "example",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.TransitGateway("example", tags={
        "Name": "example",
    })
    example_metering_policy = aws.ec2transitgateway.MeteringPolicy("example",
        transit_gateway_id=example.id,
        tags={
            "Name": "example",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ec2transitgateway.NewTransitGateway(ctx, "example", &ec2transitgateway.TransitGatewayArgs{
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2transitgateway.NewMeteringPolicy(ctx, "example", &ec2transitgateway.MeteringPolicyArgs{
    			TransitGatewayId: example.ID(),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("example"),
    			},
    		})
    		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 = new Aws.Ec2TransitGateway.TransitGateway("example", new()
        {
            Tags = 
            {
                { "Name", "example" },
            },
        });
    
        var exampleMeteringPolicy = new Aws.Ec2TransitGateway.MeteringPolicy("example", new()
        {
            TransitGatewayId = example.Id,
            Tags = 
            {
                { "Name", "example" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.TransitGateway;
    import com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;
    import com.pulumi.aws.ec2transitgateway.MeteringPolicy;
    import com.pulumi.aws.ec2transitgateway.MeteringPolicyArgs;
    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) {
            var example = new TransitGateway("example", TransitGatewayArgs.builder()
                .tags(Map.of("Name", "example"))
                .build());
    
            var exampleMeteringPolicy = new MeteringPolicy("exampleMeteringPolicy", MeteringPolicyArgs.builder()
                .transitGatewayId(example.id())
                .tags(Map.of("Name", "example"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:TransitGateway
        properties:
          tags:
            Name: example
      exampleMeteringPolicy:
        type: aws:ec2transitgateway:MeteringPolicy
        name: example
        properties:
          transitGatewayId: ${example.id}
          tags:
            Name: example
    

    With Middlebox Attachments

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.MeteringPolicy("example", {
        transitGatewayId: exampleAwsEc2TransitGateway.id,
        middleboxAttachmentIds: [exampleAwsEc2TransitGatewayVpcAttachment.id],
        tags: {
            Name: "example",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.MeteringPolicy("example",
        transit_gateway_id=example_aws_ec2_transit_gateway["id"],
        middlebox_attachment_ids=[example_aws_ec2_transit_gateway_vpc_attachment["id"]],
        tags={
            "Name": "example",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.NewMeteringPolicy(ctx, "example", &ec2transitgateway.MeteringPolicyArgs{
    			TransitGatewayId: pulumi.Any(exampleAwsEc2TransitGateway.Id),
    			MiddleboxAttachmentIds: pulumi.StringArray{
    				exampleAwsEc2TransitGatewayVpcAttachment.Id,
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("example"),
    			},
    		})
    		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 = new Aws.Ec2TransitGateway.MeteringPolicy("example", new()
        {
            TransitGatewayId = exampleAwsEc2TransitGateway.Id,
            MiddleboxAttachmentIds = new[]
            {
                exampleAwsEc2TransitGatewayVpcAttachment.Id,
            },
            Tags = 
            {
                { "Name", "example" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.MeteringPolicy;
    import com.pulumi.aws.ec2transitgateway.MeteringPolicyArgs;
    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) {
            var example = new MeteringPolicy("example", MeteringPolicyArgs.builder()
                .transitGatewayId(exampleAwsEc2TransitGateway.id())
                .middleboxAttachmentIds(exampleAwsEc2TransitGatewayVpcAttachment.id())
                .tags(Map.of("Name", "example"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:MeteringPolicy
        properties:
          transitGatewayId: ${exampleAwsEc2TransitGateway.id}
          middleboxAttachmentIds:
            - ${exampleAwsEc2TransitGatewayVpcAttachment.id}
          tags:
            Name: example
    

    Create MeteringPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MeteringPolicy(name: string, args: MeteringPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def MeteringPolicy(resource_name: str,
                       args: MeteringPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MeteringPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       transit_gateway_id: Optional[str] = None,
                       middlebox_attachment_ids: Optional[Sequence[str]] = None,
                       region: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       timeouts: Optional[MeteringPolicyTimeoutsArgs] = None)
    func NewMeteringPolicy(ctx *Context, name string, args MeteringPolicyArgs, opts ...ResourceOption) (*MeteringPolicy, error)
    public MeteringPolicy(string name, MeteringPolicyArgs args, CustomResourceOptions? opts = null)
    public MeteringPolicy(String name, MeteringPolicyArgs args)
    public MeteringPolicy(String name, MeteringPolicyArgs args, CustomResourceOptions options)
    
    type: aws:ec2transitgateway:MeteringPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MeteringPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MeteringPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MeteringPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MeteringPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MeteringPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var meteringPolicyResource = new Aws.Ec2TransitGateway.MeteringPolicy("meteringPolicyResource", new()
    {
        TransitGatewayId = "string",
        MiddleboxAttachmentIds = new[]
        {
            "string",
        },
        Region = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Ec2TransitGateway.Inputs.MeteringPolicyTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ec2transitgateway.NewMeteringPolicy(ctx, "meteringPolicyResource", &ec2transitgateway.MeteringPolicyArgs{
    	TransitGatewayId: pulumi.String("string"),
    	MiddleboxAttachmentIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &ec2transitgateway.MeteringPolicyTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var meteringPolicyResource = new MeteringPolicy("meteringPolicyResource", MeteringPolicyArgs.builder()
        .transitGatewayId("string")
        .middleboxAttachmentIds("string")
        .region("string")
        .tags(Map.of("string", "string"))
        .timeouts(MeteringPolicyTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    metering_policy_resource = aws.ec2transitgateway.MeteringPolicy("meteringPolicyResource",
        transit_gateway_id="string",
        middlebox_attachment_ids=["string"],
        region="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const meteringPolicyResource = new aws.ec2transitgateway.MeteringPolicy("meteringPolicyResource", {
        transitGatewayId: "string",
        middleboxAttachmentIds: ["string"],
        region: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:ec2transitgateway:MeteringPolicy
    properties:
        middleboxAttachmentIds:
            - string
        region: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
        transitGatewayId: string
    

    MeteringPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MeteringPolicy resource accepts the following input properties:

    TransitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    MiddleboxAttachmentIds List<string>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts MeteringPolicyTimeouts
    TransitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    MiddleboxAttachmentIds []string
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts MeteringPolicyTimeoutsArgs
    transitGatewayId String

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    middleboxAttachmentIds List<String>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts MeteringPolicyTimeouts
    transitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    middleboxAttachmentIds string[]
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts MeteringPolicyTimeouts
    transit_gateway_id str

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    middlebox_attachment_ids Sequence[str]
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts MeteringPolicyTimeoutsArgs
    transitGatewayId String

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    middleboxAttachmentIds List<String>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MeteringPolicy resource produces the following output properties:

    Arn string
    EC2 Transit Gateway Metering Policy ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    TransitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    Arn string
    EC2 Transit Gateway Metering Policy ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    TransitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    arn String
    EC2 Transit Gateway Metering Policy ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    transitGatewayMeteringPolicyId String
    EC2 Transit Gateway Metering Policy identifier.
    arn string
    EC2 Transit Gateway Metering Policy ARN.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    transitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    arn str
    EC2 Transit Gateway Metering Policy ARN.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    transit_gateway_metering_policy_id str
    EC2 Transit Gateway Metering Policy identifier.
    arn String
    EC2 Transit Gateway Metering Policy ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    transitGatewayMeteringPolicyId String
    EC2 Transit Gateway Metering Policy identifier.

    Look up Existing MeteringPolicy Resource

    Get an existing MeteringPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MeteringPolicyState, opts?: CustomResourceOptions): MeteringPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            middlebox_attachment_ids: Optional[Sequence[str]] = None,
            region: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[MeteringPolicyTimeoutsArgs] = None,
            transit_gateway_id: Optional[str] = None,
            transit_gateway_metering_policy_id: Optional[str] = None) -> MeteringPolicy
    func GetMeteringPolicy(ctx *Context, name string, id IDInput, state *MeteringPolicyState, opts ...ResourceOption) (*MeteringPolicy, error)
    public static MeteringPolicy Get(string name, Input<string> id, MeteringPolicyState? state, CustomResourceOptions? opts = null)
    public static MeteringPolicy get(String name, Output<String> id, MeteringPolicyState state, CustomResourceOptions options)
    resources:  _:    type: aws:ec2transitgateway:MeteringPolicy    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    EC2 Transit Gateway Metering Policy ARN.
    MiddleboxAttachmentIds List<string>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts MeteringPolicyTimeouts
    TransitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    TransitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    Arn string
    EC2 Transit Gateway Metering Policy ARN.
    MiddleboxAttachmentIds []string
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts MeteringPolicyTimeoutsArgs
    TransitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    TransitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    arn String
    EC2 Transit Gateway Metering Policy ARN.
    middleboxAttachmentIds List<String>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts MeteringPolicyTimeouts
    transitGatewayId String

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    transitGatewayMeteringPolicyId String
    EC2 Transit Gateway Metering Policy identifier.
    arn string
    EC2 Transit Gateway Metering Policy ARN.
    middleboxAttachmentIds string[]
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts MeteringPolicyTimeouts
    transitGatewayId string

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    transitGatewayMeteringPolicyId string
    EC2 Transit Gateway Metering Policy identifier.
    arn str
    EC2 Transit Gateway Metering Policy ARN.
    middlebox_attachment_ids Sequence[str]
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts MeteringPolicyTimeoutsArgs
    transit_gateway_id str

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    transit_gateway_metering_policy_id str
    EC2 Transit Gateway Metering Policy identifier.
    arn String
    EC2 Transit Gateway Metering Policy ARN.
    middleboxAttachmentIds List<String>
    Set of Transit Gateway attachment IDs to designate as middlebox attachments for this metering policy.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Metering Policy. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts Property Map
    transitGatewayId String

    EC2 Transit Gateway identifier.

    The following arguments are optional:

    transitGatewayMeteringPolicyId String
    EC2 Transit Gateway Metering Policy identifier.

    Supporting Types

    MeteringPolicyTimeouts, MeteringPolicyTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Identity Schema

    Required

    • id (String) ID of the EC2 Transit Gateway Metering Policy.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import EC2 Transit Gateway Metering Policies using the transitGatewayMeteringPolicyId. For example:

    $ pulumi import aws:ec2transitgateway/meteringPolicy:MeteringPolicy example tgw-mp-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Viewing docs for AWS v7.27.0
    published on Thursday, Apr 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.