Class: Aws::EC2::NatGateway
- Inherits:
-
Resources::Resource
- Object
- Resources::Resource
- Aws::EC2::NatGateway
- Defined in:
- lib/chef/resource/aws_nat_gateway.rb
Overview
We provide this class because the AWS SDK V2 does not provide it (as of May 2016). We copied the pattern in their SDK so when they do add a real resource there shouldn’t be a need for much translation.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#nat_gateway_addresses ⇒ Object
readonly
Returns the value of attribute nat_gateway_addresses.
-
#nat_gateway_id ⇒ Object
readonly
Returns the value of attribute nat_gateway_id.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#subnet_id ⇒ Object
readonly
Returns the value of attribute subnet_id.
-
#vpc_id ⇒ Object
readonly
Returns the value of attribute vpc_id.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(id, options = {}) ⇒ NatGateway
constructor
A new instance of NatGateway.
- #state ⇒ Object
Constructor Details
#initialize(id, options = {}) ⇒ NatGateway
Returns a new instance of NatGateway.
21 22 23 24 25 26 27 28 29 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 21 def initialize(id, = {}) @id = id @nat_gateway_id = id @client = [:client] nat_gateway_struct = get_nat_gateway_struct @vpc_id = nat_gateway_struct.vpc_id @subnet_id = nat_gateway_struct.subnet_id @nat_gateway_addresses = nat_gateway_struct.nat_gateway_addresses end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def id @id end |
#nat_gateway_addresses ⇒ Object (readonly)
Returns the value of attribute nat_gateway_addresses.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def nat_gateway_addresses @nat_gateway_addresses end |
#nat_gateway_id ⇒ Object (readonly)
Returns the value of attribute nat_gateway_id.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def nat_gateway_id @nat_gateway_id end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def resource @resource end |
#subnet_id ⇒ Object (readonly)
Returns the value of attribute subnet_id.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def subnet_id @subnet_id end |
#vpc_id ⇒ Object (readonly)
Returns the value of attribute vpc_id.
19 20 21 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 19 def vpc_id @vpc_id end |
Instance Method Details
#delete ⇒ Object
35 36 37 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 35 def delete @client.delete_nat_gateway(nat_gateway_id: @id) end |
#state ⇒ Object
31 32 33 |
# File 'lib/chef/resource/aws_nat_gateway.rb', line 31 def state get_nat_gateway_struct.state end |