Class: ZAWS::External::AWSCLI::Commands::EC2::DeleteSecurityGroup
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::DeleteSecurityGroup
- Defined in:
- lib/zaws/external/awscli/commands/ec2/delete_security_group.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #execute(verbose) ⇒ Object
- #get_command ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ DeleteSecurityGroup
constructor
A new instance of DeleteSecurityGroup.
- #security_group_id(id) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ DeleteSecurityGroup
Returns a new instance of DeleteSecurityGroup.
7 8 9 10 11 12 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_security_group.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_security_group.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_security_group.rb', line 14 def clear_settings() @group_id=nil self end |
#execute(verbose) ⇒ Object
30 31 32 33 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_security_group.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_security_group.rb', line 24 def get_command command = "ec2 delete-security-group" command = "#{command} --group-id #{@group_id}" if @group_id return command end |
#security_group_id(id) ⇒ Object
19 20 21 22 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_security_group.rb', line 19 def security_group_id(id) @group_id=id self end |