Class: AWSCDK::KMS::KeyLookupOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::KMS::KeyLookupOptions
- Defined in:
- kms/key_lookup_options.rb
Overview
Properties for looking up an existing Key.
Instance Attribute Summary collapse
-
#alias_name ⇒ String
readonly
The alias name of the Key.
-
#return_dummy_key_on_missing ⇒ Boolean?
readonly
Whether to return a dummy key if the key was not found.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alias_name:, return_dummy_key_on_missing: nil) ⇒ KeyLookupOptions
constructor
A new instance of KeyLookupOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alias_name:, return_dummy_key_on_missing: nil) ⇒ KeyLookupOptions
Returns a new instance of KeyLookupOptions.
9 10 11 12 13 14 |
# File 'kms/key_lookup_options.rb', line 9 def initialize(alias_name:, return_dummy_key_on_missing: nil) @alias_name = alias_name Jsii::Type.check_type(@alias_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aliasName") @return_dummy_key_on_missing = return_dummy_key_on_missing Jsii::Type.check_type(@return_dummy_key_on_missing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "returnDummyKeyOnMissing") unless @return_dummy_key_on_missing.nil? end |
Instance Attribute Details
#alias_name ⇒ String (readonly)
The alias name of the Key.
Must be in the format alias/<AliasName>.
21 22 23 |
# File 'kms/key_lookup_options.rb', line 21 def alias_name @alias_name end |
#return_dummy_key_on_missing ⇒ Boolean? (readonly)
Note:
Default: false
Whether to return a dummy key if the key was not found.
If it is set to true and the key was not found, a dummy
key with a key id '1234abcd-12ab-34cd-56ef-1234567890ab'
will be returned. The value of the dummy key id can also
be referenced using the Key.DEFAULT_DUMMY_KEY_ID variable,
and you can check if the key is a dummy key by using the
Key.isLookupDummy() method.
33 34 35 |
# File 'kms/key_lookup_options.rb', line 33 def return_dummy_key_on_missing @return_dummy_key_on_missing end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 |
# File 'kms/key_lookup_options.rb', line 35 def self.jsii_properties { :alias_name => "aliasName", :return_dummy_key_on_missing => "returnDummyKeyOnMissing", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'kms/key_lookup_options.rb', line 42 def to_jsii result = {} result.merge!({ "aliasName" => @alias_name, "returnDummyKeyOnMissing" => @return_dummy_key_on_missing, }) result.compact end |