Class: VPC::Subnet
- Inherits:
-
Object
- Object
- VPC::Subnet
- Defined in:
- lib/etude_for_aws/vpc/subnet.rb
Instance Attribute Summary collapse
-
#az ⇒ Object
Returns the value of attribute az.
-
#subnet_id ⇒ Object
Returns the value of attribute subnet_id.
Instance Method Summary collapse
Instance Attribute Details
#az ⇒ Object
Returns the value of attribute az.
3 4 5 |
# File 'lib/etude_for_aws/vpc/subnet.rb', line 3 def az @az end |
#subnet_id ⇒ Object
Returns the value of attribute subnet_id.
3 4 5 |
# File 'lib/etude_for_aws/vpc/subnet.rb', line 3 def subnet_id @subnet_id end |
Instance Method Details
#create(vpc, subnet_cidr_block, az) ⇒ Object
5 6 7 8 |
# File 'lib/etude_for_aws/vpc/subnet.rb', line 5 def create(vpc,subnet_cidr_block,az) @az = az @subnet_id = vpc.gateway.create_subnet(subnet_cidr_block,vpc.vpc_id,az) end |
#delete(vpc) ⇒ Object
10 11 12 |
# File 'lib/etude_for_aws/vpc/subnet.rb', line 10 def delete(vpc) vpc.gateway.delete_subnet(@subnet_id) end |