DockerImageAssetInvalidationOptions

class aws_cdk.aws_ecr_assets.DockerImageAssetInvalidationOptions(*, build_args=None, extra_hash=None, file=None, network_mode=None, platform=None, repository_name=None, target=None)

Bases: object

Options to control invalidation of DockerImageAsset asset hashes.

Parameters
  • build_args (Optional[bool]) – Use buildArgs while calculating the asset hash. Default: true

  • extra_hash (Optional[bool]) – Use extraHash while calculating the asset hash. Default: true

  • file (Optional[bool]) – Use file while calculating the asset hash. Default: true

  • network_mode (Optional[bool]) – Use networkMode while calculating the asset hash. Default: true

  • platform (Optional[bool]) – Use platform while calculating the asset hash. Default: true

  • repository_name (Optional[bool]) – Use repositoryName while calculating the asset hash. Default: true

  • target (Optional[bool]) – Use target while calculating the asset hash. Default: true

ExampleMetadata

infused

Example:

from aws_cdk.aws_ecr_assets import DockerImageAsset


asset = DockerImageAsset(self, "MyBuildImage",
    directory=path.join(__dirname, "my-image"),
    build_args={
        "HTTP_PROXY": "http://10.20.30.2:1234"
    },
    invalidation=DockerImageAssetInvalidationOptions(
        build_args=False
    )
)

Attributes

build_args

Use buildArgs while calculating the asset hash.

Default

true

Return type

Optional[bool]

extra_hash

Use extraHash while calculating the asset hash.

Default

true

Return type

Optional[bool]

file

Use file while calculating the asset hash.

Default

true

Return type

Optional[bool]

network_mode

Use networkMode while calculating the asset hash.

Default

true

Return type

Optional[bool]

platform

Use platform while calculating the asset hash.

Default

true

Return type

Optional[bool]

repository_name

Use repositoryName while calculating the asset hash.

Default

true

Return type

Optional[bool]

target

Use target while calculating the asset hash.

Default

true

Return type

Optional[bool]