Class: AWSCDK::SecretsManagerSecretOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SecretsManagerSecretOptions
- Defined in:
- secrets_manager_secret_options.rb
Overview
Options for referencing a secret value from Secrets Manager.
Instance Attribute Summary collapse
-
#json_field ⇒ String?
readonly
The key of a JSON field to retrieve.
-
#version_id ⇒ String?
readonly
Specifies the unique identifier of the version of the secret you want to use.
-
#version_stage ⇒ String?
readonly
Specifies the secret version that you want to retrieve by the staging label attached to the version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json_field: nil, version_id: nil, version_stage: nil) ⇒ SecretsManagerSecretOptions
constructor
A new instance of SecretsManagerSecretOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(json_field: nil, version_id: nil, version_stage: nil) ⇒ SecretsManagerSecretOptions
Returns a new instance of SecretsManagerSecretOptions.
10 11 12 13 14 15 16 17 |
# File 'secrets_manager_secret_options.rb', line 10 def initialize(json_field: nil, version_id: nil, version_stage: nil) @json_field = json_field Jsii::Type.check_type(@json_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jsonField") unless @json_field.nil? @version_id = version_id Jsii::Type.check_type(@version_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "versionId") unless @version_id.nil? @version_stage = version_stage Jsii::Type.check_type(@version_stage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "versionStage") unless @version_stage.nil? end |
Instance Attribute Details
#json_field ⇒ String? (readonly)
Default: - returns all the content stored in the Secrets Manager secret.
The key of a JSON field to retrieve.
This can only be used if the secret stores a JSON object.
26 27 28 |
# File 'secrets_manager_secret_options.rb', line 26 def json_field @json_field end |
#version_id ⇒ String? (readonly)
Default: AWSCURRENT
Specifies the unique identifier of the version of the secret you want to use.
Can specify at most one of version_id and version_stage.
33 34 35 |
# File 'secrets_manager_secret_options.rb', line 33 def version_id @version_id end |
#version_stage ⇒ String? (readonly)
Default: AWSCURRENT
Specifies the secret version that you want to retrieve by the staging label attached to the version.
Can specify at most one of version_id and version_stage.
40 41 42 |
# File 'secrets_manager_secret_options.rb', line 40 def version_stage @version_stage end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 48 |
# File 'secrets_manager_secret_options.rb', line 42 def self.jsii_properties { :json_field => "jsonField", :version_id => "versionId", :version_stage => "versionStage", } end |
Instance Method Details
#to_jsii ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'secrets_manager_secret_options.rb', line 50 def to_jsii result = {} result.merge!({ "jsonField" => @json_field, "versionId" => @version_id, "versionStage" => @version_stage, }) result.compact end |