Class: AWSCDK::EC2::CfnCustomerGatewayProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_customer_gateway_props.rb

Overview

Properties for defining a CfnCustomerGateway.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ip_address:, type:, bgp_asn: nil, bgp_asn_extended: nil, certificate_arn: nil, device_name: nil, tags: nil) ⇒ CfnCustomerGatewayProps

Returns a new instance of CfnCustomerGatewayProps.

Parameters:

  • ip_address (String)

    The IP address for the customer gateway device's outside interface.

  • type (String)

    The type of VPN connection that this customer gateway supports ( ipsec.1 ).

  • bgp_asn (Numeric, nil) (defaults to: nil)

    For customer gateway devices that support BGP, specify the device's ASN.

  • bgp_asn_extended (Numeric, nil) (defaults to: nil)

    For customer gateway devices that support BGP, specify the device's ASN.

  • certificate_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) for the customer gateway certificate.

  • device_name (String, nil) (defaults to: nil)

    The name of customer gateway device.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    One or more tags for the customer gateway.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'ec2/cfn_customer_gateway_props.rb', line 16

def initialize(ip_address:, type:, bgp_asn: nil, bgp_asn_extended: nil, certificate_arn: nil, device_name: nil, tags: nil)
  @ip_address = ip_address
  Jsii::Type.check_type(@ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipAddress")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @bgp_asn = bgp_asn
  Jsii::Type.check_type(@bgp_asn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "bgpAsn") unless @bgp_asn.nil?
  @bgp_asn_extended = bgp_asn_extended
  Jsii::Type.check_type(@bgp_asn_extended, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "bgpAsnExtended") unless @bgp_asn_extended.nil?
  @certificate_arn = certificate_arn
  Jsii::Type.check_type(@certificate_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "certificateArn") unless @certificate_arn.nil?
  @device_name = device_name
  Jsii::Type.check_type(@device_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceName") unless @device_name.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#bgp_asnNumeric? (readonly)

Note:

Default: - 65000

For customer gateway devices that support BGP, specify the device's ASN.

You must specify either BgpAsn or BgpAsnExtended when creating the customer gateway. If the ASN is larger than 2,147,483,647 , you must use BgpAsnExtended .

Default: 65000

Valid values: 1 to 2,147,483,647



56
57
58
# File 'ec2/cfn_customer_gateway_props.rb', line 56

def bgp_asn
  @bgp_asn
end

#bgp_asn_extendedNumeric? (readonly)

For customer gateway devices that support BGP, specify the device's ASN.

You must specify either BgpAsn or BgpAsnExtended when creating the customer gateway. If the ASN is larger than 2,147,483,647 , you must use BgpAsnExtended .

Valid values: 2,147,483,648 to 4,294,967,295



65
66
67
# File 'ec2/cfn_customer_gateway_props.rb', line 65

def bgp_asn_extended
  @bgp_asn_extended
end

#certificate_arnString? (readonly)

The Amazon Resource Name (ARN) for the customer gateway certificate.



70
71
72
# File 'ec2/cfn_customer_gateway_props.rb', line 70

def certificate_arn
  @certificate_arn
end

#device_nameString? (readonly)

The name of customer gateway device.



75
76
77
# File 'ec2/cfn_customer_gateway_props.rb', line 75

def device_name
  @device_name
end

#ip_addressString (readonly)

The IP address for the customer gateway device's outside interface.

The address must be static. If OutsideIpAddressType in your VPN connection options is set to PrivateIpv4 , you can use an RFC6598 or RFC1918 private IPv4 address. If OutsideIpAddressType is set to Ipv6 , you can use an IPv6 address.



39
40
41
# File 'ec2/cfn_customer_gateway_props.rb', line 39

def ip_address
  @ip_address
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

One or more tags for the customer gateway.



80
81
82
# File 'ec2/cfn_customer_gateway_props.rb', line 80

def tags
  @tags
end

#typeString (readonly)

The type of VPN connection that this customer gateway supports ( ipsec.1 ).



44
45
46
# File 'ec2/cfn_customer_gateway_props.rb', line 44

def type
  @type
end

Class Method Details

.jsii_propertiesObject



82
83
84
85
86
87
88
89
90
91
92
# File 'ec2/cfn_customer_gateway_props.rb', line 82

def self.jsii_properties
  {
    :ip_address => "ipAddress",
    :type => "type",
    :bgp_asn => "bgpAsn",
    :bgp_asn_extended => "bgpAsnExtended",
    :certificate_arn => "certificateArn",
    :device_name => "deviceName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'ec2/cfn_customer_gateway_props.rb', line 94

def to_jsii
  result = {}
  result.merge!({
    "ipAddress" => @ip_address,
    "type" => @type,
    "bgpAsn" => @bgp_asn,
    "bgpAsnExtended" => @bgp_asn_extended,
    "certificateArn" => @certificate_arn,
    "deviceName" => @device_name,
    "tags" => @tags,
  })
  result.compact
end