Class SourceConfig
(experimental) Result of binding Source
into a Service
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public class SourceConfig : Object, ISourceConfig
Syntax (vb)
Public Class SourceConfig
Inherits Object
Implements ISourceConfig
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// 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;
using Amazon.CDK.AWS.ECR;
GitHubConnection gitHubConnection;
Repository repository;
Runtime runtime;
Secret secret;
var sourceConfig = new SourceConfig {
CodeRepository = 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"
}
},
EcrRepository = repository,
ImageRepository = new ImageRepository {
ImageIdentifier = "imageIdentifier",
ImageRepositoryType = ImageRepositoryType.ECR_PUBLIC,
// the properties below are optional
ImageConfiguration = new ImageConfiguration {
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
EnvironmentSecrets = new Dictionary<string, Secret> {
{ "environmentSecretsKey", secret }
},
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
Port = 123,
StartCommand = "startCommand"
}
}
};
Synopsis
Constructors
SourceConfig() |
Properties
CodeRepository | (experimental) The code repository configuration (mutually exclusive with |
EcrRepository | (experimental) The ECR repository (required to grant the pull privileges for the iam role). |
ImageRepository | (experimental) The image repository configuration (mutually exclusive with |
Constructors
SourceConfig()
public SourceConfig()
Properties
CodeRepository
(experimental) The code repository configuration (mutually exclusive with imageRepository
).
public ICodeRepositoryProps CodeRepository { get; set; }
Property Value
Remarks
Default: - no code repository.
Stability: Experimental
EcrRepository
(experimental) The ECR repository (required to grant the pull privileges for the iam role).
public IRepository EcrRepository { get; set; }
Property Value
Remarks
Default: - no ECR repository.
Stability: Experimental
ImageRepository
(experimental) The image repository configuration (mutually exclusive with codeRepository
).
public IImageRepository ImageRepository { get; set; }
Property Value
Remarks
Default: - no image repository.
Stability: Experimental