Interface SourceConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
SourceConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:11.643Z") @Stability(Experimental) public interface SourceConfig extends software.amazon.jsii.JsiiSerializable
(experimental) 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 software.amazon.awscdk.services.apprunner.alpha.*;
 import software.amazon.awscdk.services.ecr.*;
 GitHubConnection gitHubConnection;
 Repository repository;
 Runtime runtime;
 Secret secret;
 SourceConfig sourceConfig = SourceConfig.builder()
         .codeRepository(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())
         .ecrRepository(repository)
         .imageRepository(ImageRepository.builder()
                 .imageIdentifier("imageIdentifier")
                 .imageRepositoryType(ImageRepositoryType.ECR_PUBLIC)
                 // the properties below are optional
                 .imageConfiguration(ImageConfiguration.builder()
                         .environment(Map.of(
                                 "environmentKey", "environment"))
                         .environmentSecrets(Map.of(
                                 "environmentSecretsKey", secret))
                         .environmentVariables(Map.of(
                                 "environmentVariablesKey", "environmentVariables"))
                         .port(123)
                         .startCommand("startCommand")
                         .build())
                 .build())
         .build();
 
  • Method Details

    • getCodeRepository

      @Stability(Experimental) @Nullable default CodeRepositoryProps getCodeRepository()
      (experimental) The code repository configuration (mutually exclusive with imageRepository).

      Default: - no code repository.

    • getEcrRepository

      @Stability(Experimental) @Nullable default IRepository getEcrRepository()
      (experimental) The ECR repository (required to grant the pull privileges for the iam role).

      Default: - no ECR repository.

    • getImageRepository

      @Stability(Experimental) @Nullable default ImageRepository getImageRepository()
      (experimental) The image repository configuration (mutually exclusive with codeRepository).

      Default: - no image repository.

    • builder

      @Stability(Experimental) static SourceConfig.Builder builder()
      Returns:
      a SourceConfig.Builder of SourceConfig