Skip to content
v2.278.0

TransitGatewayPolicyRuleProperty Struct ​

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 transitGatewayPolicyRuleProperty: ec2.CfnTransitGatewayPolicyTableEntry.TransitGatewayPolicyRuleProperty = {
  destinationCidrBlock: 'destinationCidrBlock',
  destinationPortRange: 'destinationPortRange',
  protocol: 'protocol',
  sourceCidrBlock: 'sourceCidrBlock',
  sourcePortRange: 'sourcePortRange',
};
python
# 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

transit_gateway_policy_rule_property = ec2.CfnTransitGatewayPolicyTableEntry.TransitGatewayPolicyRuleProperty(
    destination_cidr_block="destinationCidrBlock",
    destination_port_range="destinationPortRange",
    protocol="protocol",
    source_cidr_block="sourceCidrBlock",
    source_port_range="sourcePortRange"
)
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.*;

TransitGatewayPolicyRuleProperty transitGatewayPolicyRuleProperty = TransitGatewayPolicyRuleProperty.builder()
        .destinationCidrBlock("destinationCidrBlock")
        .destinationPortRange("destinationPortRange")
        .protocol("protocol")
        .sourceCidrBlock("sourceCidrBlock")
        .sourcePortRange("sourcePortRange")
        .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 transitGatewayPolicyRuleProperty = new TransitGatewayPolicyRuleProperty {
    DestinationCidrBlock = "destinationCidrBlock",
    DestinationPortRange = "destinationPortRange",
    Protocol = "protocol",
    SourceCidrBlock = "sourceCidrBlock",
    SourcePortRange = "sourcePortRange"
};
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"

transitGatewayPolicyRuleProperty := &TransitGatewayPolicyRuleProperty{
	DestinationCidrBlock: jsii.String("destinationCidrBlock"),
	DestinationPortRange: jsii.String("destinationPortRange"),
	Protocol: jsii.String("protocol"),
	SourceCidrBlock: jsii.String("sourceCidrBlock"),
	SourcePortRange: jsii.String("sourcePortRange"),
}

Properties ​

destinationCidrBlockoptionalstringdestination_cidr_blockoptionalstrdestinationCidrBlockoptionalStringDestinationCidrBlockoptionalstringDestinationCidrBlockoptional*string #
The destination CIDR block for the transit gateway policy rule.
destinationPortRangeoptionalstringdestination_port_rangeoptionalstrdestinationPortRangeoptionalStringDestinationPortRangeoptionalstringDestinationPortRangeoptional*string #
The destination port range for the transit gateway policy rule.
protocoloptionalstringprotocoloptionalstrprotocoloptionalStringProtocoloptionalstringProtocoloptional*string #
The protocol for the transit gateway policy rule.
sourceCidrBlockoptionalstringsource_cidr_blockoptionalstrsourceCidrBlockoptionalStringSourceCidrBlockoptionalstringSourceCidrBlockoptional*string #
The source CIDR block for the transit gateway policy rule.
sourcePortRangeoptionalstringsource_port_rangeoptionalstrsourcePortRangeoptionalStringSourcePortRangeoptionalstringSourcePortRangeoptional*string #
The source port range for the transit gateway policy rule.