AssetProps

class aws_cdk.aws_apprunner.AssetProps(*, asset, image_configuration=None)

Bases: object

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

Parameters
  • asset (DockerImageAsset) – (experimental) Represents the docker image asset.

  • image_configuration (Optional[ImageConfiguration]) – (experimental) The image configuration for the image built from the asset. Default: - no image configuration will be passed. The default port will be 8080.

Stability

experimental

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner
import aws_cdk.aws_ecr_assets as ecr_assets

# docker_image_asset is of type DockerImageAsset

asset_props = apprunner.AssetProps(
    asset=docker_image_asset,

    # the properties below are optional
    image_configuration=apprunner.ImageConfiguration(
        environment={
            "environment_key": "environment"
        },
        port=123,
        start_command="startCommand"
    )
)

Attributes

asset

(experimental) Represents the docker image asset.

Stability

experimental

Return type

DockerImageAsset

image_configuration

(experimental) The image configuration for the image built from the asset.

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]