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.101.0 (build b95fe5d)", date="2024-07-22T22:42:50.643Z") @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
         .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();
 

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.
    • 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.
    • 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.