Class CfnVPNConnection
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::EC2::VPNConnection
.
Specifies a VPN connection between a virtual private gateway and a VPN customer gateway or a transit gateway and a VPN customer gateway.
To specify a VPN connection between a transit gateway and customer gateway, use the TransitGatewayId
and CustomerGatewayId
properties.
To specify a VPN connection between a virtual private gateway and customer gateway, use the VpnGatewayId
and CustomerGatewayId
properties.
For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide .
Example:
// 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.*; CfnVPNConnection cfnVPNConnection = CfnVPNConnection.Builder.create(this, "MyCfnVPNConnection") .customerGatewayId("customerGatewayId") .type("type") // the properties below are optional .staticRoutesOnly(false) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .transitGatewayId("transitGatewayId") .vpnGatewayId("vpnGatewayId") .vpnTunnelOptionsSpecifications(List.of(VpnTunnelOptionsSpecificationProperty.builder() .preSharedKey("preSharedKey") .tunnelInsideCidr("tunnelInsideCidr") .build())) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnVPNConnection
.static interface
The tunnel options for a single VPN tunnel.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnVPNConnection
(Construct scope, String id, CfnVPNConnectionProps props) Create a newAWS::EC2::VPNConnection
.protected
CfnVPNConnection
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnVPNConnection
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the VPN connection.The ID of the customer gateway at your end of the VPN connection.Indicates whether the VPN connection uses static routes only.getTags()
Any tags assigned to the VPN connection.The ID of the transit gateway associated with the VPN connection.getType()
The type of VPN connection.The ID of the virtual private gateway at the AWS side of the VPN connection.The tunnel options for the VPN connection.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCustomerGatewayId
(String value) The ID of the customer gateway at your end of the VPN connection.void
setStaticRoutesOnly
(Boolean value) Indicates whether the VPN connection uses static routes only.void
setStaticRoutesOnly
(IResolvable value) Indicates whether the VPN connection uses static routes only.void
setTransitGatewayId
(String value) The ID of the transit gateway associated with the VPN connection.void
The type of VPN connection.void
setVpnGatewayId
(String value) The ID of the virtual private gateway at the AWS side of the VPN connection.void
The tunnel options for the VPN connection.void
The tunnel options for the VPN connection.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnVPNConnection
protected CfnVPNConnection(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVPNConnection
protected CfnVPNConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVPNConnection
@Stability(Stable) public CfnVPNConnection(@NotNull Construct scope, @NotNull String id, @NotNull CfnVPNConnectionProps props) Create a newAWS::EC2::VPNConnection
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrVpnConnectionId
The ID of the VPN connection. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Any tags assigned to the VPN connection. -
getCustomerGatewayId
The ID of the customer gateway at your end of the VPN connection. -
setCustomerGatewayId
The ID of the customer gateway at your end of the VPN connection. -
getType
The type of VPN connection. -
setType
The type of VPN connection. -
getStaticRoutesOnly
Indicates whether the VPN connection uses static routes only.Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. -
setStaticRoutesOnly
Indicates whether the VPN connection uses static routes only.Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. -
setStaticRoutesOnly
Indicates whether the VPN connection uses static routes only.Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. -
getTransitGatewayId
The ID of the transit gateway associated with the VPN connection.You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. -
setTransitGatewayId
The ID of the transit gateway associated with the VPN connection.You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. -
getVpnGatewayId
The ID of the virtual private gateway at the AWS side of the VPN connection.You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. -
setVpnGatewayId
The ID of the virtual private gateway at the AWS side of the VPN connection.You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. -
getVpnTunnelOptionsSpecifications
The tunnel options for the VPN connection. -
setVpnTunnelOptionsSpecifications
The tunnel options for the VPN connection. -
setVpnTunnelOptionsSpecifications
The tunnel options for the VPN connection.
-