Class: ZAWS::External::AWSCLI::Commands::EC2::DeleteSubnet
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::DeleteSubnet
- Defined in:
- lib/zaws/external/awscli/commands/ec2/delete_subnet.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #execute(verbose) ⇒ Object
- #get_command ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ DeleteSubnet
constructor
A new instance of DeleteSubnet.
- #subnet_id(id) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ DeleteSubnet
Returns a new instance of DeleteSubnet.
7 8 9 10 11 12 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 7 def initialize(shellout=nil, awscli=nil) @shellout=shellout @awscli=awscli clear_settings self end |
Instance Method Details
#aws ⇒ Object
35 36 37 38 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 35 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
14 15 16 17 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 14 def clear_settings() @subnet_id=nil self end |
#execute(verbose) ⇒ Object
30 31 32 33 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 30 def execute(verbose) comline=@aws.get_command @shellout.cli(comline, verbose) end |
#get_command ⇒ Object
24 25 26 27 28 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 24 def get_command command = "ec2 delete-subnet" command = "#{command} --subnet-id #{@subnet_id}" if @subnet_id return command end |
#subnet_id(id) ⇒ Object
19 20 21 22 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_subnet.rb', line 19 def subnet_id(id) @subnet_id=id self end |