class Source
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.AppRunner.Alpha.Source | 
|  Go | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#Source | 
|  Java | software.amazon.awscdk.services.apprunner.alpha.Source | 
|  Python | aws_cdk.aws_apprunner_alpha.Source | 
|  TypeScript (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 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.
