Class: ZAWS::External::AWSCLI::Commands::EC2::DescribeImages
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::DescribeImages
- Defined in:
- lib/zaws/external/awscli/commands/ec2/describe_images.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #filter ⇒ Object
- #get_command ⇒ Object
- #image_ids(id) ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ DescribeImages
constructor
A new instance of DescribeImages.
- #owner(owner) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ DescribeImages
Returns a new instance of DescribeImages.
8 9 10 11 12 13 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 8 def initialize(shellout=nil, awscli=nil) #super(shellout, awscli) @shellout=shellout @awscli=awscli clear_settings end |
Instance Method Details
#aws ⇒ Object
15 16 17 18 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 15 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 25 def clear_settings @aws=nil @filter=nil @owner=nil @image_ids=nil self end |
#filter ⇒ Object
20 21 22 23 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 20 def filter @filter ||= ZAWS::External::AWSCLI::Commands::EC2::Filter.new() @filter end |
#get_command ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 43 def get_command command = "ec2 describe-images" command = "#{command} --owner #{@owner}" if @owner command = "#{command} --image-ids #{@image_ids}" if @image_ids command = "#{command} #{@filter.get_command}" if @filter return command end |
#image_ids(id) ⇒ Object
38 39 40 41 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 38 def image_ids(id) @image_ids=id self end |
#owner(owner) ⇒ Object
33 34 35 36 |
# File 'lib/zaws/external/awscli/commands/ec2/describe_images.rb', line 33 def owner(owner) @owner=owner self end |