Skip to content
v2.278.0

CfnVpcAttachmentProps Struct ​

Properties for defining a CfnVpcAttachment.

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 cfnVpcAttachmentProps: networkmanager.CfnVpcAttachmentProps = {
  coreNetworkId: 'coreNetworkId',
  subnetArns: ['subnetArns'],
  vpcArn: 'vpcArn',

  // the properties below are optional
  natGatewayRules: [{
    matchSourceCidr: 'matchSourceCidr',
    natCidr: 'natCidr',
    ruleNumber: 123,
  }],
  natGatewaySupport: 'natGatewaySupport',
  options: {
    applianceModeSupport: false,
    dnsSupport: false,
    ipv6Support: false,
    securityGroupReferencingSupport: false,
  },
  proposedSegmentChange: {
    attachmentPolicyRuleNumber: 123,
    segmentName: 'segmentName',
    tags: [{
      key: 'key',
      value: 'value',
    }],
  },
  routingPolicyLabel: 'routingPolicyLabel',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag, 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_vpc_attachment_props = networkmanager.CfnVpcAttachmentProps(
    core_network_id="coreNetworkId",
    subnet_arns=["subnetArns"],
    vpc_arn="vpcArn",

    # the properties below are optional
    nat_gateway_rules=[networkmanager.CfnVpcAttachment.NatRuleProperty(
        match_source_cidr="matchSourceCidr",
        nat_cidr="natCidr",
        rule_number=123
    )],
    nat_gateway_support="natGatewaySupport",
    options=networkmanager.CfnVpcAttachment.VpcOptionsProperty(
        appliance_mode_support=False,
        dns_support=False,
        ipv6_support=False,
        security_group_referencing_support=False
    ),
    proposed_segment_change=networkmanager.CfnVpcAttachment.ProposedSegmentChangeProperty(
        attachment_policy_rule_number=123,
        segment_name="segmentName",
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    ),
    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.*;

CfnVpcAttachmentProps cfnVpcAttachmentProps = CfnVpcAttachmentProps.builder()
        .coreNetworkId("coreNetworkId")
        .subnetArns(List.of("subnetArns"))
        .vpcArn("vpcArn")

        // the properties below are optional
        .natGatewayRules(List.of(NatRuleProperty.builder()
                .matchSourceCidr("matchSourceCidr")
                .natCidr("natCidr")
                .ruleNumber(123)
                .build()))
        .natGatewaySupport("natGatewaySupport")
        .options(VpcOptionsProperty.builder()
                .applianceModeSupport(false)
                .dnsSupport(false)
                .ipv6Support(false)
                .securityGroupReferencingSupport(false)
                .build())
        .proposedSegmentChange(ProposedSegmentChangeProperty.builder()
                .attachmentPolicyRuleNumber(123)
                .segmentName("segmentName")
                .tags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build())
        .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 cfnVpcAttachmentProps = new CfnVpcAttachmentProps {
    CoreNetworkId = "coreNetworkId",
    SubnetArns = new [] { "subnetArns" },
    VpcArn = "vpcArn",

    // the properties below are optional
    NatGatewayRules = new [] { new NatRuleProperty {
        MatchSourceCidr = "matchSourceCidr",
        NatCidr = "natCidr",
        RuleNumber = 123
    } },
    NatGatewaySupport = "natGatewaySupport",
    Options = new VpcOptionsProperty {
        ApplianceModeSupport = false,
        DnsSupport = false,
        Ipv6Support = false,
        SecurityGroupReferencingSupport = false
    },
    ProposedSegmentChange = new ProposedSegmentChangeProperty {
        AttachmentPolicyRuleNumber = 123,
        SegmentName = "segmentName",
        Tags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } }
    },
    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"

cfnVpcAttachmentProps := &CfnVpcAttachmentProps{
	CoreNetworkId: jsii.String("coreNetworkId"),
	SubnetArns: []*string{
		jsii.String("subnetArns"),
	},
	VpcArn: jsii.String("vpcArn"),

	// the properties below are optional
	NatGatewayRules: []interface{}{
		&NatRuleProperty{
			MatchSourceCidr: jsii.String("matchSourceCidr"),
			NatCidr: jsii.String("natCidr"),
			RuleNumber: jsii.Number(123),
		},
	},
	NatGatewaySupport: jsii.String("natGatewaySupport"),
	Options: &VpcOptionsProperty{
		ApplianceModeSupport: jsii.Boolean(false),
		DnsSupport: jsii.Boolean(false),
		Ipv6Support: jsii.Boolean(false),
		SecurityGroupReferencingSupport: jsii.Boolean(false),
	},
	ProposedSegmentChange: &ProposedSegmentChangeProperty{
		AttachmentPolicyRuleNumber: jsii.Number(123),
		SegmentName: jsii.String("segmentName"),
		Tags: []CfnTag{
			&CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
	},
	RoutingPolicyLabel: jsii.String("routingPolicyLabel"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

coreNetworkIdstringcore_network_idstrcoreNetworkIdStringCoreNetworkIdstringCoreNetworkId*string required #
The core network ID.
natGatewayRulesoptionalIResolvable | IResolvable | CfnVpcAttachment.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).

optionsoptionalIResolvable | CfnVpcAttachment.VpcOptionsPropertyoptionsoptionaltyping.Union[IResolvable, VpcOptionsProperty]optionsoptionalIResolvableOptionsoptionalIResolvableOptionsoptionalinterface{} #
Options for creating the VPC attachment.
proposedSegmentChangeoptionalIResolvable | CfnVpcAttachment.ProposedSegmentChangePropertyproposed_segment_changeoptionaltyping.Union[IResolvable, ProposedSegmentChangeProperty]proposedSegmentChangeoptionalIResolvableProposedSegmentChangeoptionalIResolvableProposedSegmentChangeoptionalinterface{} #
Describes a proposed segment change.

In some cases, the segment change must first be evaluated and accepted.

routingPolicyLabeloptionalstringrouting_policy_labeloptionalstrroutingPolicyLabeloptionalStringRoutingPolicyLabeloptionalstringRoutingPolicyLabeloptional*string #
Routing policy label.
subnetArnsstring[]subnet_arnstyping.List[str]subnetArnsList<String>SubnetArnsstring[]SubnetArns*[]*string required #
The subnet ARNs.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags associated with the VPC attachment.
vpcArnstringvpc_arnstrvpcArnStringVpcArnstringVpcArn*string required #
The ARN of the VPC attachment.