class Source
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppRunner.Alpha.Source |
![]() | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#Source |
![]() | software.amazon.awscdk.services.apprunner.alpha.Source |
![]() | aws_cdk.aws_apprunner_alpha.Source |
![]() | @aws-cdk/aws-apprunner-alpha ยป Source |
Implemented by
Asset
, Ecr
, Ecr
, Github
Represents the App Runner service source.
Example
import * as iam from 'aws-cdk-lib/aws-iam';
const service = new apprunner.Service(this, 'Service', {
source: apprunner.Source.fromEcrPublic({
imageConfiguration: { port: 8000 },
imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
}),
});
service.addToRolePolicy(new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ['s3:GetObject'],
resources: ['*'],
}))
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
Asset
Props
Returns
Source from local assets.
static fromEcr(props)
public static fromEcr(props: EcrProps): EcrSource
Parameters
- props
Ecr
Props
Returns
Source from the ECR repository.
static fromEcrPublic(props)
public static fromEcrPublic(props: EcrPublicProps): EcrPublicSource
Parameters
- props
Ecr
Public Props
Returns
Source from the ECR Public repository.
static fromGitHub(props)
public static fromGitHub(props: GithubRepositoryProps): GithubSource
Parameters
- props
Github
Repository Props
Returns
Source from the GitHub repository.