AssetSource
- class aws_cdk.aws_apprunner.AssetSource(*, asset, image_configuration=None)
Bases:
Source
(experimental) Represents the source from local assets.
- Stability:
experimental
- 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_apprunner as apprunner import aws_cdk.aws_ecr_assets as ecr_assets # docker_image_asset: ecr_assets.DockerImageAsset asset_source = apprunner.AssetSource( asset=docker_image_asset, # the properties below are optional image_configuration=apprunner.ImageConfiguration( environment={ "environment_key": "environment" }, port=123, start_command="startCommand" ) )
- Parameters:
asset (
DockerImageAsset
) – (experimental) Represents the docker image asset.image_configuration (
Union
[ImageConfiguration
,Dict
[str
,Any
],None
]) – (experimental) The image configuration for the image built from the asset. Default: - no image configuration will be passed. The defaultport
will be 8080.
- Stability:
experimental
Methods
- bind(_scope)
(experimental) Called when the Job is initialized to allow this object to bind.
- Parameters:
_scope (
Construct
) –- Stability:
experimental
- Return type:
Static Methods
- classmethod from_asset(*, asset, image_configuration=None)
(experimental) Source from local assets.
- Parameters:
asset (
DockerImageAsset
) – (experimental) Represents the docker image asset.image_configuration (
Union
[ImageConfiguration
,Dict
[str
,Any
],None
]) – (experimental) The image configuration for the image built from the asset. Default: - no image configuration will be passed. The defaultport
will be 8080.
- Stability:
experimental
- Return type:
- classmethod from_ecr(*, repository, image_configuration=None, tag=None, tag_or_digest=None)
(experimental) Source from the ECR repository.
- 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 defaultport
will be 8080.tag (
Optional
[str
]) – (deprecated) Image tag. Default: - ‘latest’tag_or_digest (
Optional
[str
]) – (experimental) Image tag or digest (digests must start withsha256:
). Default: - ‘latest’
- Stability:
experimental
- Return type:
- classmethod from_ecr_public(*, image_identifier, image_configuration=None)
(experimental) Source from the ECR Public repository.
- Parameters:
image_identifier (
str
) – (experimental) The ECR Public image URI.image_configuration (
Union
[ImageConfiguration
,Dict
[str
,Any
],None
]) – (experimental) The image configuration for the image from ECR Public. Default: - no image configuration will be passed. The defaultport
will be 8080.
- Stability:
experimental
- Return type:
- classmethod from_git_hub(*, configuration_source, connection, repository_url, branch=None, code_configuration_values=None)
(experimental) Source from the GitHub repository.
- Parameters:
configuration_source (
ConfigurationSourceType
) – (experimental) The source of the App Runner configuration.connection (
GitHubConnection
) – (experimental) ARN of the connection to Github. Only required for Github source.repository_url (
str
) – (experimental) The location of the repository that contains the source code.branch (
Optional
[str
]) – (experimental) The branch name that represents a specific version for the repository. Default: maincode_configuration_values (
Union
[CodeConfigurationValues
,Dict
[str
,Any
],None
]) – (experimental) The code configuration values. Will be ignored if configurationSource isREPOSITORY
. Default: - no values will be passed. Theapprunner.yaml
from the github reopsitory will be used instead.
- Stability:
experimental
- Return type: