1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/lib/fog/aws/requests/kms/describe_key.rb
Josh Lane f402dce5aa kms service
* list, describe, and create keys
2015-05-12 13:50:55 -07:00

27 lines
588 B
Ruby

module Fog
module AWS
class KMS
class Real
require 'fog/aws/parsers/kms/describe_key'
def describe_key(identifier)
request(
'Action' => 'DescribeKey',
'KeyId' => identifier,
:parser => Fog::Parsers::AWS::KMS::DescribeKey.new
)
end
end
class Mock
def describe_key(identifier)
response = Excon::Response.new
key = self.data[:keys][identifier]
response.body = { "KeyMetadata" => key }
response
end
end
end
end
end