EcrProps

class aws_cdk.aws_apprunner.EcrProps(*, repository, image_configuration=None, tag=None, tag_or_digest=None)

Bases: object

(experimental) Properties of the image repository for Source.fromEcr().

Parameters
  • repository (IRepository) – (experimental) Represents the ECR repository.

  • image_configuration (Union[ImageConfiguration, Dict[str, Any], None]) – (experimental) The image configuration for the image from ECR. Default: - no image configuration will be passed. The default port will be 8080.

  • tag (Optional[str]) – (deprecated) Image tag. Default: - ‘latest’

  • tag_or_digest (Optional[str]) – (experimental) Image tag or digest (digests must start with sha256:). Default: - ‘latest’

Stability

experimental

ExampleMetadata

infused

Example:

import aws_cdk.aws_ecr as ecr


apprunner.Service(self, "Service",
    source=apprunner.Source.from_ecr(
        image_configuration=apprunner.ImageConfiguration(port=80),
        repository=ecr.Repository.from_repository_name(self, "NginxRepository", "nginx"),
        tag_or_digest="latest"
    )
)

Attributes

image_configuration

(experimental) The image configuration for the image from ECR.

Default
  • no image configuration will be passed. The default port will be 8080.

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-port

Stability

experimental

Return type

Optional[ImageConfiguration]

repository

(experimental) Represents the ECR repository.

Stability

experimental

Return type

IRepository

tag

(deprecated) Image tag.

Default
  • ‘latest’

Deprecated

use tagOrDigest

Stability

deprecated

Return type

Optional[str]

tag_or_digest

(experimental) Image tag or digest (digests must start with sha256:).

Default
  • ‘latest’

Stability

experimental

Return type

Optional[str]