EcrDockerCredentialOptions

class aws_cdk.pipelines.EcrDockerCredentialOptions(*, assume_role=None, usages=None)

Bases: object

Options for defining access for a Docker Credential composed of ECR repos.

Parameters
  • assume_role (Optional[IRole]) – An IAM role to assume prior to accessing the secret. Default: - none. The current execution role will be used.

  • usages (Optional[Sequence[DockerCredentialUsage]]) – Defines which stages of the pipeline should be granted access to these credentials. Default: - all relevant stages (synth, self-update, asset publishing) are granted access.

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_iam as iam
import aws_cdk.pipelines as pipelines

# role: iam.Role

ecr_docker_credential_options = pipelines.EcrDockerCredentialOptions(
    assume_role=role,
    usages=[pipelines.DockerCredentialUsage.SYNTH]
)

Attributes

assume_role

An IAM role to assume prior to accessing the secret.

Default
  • none. The current execution role will be used.

Return type

Optional[IRole]

usages

Defines which stages of the pipeline should be granted access to these credentials.

Default
  • all relevant stages (synth, self-update, asset publishing) are granted access.

Return type

Optional[List[DockerCredentialUsage]]