Class: AWSCDK::KMS::AliasProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::KMS::AliasProps
- Defined in:
- kms/alias_props.rb
Overview
Construction properties for a KMS Key Alias object.
Instance Attribute Summary collapse
-
#alias_name ⇒ String
readonly
The name of the alias.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
Policy to apply when the alias is removed from this stack.
-
#target_key ⇒ AWSCDK::KMS::IKey
readonly
The ID of the key for which you are creating the alias.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alias_name:, target_key:, removal_policy: nil) ⇒ AliasProps
constructor
A new instance of AliasProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alias_name:, target_key:, removal_policy: nil) ⇒ AliasProps
Returns a new instance of AliasProps.
10 11 12 13 14 15 16 17 |
# File 'kms/alias_props.rb', line 10 def initialize(alias_name:, target_key:, removal_policy: nil) @alias_name = alias_name Jsii::Type.check_type(@alias_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aliasName") @target_key = target_key Jsii::Type.check_type(@target_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "targetKey") @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? end |
Instance Attribute Details
#alias_name ⇒ String (readonly)
The name of the alias.
The name must start with alias followed by a forward slash, such as alias/. You can't specify aliases that begin with alias/AWS. These aliases are reserved.
26 27 28 |
# File 'kms/alias_props.rb', line 26 def alias_name @alias_name end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Note:
Default: - The alias will be deleted
Policy to apply when the alias is removed from this stack.
39 40 41 |
# File 'kms/alias_props.rb', line 39 def removal_policy @removal_policy end |
#target_key ⇒ AWSCDK::KMS::IKey (readonly)
The ID of the key for which you are creating the alias.
Specify the key's globally unique identifier or Amazon Resource Name (ARN). You can't specify another alias.
34 35 36 |
# File 'kms/alias_props.rb', line 34 def target_key @target_key end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'kms/alias_props.rb', line 41 def self.jsii_properties { :alias_name => "aliasName", :target_key => "targetKey", :removal_policy => "removalPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'kms/alias_props.rb', line 49 def to_jsii result = {} result.merge!({ "aliasName" => @alias_name, "targetKey" => @target_key, "removalPolicy" => @removal_policy, }) result.compact end |