Class: AWSCDK::Pipelines::ExternalDockerCredentialOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipelines::ExternalDockerCredentialOptions
- Defined in:
- pipelines/external_docker_credential_options.rb
Overview
Options for defining credentials for a Docker Credential.
Instance Attribute Summary collapse
-
#assume_role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role to assume prior to accessing the secret.
-
#secret_password_field ⇒ String?
readonly
The name of the JSON field of the secret which contains the secret/password.
-
#secret_username_field ⇒ String?
readonly
The name of the JSON field of the secret which contains the user/login name.
-
#usages ⇒ Array<AWSCDK::Pipelines::DockerCredentialUsage>?
readonly
Defines which stages of the pipeline should be granted access to these credentials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(assume_role: nil, secret_password_field: nil, secret_username_field: nil, usages: nil) ⇒ ExternalDockerCredentialOptions
constructor
A new instance of ExternalDockerCredentialOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(assume_role: nil, secret_password_field: nil, secret_username_field: nil, usages: nil) ⇒ ExternalDockerCredentialOptions
Returns a new instance of ExternalDockerCredentialOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'pipelines/external_docker_credential_options.rb', line 11 def initialize(assume_role: nil, secret_password_field: nil, secret_username_field: nil, usages: nil) @assume_role = assume_role Jsii::Type.check_type(@assume_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "assumeRole") unless @assume_role.nil? @secret_password_field = secret_password_field Jsii::Type.check_type(@secret_password_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretPasswordField") unless @secret_password_field.nil? @secret_username_field = secret_username_field Jsii::Type.check_type(@secret_username_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretUsernameField") unless @secret_username_field.nil? @usages = usages Jsii::Type.check_type(@usages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5Eb2NrZXJDcmVkZW50aWFsVXNhZ2UifSwia2luZCI6ImFycmF5In19")), "usages") unless @usages.nil? end |
Instance Attribute Details
#assume_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - none. The current execution role will be used.
An IAM role to assume prior to accessing the secret.
26 27 28 |
# File 'pipelines/external_docker_credential_options.rb', line 26 def assume_role @assume_role end |
#secret_password_field ⇒ String? (readonly)
Default: 'secret'
The name of the JSON field of the secret which contains the secret/password.
31 32 33 |
# File 'pipelines/external_docker_credential_options.rb', line 31 def secret_password_field @secret_password_field end |
#secret_username_field ⇒ String? (readonly)
Default: 'username'
The name of the JSON field of the secret which contains the user/login name.
36 37 38 |
# File 'pipelines/external_docker_credential_options.rb', line 36 def secret_username_field @secret_username_field end |
#usages ⇒ Array<AWSCDK::Pipelines::DockerCredentialUsage>? (readonly)
Default: - all relevant stages (synth, self-update, asset publishing) are granted access.
Defines which stages of the pipeline should be granted access to these credentials.
41 42 43 |
# File 'pipelines/external_docker_credential_options.rb', line 41 def usages @usages end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'pipelines/external_docker_credential_options.rb', line 43 def self.jsii_properties { :assume_role => "assumeRole", :secret_password_field => "secretPasswordField", :secret_username_field => "secretUsernameField", :usages => "usages", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'pipelines/external_docker_credential_options.rb', line 52 def to_jsii result = {} result.merge!({ "assumeRole" => @assume_role, "secretPasswordField" => @secret_password_field, "secretUsernameField" => @secret_username_field, "usages" => @usages, }) result.compact end |