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.
Asset(props)
static frompublic static fromAsset(props: AssetProps): AssetSource
Parameters
- props
Asset
Props
Returns
Source from local assets.
Ecr(props)
static frompublic static fromEcr(props: EcrProps): EcrSource
Parameters
- props
Ecr
Props
Returns
Source from the ECR repository.
EcrPublic(props)
static frompublic static fromEcrPublic(props: EcrPublicProps): EcrPublicSource
Parameters
- props
Ecr
Public Props
Returns
Source from the ECR Public repository.
GitHub(props)
static frompublic static fromGitHub(props: GithubRepositoryProps): GithubSource
Parameters
- props
Github
Repository Props
Returns
Source from the GitHub repository.