module RubyAemAws::AbstractComponent
Add common methods to all Components.
Public Instance Methods
to_s()
click to toggle source
# File lib/ruby_aem_aws/abstract/component.rb, line 25 def to_s "#{self.class.name.split('::').last}(#{@descriptor&.stack_prefix})" end
Private Instance Methods
filter_for_descriptor()
click to toggle source
# File lib/ruby_aem_aws/abstract/component.rb, line 31 def filter_for_descriptor { filters: [ { name: 'tag:StackPrefix', values: [@descriptor.stack_prefix] }, { name: 'tag:Component', values: [@descriptor.ec2.component] }, { name: 'tag:Name', values: [@descriptor.ec2.name] }, { name: 'instance-state-name', values: ['running'] } ] } end
filter_for_snapshot(snapshot_type)
click to toggle source
@param snapshot_type SnapshotType tag @return Array of a EC2 filter to filter for a specific Snapshottype
# File lib/ruby_aem_aws/abstract/component.rb, line 44 def filter_for_snapshot(snapshot_type) { filters: [ { name: 'tag:StackPrefix', values: [@descriptor.stack_prefix] }, { name: 'tag:SnapshotType', values: [snapshot_type] }, { name: 'tag:Component', values: [@descriptor.ec2.component] } ] } end