@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.899Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnVPNConnection(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrVpnConnectionId()
The ID of the VPN connection.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCustomerGatewayId()
The ID of the customer gateway at your end of the VPN connection.
|
java.lang.Object |
getStaticRoutesOnly()
Indicates whether the VPN connection uses static routes only.
|
TagManager |
getTags()
Any tags assigned to the VPN connection.
|
java.lang.String |
getTransitGatewayId()
The ID of the transit gateway associated with the VPN connection.
|
java.lang.String |
getType()
The type of VPN connection.
|
java.lang.String |
getVpnGatewayId()
The ID of the virtual private gateway at the AWS side of the VPN connection.
|
java.lang.Object |
getVpnTunnelOptionsSpecifications()
The tunnel options for the VPN connection.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCustomerGatewayId(java.lang.String value)
The ID of the customer gateway at your end of the VPN connection.
|
void |
setStaticRoutesOnly(java.lang.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(java.lang.String value)
The ID of the transit gateway associated with the VPN connection.
|
void |
setType(java.lang.String value)
The type of VPN connection.
|
void |
setVpnGatewayId(java.lang.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(java.util.List<java.lang.Object> value)
The tunnel options for the VPN connection.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnVPNConnection(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVPNConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnVPNConnection(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrVpnConnectionId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getCustomerGatewayId()
public void setCustomerGatewayId(java.lang.String value)
public java.lang.String getType()
public void setType(java.lang.String value)
public java.lang.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
.
public void setStaticRoutesOnly(java.lang.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
.
public void setStaticRoutesOnly(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
.
public java.lang.String getTransitGatewayId()
You must specify either TransitGatewayId
or VpnGatewayId
, but not both.
public void setTransitGatewayId(java.lang.String value)
You must specify either TransitGatewayId
or VpnGatewayId
, but not both.
public java.lang.String getVpnGatewayId()
You must specify either TransitGatewayId
or VpnGatewayId
, but not both.
public void setVpnGatewayId(java.lang.String value)
You must specify either TransitGatewayId
or VpnGatewayId
, but not both.
public java.lang.Object getVpnTunnelOptionsSpecifications()
public void setVpnTunnelOptionsSpecifications(IResolvable value)
public void setVpnTunnelOptionsSpecifications(java.util.List<java.lang.Object> value)