Class: AWS::EC2::VPNConnection

Inherits:
Resource show all
Includes:
TaggedItem
Defined in:
lib/aws/ec2/vpn_connection.rb,
lib/aws/ec2/vpn_connection/telemetry.rb

Defined Under Namespace

Classes: Telemetry

Instance Attribute Summary collapse

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods included from TaggedItem

#add_tag, #cached_tags, #clear_tags, #tagging_resource_type, #tags

Methods inherited from Core::Resource

attribute_providers, attribute_providers_for, attributes, #attributes_from_response, define_attribute_type, #eql?, #inspect, new_from

Methods included from Core::Cacheable

included, #retrieve_attribute

Methods included from Core::Model

#client, #config_prefix, #inspect

Constructor Details

#initialize(vpn_connection_id, options = {}) ⇒ VPNConnection

Returns a new instance of VPNConnection.



37
38
39
40
# File 'lib/aws/ec2/vpn_connection.rb', line 37

def initialize vpn_connection_id, options = {}
  @vpn_connection_id = vpn_connection_id
  super
end

Instance Attribute Details

#customer_gateway_configurationString (readonly)

Configuration XML for the VPN connection’s customer gateway This attribute is always present after creating a vpn connection while the connection state is :pending or :available.

Returns:

  • (String)

    the current value of customer_gateway_configuration



32
33
34
# File 'lib/aws/ec2/vpn_connection.rb', line 32

def customer_gateway_configuration
  @customer_gateway_configuration
end

#customer_gateway_idString (readonly)

Returns the current value of customer_gateway_id.

Returns:

  • (String)

    the current value of customer_gateway_id



32
33
34
# File 'lib/aws/ec2/vpn_connection.rb', line 32

def customer_gateway_id
  @customer_gateway_id
end

#stateSymbol (readonly)

Returns the current value of state.

Returns:

  • (Symbol)

    the current value of state



32
33
34
# File 'lib/aws/ec2/vpn_connection.rb', line 32

def state
  @state
end

#vpn_connection_idString (readonly) Also known as: id

Returns:

  • (String)


43
44
45
# File 'lib/aws/ec2/vpn_connection.rb', line 43

def vpn_connection_id
  @vpn_connection_id
end

#vpn_gateway_idString (readonly)

Returns the current value of vpn_gateway_id.

Returns:

  • (String)

    the current value of vpn_gateway_id



32
33
34
# File 'lib/aws/ec2/vpn_connection.rb', line 32

def vpn_gateway_id
  @vpn_gateway_id
end

#vpn_typeString (readonly)

Returns the current value of vpn_type.

Returns:

  • (String)

    the current value of vpn_type



32
33
34
# File 'lib/aws/ec2/vpn_connection.rb', line 32

def vpn_type
  @vpn_type
end

Instance Method Details

#customer_gatewayCustomerGateway

Returns:



77
78
79
# File 'lib/aws/ec2/vpn_connection.rb', line 77

def customer_gateway
  CustomerGateway.new(customer_gateway_id, :config => config)
end

#deletenil

Deletes this vpn connection.

Returns:

  • (nil)


90
91
92
93
94
95
# File 'lib/aws/ec2/vpn_connection.rb', line 90

def delete
  client_opts = {}
  client_opts[:vpn_connection_id] = vpn_connection_id
  client.delete_vpn_connection(client_opts)
  nil
end

#vgw_telemetryArray<Telemetry>

Returns:



82
83
84
85
86
# File 'lib/aws/ec2/vpn_connection.rb', line 82

def vgw_telemetry
  vgw_telemetry_details.collect do |details|
    Telemetry.new(self, details)
  end
end

#vpn_gatewayVPNGateway

Returns:



72
73
74
# File 'lib/aws/ec2/vpn_connection.rb', line 72

def vpn_gateway
  VPNGateway.new(vpn_gateway_id, :config => config)
end