Experimental
@aws-cdk/aws-apprunner-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
CodeConfiguration Struct
Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.
Example
ts
// 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';
declare const runtime: apprunner_alpha.Runtime;
declare const secret: apprunner_alpha.Secret;
const codeConfiguration: apprunner_alpha.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',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner_alpha as apprunner_alpha
# runtime: apprunner_alpha.Runtime
# secret: apprunner_alpha.Secret
code_configuration = apprunner_alpha.CodeConfiguration(
configuration_source=apprunner_alpha.ConfigurationSourceType.REPOSITORY,
# the properties below are optional
configuration_values=apprunner_alpha.CodeConfigurationValues(
runtime=runtime,
# the properties below are optional
build_command="buildCommand",
environment={
"environment_key": "environment"
},
environment_secrets={
"environment_secrets_key": secret
},
environment_variables={
"environment_variables_key": "environmentVariables"
},
port="port",
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.alpha.*;
Runtime runtime;
Secret secret;
CodeConfiguration codeConfiguration = CodeConfiguration.builder()
.configurationSource(ConfigurationSourceType.REPOSITORY)
// the properties below are optional
.configurationValues(CodeConfigurationValues.builder()
.runtime(runtime)
// the properties below are optional
.buildCommand("buildCommand")
.environment(Map.of(
"environmentKey", "environment"))
.environmentSecrets(Map.of(
"environmentSecretsKey", secret))
.environmentVariables(Map.of(
"environmentVariablesKey", "environmentVariables"))
.port("port")
.startCommand("startCommand")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.AppRunner.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppRunner.Alpha;
Runtime runtime;
Secret secret;
var codeConfiguration = new CodeConfiguration {
ConfigurationSource = ConfigurationSourceType.REPOSITORY,
// the properties below are optional
ConfigurationValues = new CodeConfigurationValues {
Runtime = runtime,
// the properties below are optional
BuildCommand = "buildCommand",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
EnvironmentSecrets = new Dictionary<string, Secret> {
{ "environmentSecretsKey", secret }
},
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
Port = "port",
StartCommand = "startCommand"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import apprunner_alpha "github.com/aws/aws-cdk-go/awscdkapprunneralpha"
var runtime Runtime
var secret Secret
codeConfiguration := &CodeConfiguration{
ConfigurationSource: apprunner_alpha.ConfigurationSourceType_REPOSITORY,
// the properties below are optional
ConfigurationValues: &CodeConfigurationValues{
Runtime: runtime,
// the properties below are optional
BuildCommand: jsii.String("buildCommand"),
Environment: map[string]*string{
"environmentKey": jsii.String("environment"),
},
EnvironmentSecrets: map[string]Secret{
"environmentSecretsKey": secret,
},
EnvironmentVariables: map[string]*string{
"environmentVariablesKey": jsii.String("environmentVariables"),
},
Port: jsii.String("port"),
StartCommand: jsii.String("startCommand"),
},
}
Properties
configurationSourceConfigurationSourceTypeconfiguration_sourceConfigurationSourceTypeconfigurationSourceConfigurationSourceTypeConfigurationSourceConfigurationSourceTypeConfigurationSourceConfigurationSourceTyperequired#The source of the App Runner configuration.
configurationValuesoptionalCodeConfigurationValuesconfiguration_valuesoptionalCodeConfigurationValuesconfigurationValuesoptionalCodeConfigurationValuesConfigurationValuesoptionalCodeConfigurationValuesConfigurationValuesoptionalCodeConfigurationValues#The basic configuration for building and running the App Runner service.
Default: not specified. Use apprunner.yaml instead.
Use it to quickly launch an App Runner service without providing a apprunner.yaml file in the source code repository (or ignoring the file if it exists).