class Source
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppRunner.Source |
Java | software.amazon.awscdk.services.apprunner.Source |
Python | aws_cdk.aws_apprunner.Source |
TypeScript (source) | @aws-cdk/aws-apprunner » Source |
Implemented by
Asset, Ecr, Ecr, Github
Represents the App Runner service source.
Example
import * as assets from '@aws-cdk/aws-ecr-assets';
const imageAsset = new assets.DockerImageAsset(this, 'ImageAssets', {
directory: path.join(__dirname, './docker.assets'),
});
new apprunner.Service(this, 'Service', {
source: apprunner.Source.fromAsset({
imageConfiguration: { port: 8000 },
asset: imageAsset,
}),
});
Initializer
new Source()
Methods
| Name | Description |
|---|---|
| bind(scope) | Called when the Job is initialized to allow this object to bind. |
| static from | Source from local assets. |
| static from | Source from the ECR repository. |
| static from | Source from the ECR Public repository. |
| static from | Source from the GitHub repository. |
bind(scope)
public bind(scope: Construct): SourceConfig
Parameters
- scope
Construct
Returns
Called when the Job is initialized to allow this object to bind.
static fromAsset(props)
public static fromAsset(props: AssetProps): AssetSource
Parameters
- props
AssetProps
Returns
Source from local assets.
static fromEcr(props)
public static fromEcr(props: EcrProps): EcrSource
Parameters
- props
EcrProps
Returns
Source from the ECR repository.
static fromEcrPublic(props)
public static fromEcrPublic(props: EcrPublicProps): EcrPublicSource
Parameters
- props
EcrPublic Props
Returns
Source from the ECR Public repository.
static fromGitHub(props)
public static fromGitHub(props: GithubRepositoryProps): GithubSource
Parameters
- props
GithubRepository Props
Returns
Source from the GitHub repository.

.NET
Java
Python
TypeScript (