Sha256: 65d0b84a343138c3aa076dc75737a6b6712d6d2d4348c5f4c55462a92c9d4ade

Contents?: true

Size: 757 Bytes

Versions: 59

Compression:

Stored size: 757 Bytes

Contents

module Awspec::Helper
  module Finder
    module SsmParameter
      def find_ssm_parameter(name)
        ssm_client.describe_parameters(
          {
            filters:  [
              {
                key: 'Name',
                values: [name]
              }
            ]
          }).parameters[0]
      end

      def find_parameter_tag(id, tag_key)
        tag = nil
        begin
          response = ssm_client.list_tags_for_resource(
            resource_type: 'Parameter',
            resource_id: id
          )
          tag_set = response.tag_list
          tag = tag_set.find { |tag_obj| tag_obj.key == tag_key }
        rescue Aws::SSM::Errors::ServiceError
          nil
        end
        return tag if tag
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.25.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.24.4 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.24.3 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.24.2 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.24.1 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.24.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.23.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.22.1 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.22.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.21.1 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.21.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.20.0 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.19.2 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.19.1 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.19.0 lib/awspec/helper/finder/ssm_parameter.rb
cthiesfork-awspec-1.2.4 lib/awspec/helper/finder/ssm_parameter.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/helper/finder/ssm_parameter.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/helper/finder/ssm_parameter.rb
awspec-1.18.6 lib/awspec/helper/finder/ssm_parameter.rb