Class ExternalDockerCredentialOptions
Options for defining credentials for a Docker Credential.
Inheritance
Implements
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Pipelines.dll
Syntax (csharp)
public class ExternalDockerCredentialOptions : Object, IExternalDockerCredentialOptions
Syntax (vb)
Public Class ExternalDockerCredentialOptions
Inherits Object
Implements IExternalDockerCredentialOptions
Remarks
ExampleMetadata: infused
Examples
var dockerHubSecret = Secret.FromSecretCompleteArn(this, "DHSecret", "arn:aws:...");
// Only the image asset publishing actions will be granted read access to the secret.
var creds = DockerCredential.DockerHub(dockerHubSecret, new ExternalDockerCredentialOptions { Usages = new [] { DockerCredentialUsage.ASSET_PUBLISHING } });
Synopsis
Constructors
ExternalDockerCredentialOptions() |
Properties
AssumeRole | An IAM role to assume prior to accessing the secret. |
SecretPasswordField | The name of the JSON field of the secret which contains the secret/password. |
SecretUsernameField | The name of the JSON field of the secret which contains the user/login name. |
Usages | Defines which stages of the pipeline should be granted access to these credentials. |
Constructors
ExternalDockerCredentialOptions()
public ExternalDockerCredentialOptions()
Properties
AssumeRole
An IAM role to assume prior to accessing the secret.
public IRole AssumeRole { get; set; }
Property Value
Remarks
Default: - none. The current execution role will be used.
SecretPasswordField
The name of the JSON field of the secret which contains the secret/password.
public string SecretPasswordField { get; set; }
Property Value
System.String
Remarks
Default: 'secret'
SecretUsernameField
The name of the JSON field of the secret which contains the user/login name.
public string SecretUsernameField { get; set; }
Property Value
System.String
Remarks
Default: 'username'
Usages
Defines which stages of the pipeline should be granted access to these credentials.
public DockerCredentialUsage[] Usages { get; set; }
Property Value
Remarks
Default: - all relevant stages (synth, self-update, asset publishing) are granted access.