Class: AWSCDK::SecretsManager::SecretAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SecretsManager::SecretAttributes
- Defined in:
- secrets_manager/secret_attributes.rb
Overview
Attributes required to import an existing secret into the Stack.
One ARN format (secret_arn, secret_complete_arn, secret_partial_arn) must be provided.
Instance Attribute Summary collapse
-
#encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.
-
#secret_complete_arn ⇒ String?
readonly
The complete ARN of the secret in SecretsManager.
-
#secret_partial_arn ⇒ String?
readonly
The partial ARN of the secret in SecretsManager.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encryption_key: nil, secret_complete_arn: nil, secret_partial_arn: nil) ⇒ SecretAttributes
constructor
A new instance of SecretAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encryption_key: nil, secret_complete_arn: nil, secret_partial_arn: nil) ⇒ SecretAttributes
Returns a new instance of SecretAttributes.
12 13 14 15 16 17 18 19 |
# File 'secrets_manager/secret_attributes.rb', line 12 def initialize(encryption_key: nil, secret_complete_arn: nil, secret_partial_arn: nil) @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil? @secret_complete_arn = secret_complete_arn Jsii::Type.check_type(@secret_complete_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretCompleteArn") unless @secret_complete_arn.nil? @secret_partial_arn = secret_partial_arn Jsii::Type.check_type(@secret_partial_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretPartialArn") unless @secret_partial_arn.nil? end |
Instance Attribute Details
#encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.
24 25 26 |
# File 'secrets_manager/secret_attributes.rb', line 24 def encryption_key @encryption_key end |
#secret_complete_arn ⇒ String? (readonly)
The complete ARN of the secret in SecretsManager.
This is the ARN including the Secrets Manager 6-character suffix.
Cannot be used with secret_arn or secret_partial_arn.
31 32 33 |
# File 'secrets_manager/secret_attributes.rb', line 31 def secret_complete_arn @secret_complete_arn end |
#secret_partial_arn ⇒ String? (readonly)
The partial ARN of the secret in SecretsManager.
This is the ARN without the Secrets Manager 6-character suffix.
Cannot be used with secret_arn or secret_complete_arn.
38 39 40 |
# File 'secrets_manager/secret_attributes.rb', line 38 def secret_partial_arn @secret_partial_arn end |
Class Method Details
.jsii_properties ⇒ Object
40 41 42 43 44 45 46 |
# File 'secrets_manager/secret_attributes.rb', line 40 def self.jsii_properties { :encryption_key => "encryptionKey", :secret_complete_arn => "secretCompleteArn", :secret_partial_arn => "secretPartialArn", } end |
Instance Method Details
#to_jsii ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'secrets_manager/secret_attributes.rb', line 48 def to_jsii result = {} result.merge!({ "encryptionKey" => @encryption_key, "secretCompleteArn" => @secret_complete_arn, "secretPartialArn" => @secret_partial_arn, }) result.compact end |