Experimental
@aws-cdk/aws-apprunner-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
CodeRepositoryProps Struct
Properties of the CodeRepository.
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 gitHubConnection: apprunner_alpha.GitHubConnection;
declare const runtime: apprunner_alpha.Runtime;
declare const secret: apprunner_alpha.Secret;
const codeRepositoryProps: apprunner_alpha.CodeRepositoryProps = {
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',
},
};
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
# git_hub_connection: apprunner_alpha.GitHubConnection
# runtime: apprunner_alpha.Runtime
# secret: apprunner_alpha.Secret
code_repository_props = apprunner_alpha.CodeRepositoryProps(
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"
)
),
connection=git_hub_connection,
repository_url="repositoryUrl",
source_code_version=apprunner_alpha.SourceCodeVersion(
type="type",
value="value"
)
)
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.*;
GitHubConnection gitHubConnection;
Runtime runtime;
Secret secret;
CodeRepositoryProps codeRepositoryProps = CodeRepositoryProps.builder()
.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())
.connection(gitHubConnection)
.repositoryUrl("repositoryUrl")
.sourceCodeVersion(SourceCodeVersion.builder()
.type("type")
.value("value")
.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;
GitHubConnection gitHubConnection;
Runtime runtime;
Secret secret;
var codeRepositoryProps = new CodeRepositoryProps {
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"
}
},
Connection = gitHubConnection,
RepositoryUrl = "repositoryUrl",
SourceCodeVersion = new SourceCodeVersion {
Type = "type",
Value = "value"
}
};
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 gitHubConnection GitHubConnection
var runtime Runtime
var secret Secret
codeRepositoryProps := &CodeRepositoryProps{
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"),
},
},
Connection: gitHubConnection,
RepositoryUrl: jsii.String("repositoryUrl"),
SourceCodeVersion: &SourceCodeVersion{
Type: jsii.String("type"),
Value: jsii.String("value"),
},
}
Properties
codeConfigurationCodeConfigurationcode_configurationCodeConfigurationcodeConfigurationCodeConfigurationCodeConfigurationCodeConfigurationCodeConfigurationCodeConfigurationrequired#Configuration for building and running the service from a source code repository.
connectionGitHubConnectionconnectionGitHubConnectionconnectionGitHubConnectionConnectionGitHubConnectionConnectionGitHubConnectionrequired#The App Runner connection for GitHub.
repositoryUrlstringrepository_urlstrrepositoryUrlStringRepositoryUrlstringRepositoryUrl*stringrequired#The location of the repository that contains the source code.
sourceCodeVersionSourceCodeVersionsource_code_versionSourceCodeVersionsourceCodeVersionSourceCodeVersionSourceCodeVersionSourceCodeVersionSourceCodeVersionSourceCodeVersionrequired#The version that should be used within the source code repository.