Class: ZAWS::External::AWSCLI::Commands::EC2::ModifyInstanceAttribute
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::ModifyInstanceAttribute
- Defined in:
- lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #get_command ⇒ Object
-
#initialize ⇒ ModifyInstanceAttribute
constructor
A new instance of ModifyInstanceAttribute.
- #instance_id(id) ⇒ Object
- #no_source_dest_check ⇒ Object
- #security_groups(sgroups) ⇒ Object
- #source_dest_check ⇒ Object
Constructor Details
#initialize ⇒ ModifyInstanceAttribute
Returns a new instance of ModifyInstanceAttribute.
7 8 9 10 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 7 def initialize clear_settings self end |
Instance Method Details
#aws ⇒ Object
50 51 52 53 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 50 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 12 def clear_settings() @source_dest_check=nil @no_source_dest_check=nil @instance_id=nil @security_groups=nil @aws=nil self end |
#get_command ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 41 def get_command command = "ec2 modify-instance-attribute " command = "#{command}--instance-id #{@instance_id} " if @instance_id command = "#{command}--no-source-dest-check " if @no_source_dest_check command = "#{command}--source-dest-check " if @source_dest_check command = "#{command}--groups #{@security_groups} " if @security_groups return command end |
#instance_id(id) ⇒ Object
31 32 33 34 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 31 def instance_id(id) @instance_id=id self end |
#no_source_dest_check ⇒ Object
26 27 28 29 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 26 def no_source_dest_check() @no_source_dest_check=true self end |
#security_groups(sgroups) ⇒ Object
36 37 38 39 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 36 def security_groups(sgroups) @security_groups=sgroups self end |
#source_dest_check ⇒ Object
21 22 23 24 |
# File 'lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb', line 21 def source_dest_check() @source_dest_check=true self end |