interface SourceConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppRunner.Alpha.SourceConfig |
Go | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#SourceConfig |
Java | software.amazon.awscdk.services.apprunner.alpha.SourceConfig |
Python | aws_cdk.aws_apprunner_alpha.SourceConfig |
TypeScript (source) | @aws-cdk/aws-apprunner-alpha » SourceConfig |
Obtainable from
Asset
.bind()
, Ecr
.bind()
, Ecr
.bind()
, Github
.bind()
, Source
.bind()
Result of binding Source
into a Service
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner_alpha from '@aws-cdk/aws-apprunner-alpha';
import { aws_ecr as ecr } from 'aws-cdk-lib';
declare const gitHubConnection: apprunner_alpha.GitHubConnection;
declare const repository: ecr.Repository;
declare const runtime: apprunner_alpha.Runtime;
declare const secret: apprunner_alpha.Secret;
const sourceConfig: apprunner_alpha.SourceConfig = {
codeRepository: {
codeConfiguration: {
configurationSource: apprunner_alpha.ConfigurationSourceType.REPOSITORY,
// the properties below are optional
configurationValues: {
runtime: runtime,
// the properties below are optional
buildCommand: 'buildCommand',
environment: {
environmentKey: 'environment',
},
environmentSecrets: {
environmentSecretsKey: secret,
},
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
port: 'port',
startCommand: 'startCommand',
},
},
connection: gitHubConnection,
repositoryUrl: 'repositoryUrl',
sourceCodeVersion: {
type: 'type',
value: 'value',
},
},
ecrRepository: repository,
imageRepository: {
imageIdentifier: 'imageIdentifier',
imageRepositoryType: apprunner_alpha.ImageRepositoryType.ECR_PUBLIC,
// the properties below are optional
imageConfiguration: {
environment: {
environmentKey: 'environment',
},
environmentSecrets: {
environmentSecretsKey: secret,
},
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
port: 123,
startCommand: 'startCommand',
},
},
};
Properties
Name | Type | Description |
---|---|---|
code | Code | The code repository configuration (mutually exclusive with imageRepository ). |
ecr | IRepository | The ECR repository (required to grant the pull privileges for the iam role). |
image | Image | The image repository configuration (mutually exclusive with codeRepository ). |
codeRepository?
Type:
Code
(optional, default: no code repository.)
The code repository configuration (mutually exclusive with imageRepository
).
ecrRepository?
Type:
IRepository
(optional, default: no ECR repository.)
The ECR repository (required to grant the pull privileges for the iam role).
imageRepository?
Type:
Image
(optional, default: no image repository.)
The image repository configuration (mutually exclusive with codeRepository
).