Module: AWSCDK::EC2::IVpnConnection

Includes:
IResource, Interfaces::AWSEC2::IVPNConnectionRef
Included in:
VpnConnectionBase
Defined in:
ec2/i_vpn_connection.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'ec2/i_vpn_connection.rb', line 151

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :vpn_connection_ref => { kind: :property, name: "vpnConnectionRef", is_optional: false },
    :customer_gateway_asn => { kind: :property, name: "customerGatewayAsn", is_optional: false },
    :customer_gateway_id => { kind: :property, name: "customerGatewayId", is_optional: false },
    :customer_gateway_ip => { kind: :property, name: "customerGatewayIp", is_optional: false },
    :vpn_id => { kind: :property, name: "vpnId", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :metric => { kind: :method, name: "metric", is_optional: false },
    :metric_tunnel_data_in => { kind: :method, name: "metricTunnelDataIn", is_optional: false },
    :metric_tunnel_data_out => { kind: :method, name: "metricTunnelDataOut", is_optional: false },
    :metric_tunnel_state => { kind: :method, name: "metricTunnelState", is_optional: false },
  }
end

Instance Method Details

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



98
99
100
101
# File 'ec2/i_vpn_connection.rb', line 98

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#customer_gateway_asnNumeric

The ASN of the customer gateway.

Returns:

  • (Numeric)


47
48
49
# File 'ec2/i_vpn_connection.rb', line 47

def customer_gateway_asn()
  jsii_get_property("customerGatewayAsn")
end

#customer_gateway_idString

The id of the customer gateway.

Returns:

  • (String)


54
55
56
# File 'ec2/i_vpn_connection.rb', line 54

def customer_gateway_id()
  jsii_get_property("customerGatewayId")
end

#customer_gateway_ipString

The ip address of the customer gateway.

Returns:

  • (String)


61
62
63
# File 'ec2/i_vpn_connection.rb', line 61

def customer_gateway_ip()
  jsii_get_property("customerGatewayIp")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



26
27
28
# File 'ec2/i_vpn_connection.rb', line 26

def env()
  jsii_get_property("env")
end

#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric

Return the given named metric for this VPNConnection.

Parameters:

Returns:



108
109
110
111
112
113
# File 'ec2/i_vpn_connection.rb', line 108

def metric(metric_name, props = nil)
  Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metric", [metric_name, props])
end

#metric_tunnel_data_in(props = nil) ⇒ AWSCDK::CloudWatch::Metric

The bytes received through the VPN tunnel.

Sum over 5 minutes

Parameters:

Returns:



121
122
123
124
125
# File 'ec2/i_vpn_connection.rb', line 121

def metric_tunnel_data_in(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricTunnelDataIn", [props])
end

#metric_tunnel_data_out(props = nil) ⇒ AWSCDK::CloudWatch::Metric

The bytes sent through the VPN tunnel.

Sum over 5 minutes

Parameters:

Returns:



133
134
135
136
137
# File 'ec2/i_vpn_connection.rb', line 133

def metric_tunnel_data_out(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricTunnelDataOut", [props])
end

#metric_tunnel_state(props = nil) ⇒ AWSCDK::CloudWatch::Metric

The state of the tunnel. 0 indicates DOWN and 1 indicates UP.

Average over 5 minutes

Parameters:

Returns:



145
146
147
148
149
# File 'ec2/i_vpn_connection.rb', line 145

def metric_tunnel_state(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricTunnelState", [props])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


11
12
13
# File 'ec2/i_vpn_connection.rb', line 11

def node()
  jsii_get_property("node")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



33
34
35
# File 'ec2/i_vpn_connection.rb', line 33

def stack()
  jsii_get_property("stack")
end

#vpn_connection_refAWSCDK::Interfaces::AWSEC2::VPNConnectionReference

A reference to a VPNConnection resource.



40
41
42
# File 'ec2/i_vpn_connection.rb', line 40

def vpn_connection_ref()
  jsii_get_property("vpnConnectionRef")
end

#vpn_idString

The id of the VPN connection.

Returns:

  • (String)


68
69
70
# File 'ec2/i_vpn_connection.rb', line 68

def vpn_id()
  jsii_get_property("vpnId")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



79
80
81
82
83
84
# File 'ec2/i_vpn_connection.rb', line 79

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end