Skip to content
v2.278.0

CfnDirectConnectGatewayAttachmentProps Struct ​

Properties for defining a CfnDirectConnectGatewayAttachment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkmanager as networkmanager } from 'aws-cdk-lib';
const cfnDirectConnectGatewayAttachmentProps: networkmanager.CfnDirectConnectGatewayAttachmentProps = {
  coreNetworkId: 'coreNetworkId',
  directConnectGatewayArn: 'directConnectGatewayArn',
  edgeLocations: ['edgeLocations'],

  // the properties below are optional
  natGatewayRules: [{
    matchSourceCidr: 'matchSourceCidr',
    natCidr: 'natCidr',
    ruleNumber: 123,
  }],
  natGatewaySupport: 'natGatewaySupport',
  natSystemRouteSupport: false,
  routingPolicyLabel: 'routingPolicyLabel',
  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_networkmanager as networkmanager

cfn_direct_connect_gateway_attachment_props = networkmanager.CfnDirectConnectGatewayAttachmentProps(
    core_network_id="coreNetworkId",
    direct_connect_gateway_arn="directConnectGatewayArn",
    edge_locations=["edgeLocations"],

    # the properties below are optional
    nat_gateway_rules=[networkmanager.CfnDirectConnectGatewayAttachment.NatRuleProperty(
        match_source_cidr="matchSourceCidr",
        nat_cidr="natCidr",
        rule_number=123
    )],
    nat_gateway_support="natGatewaySupport",
    nat_system_route_support=False,
    routing_policy_label="routingPolicyLabel",
    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.networkmanager.*;

CfnDirectConnectGatewayAttachmentProps cfnDirectConnectGatewayAttachmentProps = CfnDirectConnectGatewayAttachmentProps.builder()
        .coreNetworkId("coreNetworkId")
        .directConnectGatewayArn("directConnectGatewayArn")
        .edgeLocations(List.of("edgeLocations"))

        // the properties below are optional
        .natGatewayRules(List.of(NatRuleProperty.builder()
                .matchSourceCidr("matchSourceCidr")
                .natCidr("natCidr")
                .ruleNumber(123)
                .build()))
        .natGatewaySupport("natGatewaySupport")
        .natSystemRouteSupport(false)
        .routingPolicyLabel("routingPolicyLabel")
        .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.NetworkManager;

var cfnDirectConnectGatewayAttachmentProps = new CfnDirectConnectGatewayAttachmentProps {
    CoreNetworkId = "coreNetworkId",
    DirectConnectGatewayArn = "directConnectGatewayArn",
    EdgeLocations = new [] { "edgeLocations" },

    // the properties below are optional
    NatGatewayRules = new [] { new NatRuleProperty {
        MatchSourceCidr = "matchSourceCidr",
        NatCidr = "natCidr",
        RuleNumber = 123
    } },
    NatGatewaySupport = "natGatewaySupport",
    NatSystemRouteSupport = false,
    RoutingPolicyLabel = "routingPolicyLabel",
    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"

cfnDirectConnectGatewayAttachmentProps := &CfnDirectConnectGatewayAttachmentProps{
	CoreNetworkId: jsii.String("coreNetworkId"),
	DirectConnectGatewayArn: jsii.String("directConnectGatewayArn"),
	EdgeLocations: []*string{
		jsii.String("edgeLocations"),
	},

	// the properties below are optional
	NatGatewayRules: []interface{}{
		&NatRuleProperty{
			MatchSourceCidr: jsii.String("matchSourceCidr"),
			NatCidr: jsii.String("natCidr"),
			RuleNumber: jsii.Number(123),
		},
	},
	NatGatewaySupport: jsii.String("natGatewaySupport"),
	NatSystemRouteSupport: jsii.Boolean(false),
	RoutingPolicyLabel: jsii.String("routingPolicyLabel"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

coreNetworkIdstringcore_network_idstrcoreNetworkIdStringCoreNetworkIdstringCoreNetworkId*string required #
The ID of a core network for the Direct Connect Gateway attachment.
directConnectGatewayArnstringdirect_connect_gateway_arnstrdirectConnectGatewayArnStringDirectConnectGatewayArnstringDirectConnectGatewayArn*string required #
The Direct Connect gateway attachment ARN.
edgeLocationsstring[]edge_locationstyping.List[str]edgeLocationsList<String>EdgeLocationsstring[]EdgeLocations*[]*string required #
The Regions where the edges are located.
natGatewayRulesoptionalIResolvable | IResolvable | CfnDirectConnectGatewayAttachment.NatRuleProperty[]nat_gateway_rulesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, NatRuleProperty]]]natGatewayRulesoptionalIResolvableNatGatewayRulesoptionalIResolvableNatGatewayRulesoptionalinterface{} #
The complete set of NAT gateway rules on the attachment.
notes

Updating this property replaces the entire rule set, and rules left out of the new value are removed. To remove all rules, specify an empty list or remove this property. NAT gateway support can't be enabled without rules, so it is then disabled unless NatGatewaySupport is specified. Only the core network owner can configure NAT gateway rules. The rules aren't returned when the attachment is read, so drift detection doesn't check them. Not available in AWS GovCloud (US).

natGatewaySupportoptionalstringnat_gateway_supportoptionalstrnatGatewaySupportoptionalStringNatGatewaySupportoptionalstringNatGatewaySupportoptional*string #
Whether NAT gateway support is enabled on the attachment.
notes

Required when NatGatewayRules lists rules. Set to DISABLE with NatGatewayRules to keep the rules on the attachment without translating traffic, and set it to ENABLE to activate them again. An attachment that is pending acceptance applies this setting once it is accepted. Only the core network owner can configure or read NAT gateway settings. Not available in AWS GovCloud (US).

natSystemRouteSupportoptionalboolean | IResolvablenat_system_route_supportoptionaltyping.Union[bool, IResolvable]natSystemRouteSupportoptionalBooleanNatSystemRouteSupportoptionalboolNatSystemRouteSupportoptionalinterface{} #
Whether system routes are installed for the NAT CIDRs of the attachment's NAT gateway rules.
notes

If omitted, a new NAT gateway configuration uses the service default of true and an existing configuration keeps its current value, so removing this property from a template doesn't reset the setting. Only the core network owner can configure this setting. Not available in AWS GovCloud (US).

routingPolicyLabeloptionalstringrouting_policy_labeloptionalstrroutingPolicyLabeloptionalStringRoutingPolicyLabeloptionalstringRoutingPolicyLabeloptional*string #
Routing policy label.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Tags for the attachment.