Class: Fog::AWS::KMS::Key
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::KMS::Key
- Defined in:
- lib/fog/aws/models/kms/key.rb
Instance Attribute Summary collapse
-
#policy ⇒ Object
writeonly
Sets the attribute policy.
Instance Method Summary collapse
Instance Attribute Details
#policy=(value) ⇒ Object (writeonly)
Sets the attribute policy
14 15 16 |
# File 'lib/fog/aws/models/kms/key.rb', line 14 def policy=(value) @policy = value end |
Instance Method Details
#reload ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/fog/aws/models/kms/key.rb', line 16 def reload requires :identity data = service.describe_key(self.identity) merge_attributes(data.body['KeyMetadata']) self end |
#save ⇒ Object
25 26 27 28 29 30 |
# File 'lib/fog/aws/models/kms/key.rb', line 25 def save data = service.create_key(@policy, description, usage) merge_attributes(data.body['KeyMetadata']) true end |