published on Thursday, Apr 16, 2026 by Pulumi
published on Thursday, Apr 16, 2026 by Pulumi
Manages an EC2 Transit Gateway Metering Policy Entry. Each entry defines a traffic matching rule within a Transit Gateway Metering Policy that determines which account is charged for matching traffic flows.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.MeteringPolicyEntry("example", {
transitGatewayMeteringPolicyId: exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId,
policyRuleNumber: 100,
meteredAccount: "source-attachment-owner",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.MeteringPolicyEntry("example",
transit_gateway_metering_policy_id=example_aws_ec2_transit_gateway_metering_policy["transitGatewayMeteringPolicyId"],
policy_rule_number=100,
metered_account="source-attachment-owner")
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.NewMeteringPolicyEntry(ctx, "example", &ec2transitgateway.MeteringPolicyEntryArgs{
TransitGatewayMeteringPolicyId: pulumi.Any(exampleAwsEc2TransitGatewayMeteringPolicy.TransitGatewayMeteringPolicyId),
PolicyRuleNumber: pulumi.Int(100),
MeteredAccount: pulumi.String("source-attachment-owner"),
})
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.MeteringPolicyEntry("example", new()
{
TransitGatewayMeteringPolicyId = exampleAwsEc2TransitGatewayMeteringPolicy.TransitGatewayMeteringPolicyId,
PolicyRuleNumber = 100,
MeteredAccount = "source-attachment-owner",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.MeteringPolicyEntry;
import com.pulumi.aws.ec2transitgateway.MeteringPolicyEntryArgs;
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 MeteringPolicyEntry("example", MeteringPolicyEntryArgs.builder()
.transitGatewayMeteringPolicyId(exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId())
.policyRuleNumber(100)
.meteredAccount("source-attachment-owner")
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:MeteringPolicyEntry
properties:
transitGatewayMeteringPolicyId: ${exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId}
policyRuleNumber: 100
meteredAccount: source-attachment-owner
Full Traffic Matching Rule
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.MeteringPolicyEntry("example", {
transitGatewayMeteringPolicyId: exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId,
policyRuleNumber: 200,
meteredAccount: "destination-attachment-owner",
sourceCidrBlock: "10.0.0.0/8",
destinationCidrBlock: "172.16.0.0/12",
protocol: "6",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.MeteringPolicyEntry("example",
transit_gateway_metering_policy_id=example_aws_ec2_transit_gateway_metering_policy["transitGatewayMeteringPolicyId"],
policy_rule_number=200,
metered_account="destination-attachment-owner",
source_cidr_block="10.0.0.0/8",
destination_cidr_block="172.16.0.0/12",
protocol="6")
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.NewMeteringPolicyEntry(ctx, "example", &ec2transitgateway.MeteringPolicyEntryArgs{
TransitGatewayMeteringPolicyId: pulumi.Any(exampleAwsEc2TransitGatewayMeteringPolicy.TransitGatewayMeteringPolicyId),
PolicyRuleNumber: pulumi.Int(200),
MeteredAccount: pulumi.String("destination-attachment-owner"),
SourceCidrBlock: pulumi.String("10.0.0.0/8"),
DestinationCidrBlock: pulumi.String("172.16.0.0/12"),
Protocol: pulumi.String("6"),
})
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.MeteringPolicyEntry("example", new()
{
TransitGatewayMeteringPolicyId = exampleAwsEc2TransitGatewayMeteringPolicy.TransitGatewayMeteringPolicyId,
PolicyRuleNumber = 200,
MeteredAccount = "destination-attachment-owner",
SourceCidrBlock = "10.0.0.0/8",
DestinationCidrBlock = "172.16.0.0/12",
Protocol = "6",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.MeteringPolicyEntry;
import com.pulumi.aws.ec2transitgateway.MeteringPolicyEntryArgs;
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 MeteringPolicyEntry("example", MeteringPolicyEntryArgs.builder()
.transitGatewayMeteringPolicyId(exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId())
.policyRuleNumber(200)
.meteredAccount("destination-attachment-owner")
.sourceCidrBlock("10.0.0.0/8")
.destinationCidrBlock("172.16.0.0/12")
.protocol("6")
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:MeteringPolicyEntry
properties:
transitGatewayMeteringPolicyId: ${exampleAwsEc2TransitGatewayMeteringPolicy.transitGatewayMeteringPolicyId}
policyRuleNumber: 200
meteredAccount: destination-attachment-owner
sourceCidrBlock: 10.0.0.0/8
destinationCidrBlock: 172.16.0.0/12
protocol: '6'
Create MeteringPolicyEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MeteringPolicyEntry(name: string, args: MeteringPolicyEntryArgs, opts?: CustomResourceOptions);@overload
def MeteringPolicyEntry(resource_name: str,
args: MeteringPolicyEntryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MeteringPolicyEntry(resource_name: str,
opts: Optional[ResourceOptions] = None,
metered_account: Optional[str] = None,
transit_gateway_metering_policy_id: Optional[str] = None,
policy_rule_number: Optional[int] = None,
protocol: Optional[str] = None,
destination_transit_gateway_attachment_type: Optional[str] = None,
destination_transit_gateway_attachment_id: Optional[str] = None,
destination_cidr_block: Optional[str] = None,
region: Optional[str] = None,
source_cidr_block: Optional[str] = None,
source_port_range: Optional[str] = None,
source_transit_gateway_attachment_id: Optional[str] = None,
source_transit_gateway_attachment_type: Optional[str] = None,
timeouts: Optional[MeteringPolicyEntryTimeoutsArgs] = None,
destination_port_range: Optional[str] = None)func NewMeteringPolicyEntry(ctx *Context, name string, args MeteringPolicyEntryArgs, opts ...ResourceOption) (*MeteringPolicyEntry, error)public MeteringPolicyEntry(string name, MeteringPolicyEntryArgs args, CustomResourceOptions? opts = null)
public MeteringPolicyEntry(String name, MeteringPolicyEntryArgs args)
public MeteringPolicyEntry(String name, MeteringPolicyEntryArgs args, CustomResourceOptions options)
type: aws:ec2transitgateway:MeteringPolicyEntry
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 MeteringPolicyEntryArgs
- 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 MeteringPolicyEntryArgs
- 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 MeteringPolicyEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MeteringPolicyEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MeteringPolicyEntryArgs
- 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 meteringPolicyEntryResource = new Aws.Ec2TransitGateway.MeteringPolicyEntry("meteringPolicyEntryResource", new()
{
MeteredAccount = "string",
TransitGatewayMeteringPolicyId = "string",
PolicyRuleNumber = 0,
Protocol = "string",
DestinationTransitGatewayAttachmentType = "string",
DestinationTransitGatewayAttachmentId = "string",
DestinationCidrBlock = "string",
Region = "string",
SourceCidrBlock = "string",
SourcePortRange = "string",
SourceTransitGatewayAttachmentId = "string",
SourceTransitGatewayAttachmentType = "string",
Timeouts = new Aws.Ec2TransitGateway.Inputs.MeteringPolicyEntryTimeoutsArgs
{
Create = "string",
Delete = "string",
},
DestinationPortRange = "string",
});
example, err := ec2transitgateway.NewMeteringPolicyEntry(ctx, "meteringPolicyEntryResource", &ec2transitgateway.MeteringPolicyEntryArgs{
MeteredAccount: pulumi.String("string"),
TransitGatewayMeteringPolicyId: pulumi.String("string"),
PolicyRuleNumber: pulumi.Int(0),
Protocol: pulumi.String("string"),
DestinationTransitGatewayAttachmentType: pulumi.String("string"),
DestinationTransitGatewayAttachmentId: pulumi.String("string"),
DestinationCidrBlock: pulumi.String("string"),
Region: pulumi.String("string"),
SourceCidrBlock: pulumi.String("string"),
SourcePortRange: pulumi.String("string"),
SourceTransitGatewayAttachmentId: pulumi.String("string"),
SourceTransitGatewayAttachmentType: pulumi.String("string"),
Timeouts: &ec2transitgateway.MeteringPolicyEntryTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
DestinationPortRange: pulumi.String("string"),
})
var meteringPolicyEntryResource = new MeteringPolicyEntry("meteringPolicyEntryResource", MeteringPolicyEntryArgs.builder()
.meteredAccount("string")
.transitGatewayMeteringPolicyId("string")
.policyRuleNumber(0)
.protocol("string")
.destinationTransitGatewayAttachmentType("string")
.destinationTransitGatewayAttachmentId("string")
.destinationCidrBlock("string")
.region("string")
.sourceCidrBlock("string")
.sourcePortRange("string")
.sourceTransitGatewayAttachmentId("string")
.sourceTransitGatewayAttachmentType("string")
.timeouts(MeteringPolicyEntryTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.destinationPortRange("string")
.build());
metering_policy_entry_resource = aws.ec2transitgateway.MeteringPolicyEntry("meteringPolicyEntryResource",
metered_account="string",
transit_gateway_metering_policy_id="string",
policy_rule_number=0,
protocol="string",
destination_transit_gateway_attachment_type="string",
destination_transit_gateway_attachment_id="string",
destination_cidr_block="string",
region="string",
source_cidr_block="string",
source_port_range="string",
source_transit_gateway_attachment_id="string",
source_transit_gateway_attachment_type="string",
timeouts={
"create": "string",
"delete": "string",
},
destination_port_range="string")
const meteringPolicyEntryResource = new aws.ec2transitgateway.MeteringPolicyEntry("meteringPolicyEntryResource", {
meteredAccount: "string",
transitGatewayMeteringPolicyId: "string",
policyRuleNumber: 0,
protocol: "string",
destinationTransitGatewayAttachmentType: "string",
destinationTransitGatewayAttachmentId: "string",
destinationCidrBlock: "string",
region: "string",
sourceCidrBlock: "string",
sourcePortRange: "string",
sourceTransitGatewayAttachmentId: "string",
sourceTransitGatewayAttachmentType: "string",
timeouts: {
create: "string",
"delete": "string",
},
destinationPortRange: "string",
});
type: aws:ec2transitgateway:MeteringPolicyEntry
properties:
destinationCidrBlock: string
destinationPortRange: string
destinationTransitGatewayAttachmentId: string
destinationTransitGatewayAttachmentType: string
meteredAccount: string
policyRuleNumber: 0
protocol: string
region: string
sourceCidrBlock: string
sourcePortRange: string
sourceTransitGatewayAttachmentId: string
sourceTransitGatewayAttachmentType: string
timeouts:
create: string
delete: string
transitGatewayMeteringPolicyId: string
MeteringPolicyEntry 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 MeteringPolicyEntry resource accepts the following input properties:
- Metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - Policy
Rule intNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - Transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- Destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- Destination
Port stringRange - Destination
Transit stringGateway Attachment Id - Destination
Transit stringGateway Attachment Type - Protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- Source
Port stringRange - Source
Transit stringGateway Attachment Id - Source
Transit stringGateway Attachment Type - Timeouts
Metering
Policy Entry Timeouts
- Metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - Policy
Rule intNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - Transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- Destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- Destination
Port stringRange - Destination
Transit stringGateway Attachment Id - Destination
Transit stringGateway Attachment Type - Protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- Source
Port stringRange - Source
Transit stringGateway Attachment Id - Source
Transit stringGateway Attachment Type - Timeouts
Metering
Policy Entry Timeouts Args
- metered
Account String - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule IntegerNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - transit
Gateway StringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr StringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port StringRange - destination
Transit StringGateway Attachment Id - destination
Transit StringGateway Attachment Type - protocol String
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr StringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port StringRange - source
Transit StringGateway Attachment Id - source
Transit StringGateway Attachment Type - timeouts
Metering
Policy Entry Timeouts
- metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule numberNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port stringRange - destination
Transit stringGateway Attachment Id - destination
Transit stringGateway Attachment Type - protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port stringRange - source
Transit stringGateway Attachment Id - source
Transit stringGateway Attachment Type - timeouts
Metering
Policy Entry Timeouts
- metered_
account str - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy_
rule_ intnumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - transit_
gateway_ strmetering_ policy_ id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination_
cidr_ strblock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination_
port_ strrange - destination_
transit_ strgateway_ attachment_ id - destination_
transit_ strgateway_ attachment_ type - protocol str
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source_
cidr_ strblock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source_
port_ strrange - source_
transit_ strgateway_ attachment_ id - source_
transit_ strgateway_ attachment_ type - timeouts
Metering
Policy Entry Timeouts Args
- metered
Account String - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule NumberNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - transit
Gateway StringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr StringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port StringRange - destination
Transit StringGateway Attachment Id - destination
Transit StringGateway Attachment Type - protocol String
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr StringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port StringRange - source
Transit StringGateway Attachment Id - source
Transit StringGateway Attachment Type - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the MeteringPolicyEntry resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MeteringPolicyEntry Resource
Get an existing MeteringPolicyEntry 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?: MeteringPolicyEntryState, opts?: CustomResourceOptions): MeteringPolicyEntry@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination_cidr_block: Optional[str] = None,
destination_port_range: Optional[str] = None,
destination_transit_gateway_attachment_id: Optional[str] = None,
destination_transit_gateway_attachment_type: Optional[str] = None,
metered_account: Optional[str] = None,
policy_rule_number: Optional[int] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
source_cidr_block: Optional[str] = None,
source_port_range: Optional[str] = None,
source_transit_gateway_attachment_id: Optional[str] = None,
source_transit_gateway_attachment_type: Optional[str] = None,
timeouts: Optional[MeteringPolicyEntryTimeoutsArgs] = None,
transit_gateway_metering_policy_id: Optional[str] = None) -> MeteringPolicyEntryfunc GetMeteringPolicyEntry(ctx *Context, name string, id IDInput, state *MeteringPolicyEntryState, opts ...ResourceOption) (*MeteringPolicyEntry, error)public static MeteringPolicyEntry Get(string name, Input<string> id, MeteringPolicyEntryState? state, CustomResourceOptions? opts = null)public static MeteringPolicyEntry get(String name, Output<String> id, MeteringPolicyEntryState state, CustomResourceOptions options)resources: _: type: aws:ec2transitgateway:MeteringPolicyEntry 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.
- Destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- Destination
Port stringRange - Destination
Transit stringGateway Attachment Id - Destination
Transit stringGateway Attachment Type - Metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - Policy
Rule intNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - Protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- Source
Port stringRange - Source
Transit stringGateway Attachment Id - Source
Transit stringGateway Attachment Type - Timeouts
Metering
Policy Entry Timeouts - Transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- Destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- Destination
Port stringRange - Destination
Transit stringGateway Attachment Id - Destination
Transit stringGateway Attachment Type - Metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - Policy
Rule intNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - Protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- Source
Port stringRange - Source
Transit stringGateway Attachment Id - Source
Transit stringGateway Attachment Type - Timeouts
Metering
Policy Entry Timeouts Args - Transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr StringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port StringRange - destination
Transit StringGateway Attachment Id - destination
Transit StringGateway Attachment Type - metered
Account String - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule IntegerNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - protocol String
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr StringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port StringRange - source
Transit StringGateway Attachment Id - source
Transit StringGateway Attachment Type - timeouts
Metering
Policy Entry Timeouts - transit
Gateway StringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr stringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port stringRange - destination
Transit stringGateway Attachment Id - destination
Transit stringGateway Attachment Type - metered
Account string - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule numberNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - protocol string
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr stringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port stringRange - source
Transit stringGateway Attachment Id - source
Transit stringGateway Attachment Type - timeouts
Metering
Policy Entry Timeouts - transit
Gateway stringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination_
cidr_ strblock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination_
port_ strrange - destination_
transit_ strgateway_ attachment_ id - destination_
transit_ strgateway_ attachment_ type - metered_
account str - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy_
rule_ intnumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - protocol str
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source_
cidr_ strblock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source_
port_ strrange - source_
transit_ strgateway_ attachment_ id - source_
transit_ strgateway_ attachment_ type - timeouts
Metering
Policy Entry Timeouts Args - transit_
gateway_ strmetering_ policy_ id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
- destination
Cidr StringBlock - Destination CIDR block to match. If not specified, all destination CIDR blocks are matched.
- destination
Port StringRange - destination
Transit StringGateway Attachment Id - destination
Transit StringGateway Attachment Type - metered
Account String - The account to charge for matching traffic. Valid values are
source-attachment-ownerordestination-attachment-owner. - policy
Rule NumberNumber - Rule number for this entry. Lower numbers have higher priority. Valid values are between
1and32766. - protocol String
- Protocol number to match (e.g.,
6for TCP,17for UDP). If not specified, all protocols are matched. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- source
Cidr StringBlock - Source CIDR block to match. If not specified, all source CIDR blocks are matched.
- source
Port StringRange - source
Transit StringGateway Attachment Id - source
Transit StringGateway Attachment Type - timeouts Property Map
- transit
Gateway StringMetering Policy Id EC2 Transit Gateway Metering Policy identifier.
The following arguments are optional:
Supporting Types
MeteringPolicyEntryTimeouts, MeteringPolicyEntryTimeoutsArgs
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Import
Using pulumi import, import aws.ec2transitgateway.MeteringPolicyEntry using the composite identifier. For example:
$ pulumi import aws:ec2transitgateway/meteringPolicyEntry:MeteringPolicyEntry example tgw-policy-12345678,100
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
awsTerraform Provider.
published on Thursday, Apr 16, 2026 by Pulumi
