@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.381Z") @Stability(value=Stable) public class CfnVPNConnection extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnVPNConnection.Builder
A fluent builder for
CfnVPNConnection. |
static interface |
CfnVPNConnection.VpnTunnelOptionsSpecificationProperty
The tunnel options for a single VPN tunnel.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnVPNConnection(software.constructs.Construct scope,
String id,
CfnVPNConnectionProps props)
Create a new `AWS::EC2::VPNConnection`.
|
protected |
CfnVPNConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVPNConnection(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
String |
getCustomerGatewayId()
The ID of the customer gateway at your end of the VPN connection.
|
Object |
getStaticRoutesOnly()
Indicates whether the VPN connection uses static routes only.
|
TagManager |
getTags()
Any tags assigned to the VPN connection.
|
String |
getTransitGatewayId()
The ID of the transit gateway associated with the VPN connection.
|
String |
getType()
The type of VPN connection.
|
String |
getVpnGatewayId()
The ID of the virtual private gateway at the AWS side of the VPN connection.
|
Object |
getVpnTunnelOptionsSpecifications()
The tunnel options for the VPN connection.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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 |
setType(String value)
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 |
setVpnTunnelOptionsSpecifications(IResolvable value)
The tunnel options for the VPN connection.
|
void |
setVpnTunnelOptionsSpecifications(List<Object> value)
The tunnel options for the VPN connection.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnVPNConnection(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVPNConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnVPNConnection(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnVPNConnectionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getCustomerGatewayId()
@Stability(value=Stable)
public void setCustomerGatewayId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getType()
@Stability(value=Stable)
public void setType(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getStaticRoutesOnly()
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 .
@Stability(value=Stable)
public void setStaticRoutesOnly(@Nullable
Boolean value)
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 .
@Stability(value=Stable)
public void setStaticRoutesOnly(@Nullable
IResolvable value)
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 .
@Stability(value=Stable) @Nullable public String getTransitGatewayId()
You must specify either TransitGatewayId or VpnGatewayId , but not both.
@Stability(value=Stable)
public void setTransitGatewayId(@Nullable
String value)
You must specify either TransitGatewayId or VpnGatewayId , but not both.
@Stability(value=Stable) @Nullable public String getVpnGatewayId()
You must specify either TransitGatewayId or VpnGatewayId , but not both.
@Stability(value=Stable)
public void setVpnGatewayId(@Nullable
String value)
You must specify either TransitGatewayId or VpnGatewayId , but not both.
@Stability(value=Stable) @Nullable public Object getVpnTunnelOptionsSpecifications()
@Stability(value=Stable)
public void setVpnTunnelOptionsSpecifications(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.