SourceConfigurationProperty Struct
Describes the source deployed to an AWS App Runner service.
It can be a code or an image repository.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apprunner as apprunner } from 'aws-cdk-lib';
const sourceConfigurationProperty: apprunner.CfnService.SourceConfigurationProperty = {
authenticationConfiguration: {
accessRoleArn: 'accessRoleArn',
connectionArn: 'connectionArn',
},
autoDeploymentsEnabled: false,
codeRepository: {
repositoryUrl: 'repositoryUrl',
sourceCodeVersion: {
type: 'type',
value: 'value',
},
// the properties below are optional
codeConfiguration: {
configurationSource: 'configurationSource',
// the properties below are optional
codeConfigurationValues: {
runtime: 'runtime',
// the properties below are optional
buildCommand: 'buildCommand',
port: 'port',
runtimeEnvironmentSecrets: [{
name: 'name',
value: 'value',
}],
runtimeEnvironmentVariables: [{
name: 'name',
value: 'value',
}],
startCommand: 'startCommand',
},
},
sourceDirectory: 'sourceDirectory',
},
imageRepository: {
imageIdentifier: 'imageIdentifier',
imageRepositoryType: 'imageRepositoryType',
// the properties below are optional
imageConfiguration: {
port: 'port',
runtimeEnvironmentSecrets: [{
name: 'name',
value: 'value',
}],
runtimeEnvironmentVariables: [{
name: 'name',
value: 'value',
}],
startCommand: 'startCommand',
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apprunner as apprunner
source_configuration_property = apprunner.CfnService.SourceConfigurationProperty(
authentication_configuration=apprunner.CfnService.AuthenticationConfigurationProperty(
access_role_arn="accessRoleArn",
connection_arn="connectionArn"
),
auto_deployments_enabled=False,
code_repository=apprunner.CfnService.CodeRepositoryProperty(
repository_url="repositoryUrl",
source_code_version=apprunner.CfnService.SourceCodeVersionProperty(
type="type",
value="value"
),
# the properties below are optional
code_configuration=apprunner.CfnService.CodeConfigurationProperty(
configuration_source="configurationSource",
# the properties below are optional
code_configuration_values=apprunner.CfnService.CodeConfigurationValuesProperty(
runtime="runtime",
# the properties below are optional
build_command="buildCommand",
port="port",
runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
name="name",
value="value"
)],
runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
name="name",
value="value"
)],
start_command="startCommand"
)
),
source_directory="sourceDirectory"
),
image_repository=apprunner.CfnService.ImageRepositoryProperty(
image_identifier="imageIdentifier",
image_repository_type="imageRepositoryType",
# the properties below are optional
image_configuration=apprunner.CfnService.ImageConfigurationProperty(
port="port",
runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
name="name",
value="value"
)],
runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
name="name",
value="value"
)],
start_command="startCommand"
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apprunner.*;
SourceConfigurationProperty sourceConfigurationProperty = SourceConfigurationProperty.builder()
.authenticationConfiguration(AuthenticationConfigurationProperty.builder()
.accessRoleArn("accessRoleArn")
.connectionArn("connectionArn")
.build())
.autoDeploymentsEnabled(false)
.codeRepository(CodeRepositoryProperty.builder()
.repositoryUrl("repositoryUrl")
.sourceCodeVersion(SourceCodeVersionProperty.builder()
.type("type")
.value("value")
.build())
// the properties below are optional
.codeConfiguration(CodeConfigurationProperty.builder()
.configurationSource("configurationSource")
// the properties below are optional
.codeConfigurationValues(CodeConfigurationValuesProperty.builder()
.runtime("runtime")
// the properties below are optional
.buildCommand("buildCommand")
.port("port")
.runtimeEnvironmentSecrets(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.runtimeEnvironmentVariables(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.startCommand("startCommand")
.build())
.build())
.sourceDirectory("sourceDirectory")
.build())
.imageRepository(ImageRepositoryProperty.builder()
.imageIdentifier("imageIdentifier")
.imageRepositoryType("imageRepositoryType")
// the properties below are optional
.imageConfiguration(ImageConfigurationProperty.builder()
.port("port")
.runtimeEnvironmentSecrets(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.runtimeEnvironmentVariables(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.startCommand("startCommand")
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppRunner;
var sourceConfigurationProperty = new SourceConfigurationProperty {
AuthenticationConfiguration = new AuthenticationConfigurationProperty {
AccessRoleArn = "accessRoleArn",
ConnectionArn = "connectionArn"
},
AutoDeploymentsEnabled = false,
CodeRepository = new CodeRepositoryProperty {
RepositoryUrl = "repositoryUrl",
SourceCodeVersion = new SourceCodeVersionProperty {
Type = "type",
Value = "value"
},
// the properties below are optional
CodeConfiguration = new CodeConfigurationProperty {
ConfigurationSource = "configurationSource",
// the properties below are optional
CodeConfigurationValues = new CodeConfigurationValuesProperty {
Runtime = "runtime",
// the properties below are optional
BuildCommand = "buildCommand",
Port = "port",
RuntimeEnvironmentSecrets = new [] { new KeyValuePairProperty {
Name = "name",
Value = "value"
} },
RuntimeEnvironmentVariables = new [] { new KeyValuePairProperty {
Name = "name",
Value = "value"
} },
StartCommand = "startCommand"
}
},
SourceDirectory = "sourceDirectory"
},
ImageRepository = new ImageRepositoryProperty {
ImageIdentifier = "imageIdentifier",
ImageRepositoryType = "imageRepositoryType",
// the properties below are optional
ImageConfiguration = new ImageConfigurationProperty {
Port = "port",
RuntimeEnvironmentSecrets = new [] { new KeyValuePairProperty {
Name = "name",
Value = "value"
} },
RuntimeEnvironmentVariables = new [] { new KeyValuePairProperty {
Name = "name",
Value = "value"
} },
StartCommand = "startCommand"
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
sourceConfigurationProperty := &SourceConfigurationProperty{
AuthenticationConfiguration: &AuthenticationConfigurationProperty{
AccessRoleArn: jsii.String("accessRoleArn"),
ConnectionArn: jsii.String("connectionArn"),
},
AutoDeploymentsEnabled: jsii.Boolean(false),
CodeRepository: &CodeRepositoryProperty{
RepositoryUrl: jsii.String("repositoryUrl"),
SourceCodeVersion: &SourceCodeVersionProperty{
Type: jsii.String("type"),
Value: jsii.String("value"),
},
// the properties below are optional
CodeConfiguration: &CodeConfigurationProperty{
ConfigurationSource: jsii.String("configurationSource"),
// the properties below are optional
CodeConfigurationValues: &CodeConfigurationValuesProperty{
Runtime: jsii.String("runtime"),
// the properties below are optional
BuildCommand: jsii.String("buildCommand"),
Port: jsii.String("port"),
RuntimeEnvironmentSecrets: []interface{}{
&KeyValuePairProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
RuntimeEnvironmentVariables: []interface{}{
&KeyValuePairProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
StartCommand: jsii.String("startCommand"),
},
},
SourceDirectory: jsii.String("sourceDirectory"),
},
ImageRepository: &ImageRepositoryProperty{
ImageIdentifier: jsii.String("imageIdentifier"),
ImageRepositoryType: jsii.String("imageRepositoryType"),
// the properties below are optional
ImageConfiguration: &ImageConfigurationProperty{
Port: jsii.String("port"),
RuntimeEnvironmentSecrets: []interface{}{
&KeyValuePairProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
RuntimeEnvironmentVariables: []interface{}{
&KeyValuePairProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
StartCommand: jsii.String("startCommand"),
},
},
}
Properties
authenticationConfigurationoptionalIResolvable | CfnService.AuthenticationConfigurationPropertyauthentication_configurationoptionaltyping.Union[IResolvable, AuthenticationConfigurationProperty]authenticationConfigurationoptionalIResolvableAuthenticationConfigurationoptionalIResolvableAuthenticationConfigurationoptionalinterface{}#Describes the resources that are needed to authenticate access to some source repositories.
autoDeploymentsEnabledoptionalboolean | IResolvableauto_deployments_enabledoptionaltyping.Union[bool, IResolvable]autoDeploymentsEnabledoptionalBooleanAutoDeploymentsEnabledoptionalboolAutoDeploymentsEnabledoptionalinterface{}#If `true` , continuous integration from the source repository is enabled for the App Runner service.
notes
Each repository change (including any source code commit or new image version) starts a deployment.
Default: App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
codeRepositoryoptionalIResolvable | CfnService.CodeRepositoryPropertycode_repositoryoptionaltyping.Union[IResolvable, CodeRepositoryProperty]codeRepositoryoptionalIResolvableCodeRepositoryoptionalIResolvableCodeRepositoryoptionalinterface{}#The description of a source code repository.
You must provide either this member or ImageRepository (but not both).
imageRepositoryoptionalIResolvable | CfnService.ImageRepositoryPropertyimage_repositoryoptionaltyping.Union[IResolvable, ImageRepositoryProperty]imageRepositoryoptionalIResolvableImageRepositoryoptionalIResolvableImageRepositoryoptionalinterface{}#The description of a source image repository.
You must provide either this member or CodeRepository (but not both).