Sha256: 1984aa227a56ba44edab97c7b11f3fd4e4c85393305a5f5bf2b0363fe3014ad7
Contents?: true
Size: 1.25 KB
Versions: 80
Compression:
Stored size: 1.25 KB
Contents
module Fog module AWS class RDS class Real require 'fog/aws/parsers/rds/tag_list_parser' # returns a Hash of tags for a database instance # http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_ListTagsForResource.html # ==== Parameters # * rds_id <~String> - name of the RDS instance whose tags are to be retrieved # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def list_tags_for_resource(rds_id) request( 'Action' => 'ListTagsForResource', 'ResourceName' => "arn:aws:rds:#{@region}:#{owner_id}:db:#{rds_id}", :parser => Fog::Parsers::AWS::RDS::TagListParser.new ) end end class Mock def list_tags_for_resource(rds_id) response = Excon::Response.new if server = self.data[:servers][rds_id] response.status = 200 response.body = { "ListTagsForResourceResult" => {"TagList" => self.data[:tags][rds_id]} } response else raise Fog::AWS::RDS::NotFound.new("DBInstance #{rds_id} not found") end end end end end end
Version data entries
80 entries across 78 versions & 6 rubygems