Class CfnVPNConnection

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:00.552Z") @Stability(Stable) public class CfnVPNConnection extends CfnResource implements IInspectable, ITaggable
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
         .enableAcceleration(false)
         .localIpv4NetworkCidr("localIpv4NetworkCidr")
         .localIpv6NetworkCidr("localIpv6NetworkCidr")
         .outsideIpAddressType("outsideIpAddressType")
         .remoteIpv4NetworkCidr("remoteIpv4NetworkCidr")
         .remoteIpv6NetworkCidr("remoteIpv6NetworkCidr")
         .staticRoutesOnly(false)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .transitGatewayId("transitGatewayId")
         .transportTransitGatewayAttachmentId("transportTransitGatewayAttachmentId")
         .tunnelInsideIpVersion("tunnelInsideIpVersion")
         .vpnGatewayId("vpnGatewayId")
         .vpnTunnelOptionsSpecifications(List.of(VpnTunnelOptionsSpecificationProperty.builder()
                 .dpdTimeoutAction("dpdTimeoutAction")
                 .dpdTimeoutSeconds(123)
                 .enableTunnelLifecycleControl(false)
                 .ikeVersions(List.of(Map.of(
                         "value", "value")))
                 .logOptions(VpnTunnelLogOptionsSpecificationProperty.builder()
                         .cloudwatchLogOptions(CloudwatchLogOptionsSpecificationProperty.builder()
                                 .logEnabled(false)
                                 .logGroupArn("logGroupArn")
                                 .logOutputFormat("logOutputFormat")
                                 .build())
                         .build())
                 .phase1DhGroupNumbers(List.of(Phase1DHGroupNumbersRequestListValueProperty.builder()
                         .value(123)
                         .build()))
                 .phase1EncryptionAlgorithms(List.of(Phase1EncryptionAlgorithmsRequestListValueProperty.builder()
                         .value("value")
                         .build()))
                 .phase1IntegrityAlgorithms(List.of(Phase1IntegrityAlgorithmsRequestListValueProperty.builder()
                         .value("value")
                         .build()))
                 .phase1LifetimeSeconds(123)
                 .phase2DhGroupNumbers(List.of(Phase2DHGroupNumbersRequestListValueProperty.builder()
                         .value(123)
                         .build()))
                 .phase2EncryptionAlgorithms(List.of(Phase2EncryptionAlgorithmsRequestListValueProperty.builder()
                         .value("value")
                         .build()))
                 .phase2IntegrityAlgorithms(List.of(Phase2IntegrityAlgorithmsRequestListValueProperty.builder()
                         .value("value")
                         .build()))
                 .phase2LifetimeSeconds(123)
                 .preSharedKey("preSharedKey")
                 .rekeyFuzzPercentage(123)
                 .rekeyMarginTimeSeconds(123)
                 .replayWindowSize(123)
                 .startupAction("startupAction")
                 .tunnelInsideCidr("tunnelInsideCidr")
                 .tunnelInsideIpv6Cidr("tunnelInsideIpv6Cidr")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnVPNConnectionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrVpnConnectionId

      @Stability(Stable) @NotNull public String getAttrVpnConnectionId()
      The ID of the VPN connection.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getCustomerGatewayId

      @Stability(Stable) @NotNull public String getCustomerGatewayId()
      The ID of the customer gateway at your end of the VPN connection.
    • setCustomerGatewayId

      @Stability(Stable) public void setCustomerGatewayId(@NotNull String value)
      The ID of the customer gateway at your end of the VPN connection.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of VPN connection.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of VPN connection.
    • getEnableAcceleration

      @Stability(Stable) @Nullable public Object getEnableAcceleration()
      Indicate whether to enable acceleration for the VPN connection.
    • setEnableAcceleration

      @Stability(Stable) public void setEnableAcceleration(@Nullable Boolean value)
      Indicate whether to enable acceleration for the VPN connection.
    • setEnableAcceleration

      @Stability(Stable) public void setEnableAcceleration(@Nullable IResolvable value)
      Indicate whether to enable acceleration for the VPN connection.
    • getLocalIpv4NetworkCidr

      @Stability(Stable) @Nullable public String getLocalIpv4NetworkCidr()
      The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
    • setLocalIpv4NetworkCidr

      @Stability(Stable) public void setLocalIpv4NetworkCidr(@Nullable String value)
      The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
    • getLocalIpv6NetworkCidr

      @Stability(Stable) @Nullable public String getLocalIpv6NetworkCidr()
      The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
    • setLocalIpv6NetworkCidr

      @Stability(Stable) public void setLocalIpv6NetworkCidr(@Nullable String value)
      The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
    • getOutsideIpAddressType

      @Stability(Stable) @Nullable public String getOutsideIpAddressType()
      The type of IPv4 address assigned to the outside interface of the customer gateway device.
    • setOutsideIpAddressType

      @Stability(Stable) public void setOutsideIpAddressType(@Nullable String value)
      The type of IPv4 address assigned to the outside interface of the customer gateway device.
    • getRemoteIpv4NetworkCidr

      @Stability(Stable) @Nullable public String getRemoteIpv4NetworkCidr()
      The IPv4 CIDR on the AWS side of the VPN connection.
    • setRemoteIpv4NetworkCidr

      @Stability(Stable) public void setRemoteIpv4NetworkCidr(@Nullable String value)
      The IPv4 CIDR on the AWS side of the VPN connection.
    • getRemoteIpv6NetworkCidr

      @Stability(Stable) @Nullable public String getRemoteIpv6NetworkCidr()
      The IPv6 CIDR on the AWS side of the VPN connection.
    • setRemoteIpv6NetworkCidr

      @Stability(Stable) public void setRemoteIpv6NetworkCidr(@Nullable String value)
      The IPv6 CIDR on the AWS side of the VPN connection.
    • getStaticRoutesOnly

      @Stability(Stable) @Nullable public Object getStaticRoutesOnly()
      Indicates whether the VPN connection uses static routes only.
    • setStaticRoutesOnly

      @Stability(Stable) public void setStaticRoutesOnly(@Nullable Boolean value)
      Indicates whether the VPN connection uses static routes only.
    • setStaticRoutesOnly

      @Stability(Stable) public void setStaticRoutesOnly(@Nullable IResolvable value)
      Indicates whether the VPN connection uses static routes only.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Any tags assigned to the VPN connection.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Any tags assigned to the VPN connection.
    • getTransitGatewayId

      @Stability(Stable) @Nullable public String getTransitGatewayId()
      The ID of the transit gateway associated with the VPN connection.
    • setTransitGatewayId

      @Stability(Stable) public void setTransitGatewayId(@Nullable String value)
      The ID of the transit gateway associated with the VPN connection.
    • getTransportTransitGatewayAttachmentId

      @Stability(Stable) @Nullable public String getTransportTransitGatewayAttachmentId()
      The transit gateway attachment ID to use for the VPN tunnel.
    • setTransportTransitGatewayAttachmentId

      @Stability(Stable) public void setTransportTransitGatewayAttachmentId(@Nullable String value)
      The transit gateway attachment ID to use for the VPN tunnel.
    • getTunnelInsideIpVersion

      @Stability(Stable) @Nullable public String getTunnelInsideIpVersion()
      Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
    • setTunnelInsideIpVersion

      @Stability(Stable) public void setTunnelInsideIpVersion(@Nullable String value)
      Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
    • getVpnGatewayId

      @Stability(Stable) @Nullable public String getVpnGatewayId()
      The ID of the virtual private gateway at the AWS side of the VPN connection.
    • setVpnGatewayId

      @Stability(Stable) public void setVpnGatewayId(@Nullable String value)
      The ID of the virtual private gateway at the AWS side of the VPN connection.
    • getVpnTunnelOptionsSpecifications

      @Stability(Stable) @Nullable public Object getVpnTunnelOptionsSpecifications()
      The tunnel options for the VPN connection.
    • setVpnTunnelOptionsSpecifications

      @Stability(Stable) public void setVpnTunnelOptionsSpecifications(@Nullable IResolvable value)
      The tunnel options for the VPN connection.
    • setVpnTunnelOptionsSpecifications

      @Stability(Stable) public void setVpnTunnelOptionsSpecifications(@Nullable List<Object> value)
      The tunnel options for the VPN connection.