Skip to content
v2.277.0

CfnTransitGatewayMeteringPolicyProps Struct ​

Properties for defining a CfnTransitGatewayMeteringPolicy.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnTransitGatewayMeteringPolicyProps: ec2.CfnTransitGatewayMeteringPolicyProps = {
  transitGatewayId: 'transitGatewayId',

  // the properties below are optional
  middleboxAttachmentIds: ['middleboxAttachmentIds'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_transit_gateway_metering_policy_props = ec2.CfnTransitGatewayMeteringPolicyProps(
    transit_gateway_id="transitGatewayId",

    # the properties below are optional
    middlebox_attachment_ids=["middleboxAttachmentIds"],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

CfnTransitGatewayMeteringPolicyProps cfnTransitGatewayMeteringPolicyProps = CfnTransitGatewayMeteringPolicyProps.builder()
        .transitGatewayId("transitGatewayId")

        // the properties below are optional
        .middleboxAttachmentIds(List.of("middleboxAttachmentIds"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var cfnTransitGatewayMeteringPolicyProps = new CfnTransitGatewayMeteringPolicyProps {
    TransitGatewayId = "transitGatewayId",

    // the properties below are optional
    MiddleboxAttachmentIds = new [] { "middleboxAttachmentIds" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnTransitGatewayMeteringPolicyProps := &CfnTransitGatewayMeteringPolicyProps{
	TransitGatewayId: jsii.String("transitGatewayId"),

	// the properties below are optional
	MiddleboxAttachmentIds: []*string{
		jsii.String("middleboxAttachmentIds"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

middleboxAttachmentIdsoptionalstring[]middlebox_attachment_idsoptionaltyping.List[str]middleboxAttachmentIdsoptionalList<String>MiddleboxAttachmentIdsoptionalstring[]MiddleboxAttachmentIdsoptional*[]*string#
The IDs of the middlebox attachments associated with the metering policy.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
The tags assigned to the transit gateway metering policy.
transitGatewayIdstringtransit_gateway_idstrtransitGatewayIdStringTransitGatewayIdstringTransitGatewayId*stringrequired#
The ID of the transit gateway associated with the metering policy.