This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html). # AWS::EC2::TransitGatewayMeteringPolicyEntry Creates an entry in a transit gateway metering policy to define traffic measurement rules. ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::TransitGatewayMeteringPolicyEntry", "Properties" : { "[DestinationCidrBlock](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationcidrblock)" : {{String}}, "[DestinationPortRange](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationportrange)" : {{String}}, "[DestinationTransitGatewayAttachmentId](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationtransitgatewayattachmentid)" : {{String}}, "[DestinationTransitGatewayAttachmentType](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationtransitgatewayattachmenttype)" : {{String}}, "[MeteredAccount](#cfn-ec2-transitgatewaymeteringpolicyentry-meteredaccount)" : {{String}}, "[PolicyRuleNumber](#cfn-ec2-transitgatewaymeteringpolicyentry-policyrulenumber)" : {{Integer}}, "[Protocol](#cfn-ec2-transitgatewaymeteringpolicyentry-protocol)" : {{String}}, "[SourceCidrBlock](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcecidrblock)" : {{String}}, "[SourcePortRange](#cfn-ec2-transitgatewaymeteringpolicyentry-sourceportrange)" : {{String}}, "[SourceTransitGatewayAttachmentId](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcetransitgatewayattachmentid)" : {{String}}, "[SourceTransitGatewayAttachmentType](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcetransitgatewayattachmenttype)" : {{String}}, "[TransitGatewayMeteringPolicyId](#cfn-ec2-transitgatewaymeteringpolicyentry-transitgatewaymeteringpolicyid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::TransitGatewayMeteringPolicyEntry Properties: [DestinationCidrBlock](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationcidrblock): {{String}} [DestinationPortRange](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationportrange): {{String}} [DestinationTransitGatewayAttachmentId](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationtransitgatewayattachmentid): {{String}} [DestinationTransitGatewayAttachmentType](#cfn-ec2-transitgatewaymeteringpolicyentry-destinationtransitgatewayattachmenttype): {{String}} [MeteredAccount](#cfn-ec2-transitgatewaymeteringpolicyentry-meteredaccount): {{String}} [PolicyRuleNumber](#cfn-ec2-transitgatewaymeteringpolicyentry-policyrulenumber): {{Integer}} [Protocol](#cfn-ec2-transitgatewaymeteringpolicyentry-protocol): {{String}} [SourceCidrBlock](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcecidrblock): {{String}} [SourcePortRange](#cfn-ec2-transitgatewaymeteringpolicyentry-sourceportrange): {{String}} [SourceTransitGatewayAttachmentId](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcetransitgatewayattachmentid): {{String}} [SourceTransitGatewayAttachmentType](#cfn-ec2-transitgatewaymeteringpolicyentry-sourcetransitgatewayattachmenttype): {{String}} [TransitGatewayMeteringPolicyId](#cfn-ec2-transitgatewaymeteringpolicyentry-transitgatewaymeteringpolicyid): {{String}} ``` ## Properties `DestinationCidrBlock` Describes an IPv4 CIDR block. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `DestinationPortRange` Describes a range of ports. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `DestinationTransitGatewayAttachmentId` Property description not available. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `DestinationTransitGatewayAttachmentType` Property description not available. *Required*: No *Type*: String *Allowed values*: `vpc | vpn | direct-connect-gateway | peering | network-function | vpn-concentrator | client-vpn` *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `MeteredAccount` The AWS account ID to which the metered traffic is attributed. *Required*: Yes *Type*: String *Allowed values*: `source-attachment-owner | destination-attachment-owner | transit-gateway-owner` *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `PolicyRuleNumber` The rule number of the metering policy entry. *Required*: Yes *Type*: Integer *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `Protocol` Property description not available. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `SourceCidrBlock` Describes an IPv4 CIDR block. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `SourcePortRange` Describes a range of ports. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `SourceTransitGatewayAttachmentId` Property description not available. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `SourceTransitGatewayAttachmentType` Property description not available. *Required*: No *Type*: String *Allowed values*: `vpc | vpn | direct-connect-gateway | peering | network-function | vpn-concentrator | client-vpn` *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `TransitGatewayMeteringPolicyId` Property description not available. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Return values ### Ref ### Fn::GetAtt #### `State` The state of the metering policy entry. `UpdateEffectiveAt` The date and time when the metering policy entry update becomes effective.