GithubSource

class aws_cdk.aws_apprunner.GithubSource(*, branch=None, code_configuration_values=None, configuration_source, connection, repository_url)

Bases: aws_cdk.aws_apprunner.Source

(experimental) Represents the service source from a Github repository.

Stability

experimental

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

# git_hub_connection is of type GitHubConnection
# runtime is of type Runtime

github_source = apprunner.GithubSource(
    configuration_source=apprunner.ConfigurationSourceType.REPOSITORY,
    connection=git_hub_connection,
    repository_url="repositoryUrl",

    # the properties below are optional
    branch="branch",
    code_configuration_values=apprunner.CodeConfigurationValues(
        runtime=runtime,

        # the properties below are optional
        build_command="buildCommand",
        environment={
            "environment_key": "environment"
        },
        port="port",
        start_command="startCommand"
    )
)
Parameters
  • branch (Optional[str]) – (experimental) The branch name that represents a specific version for the repository. Default: main

  • code_configuration_values (Optional[CodeConfigurationValues]) – (experimental) The code configuration values. Will be ignored if configurationSource is REPOSITORY. Default: - no values will be passed. The apprunner.yaml from the github reopsitory will be used instead.

  • configuration_source (ConfigurationSourceType) – (experimental) The source of the App Runner configuration.

  • connection (GitHubConnection) – (experimental) ARN of the connection to Github. Only required for Github source.

  • repository_url (str) – (experimental) The location of the repository that contains the source code.

Stability

experimental

Methods

bind(_scope)

(experimental) Called when the Job is initialized to allow this object to bind.

Parameters

_scope (Construct) –

Stability

experimental

Return type

SourceConfig

Static Methods

classmethod from_asset(*, asset, image_configuration=None)

(experimental) Source from local assets.

Parameters
  • asset (DockerImageAsset) – (experimental) Represents the docker image asset.

  • image_configuration (Optional[ImageConfiguration]) – (experimental) The image configuration for the image built from the asset. Default: - no image configuration will be passed. The default port will be 8080.

Stability

experimental

Return type

AssetSource

classmethod from_ecr(*, image_configuration=None, repository, tag=None)

(experimental) Source from the ECR repository.

Parameters
  • image_configuration (Optional[ImageConfiguration]) – (experimental) The image configuration for the image from ECR. Default: - no image configuration will be passed. The default port will be 8080.

  • repository (IRepository) – (experimental) Represents the ECR repository.

  • tag (Optional[str]) – (experimental) Image tag. Default: - ‘latest’

Stability

experimental

Return type

EcrSource

classmethod from_ecr_public(*, image_configuration=None, image_identifier)

(experimental) Source from the ECR Public repository.

Parameters
  • image_configuration (Optional[ImageConfiguration]) – (experimental) The image configuration for the image from ECR Public. Default: - no image configuration will be passed. The default port will be 8080.

  • image_identifier (str) – (experimental) The ECR Public image URI.

Stability

experimental

Return type

EcrPublicSource

classmethod from_git_hub(*, branch=None, code_configuration_values=None, configuration_source, connection, repository_url)

(experimental) Source from the GitHub repository.

Parameters
  • branch (Optional[str]) – (experimental) The branch name that represents a specific version for the repository. Default: main

  • code_configuration_values (Optional[CodeConfigurationValues]) – (experimental) The code configuration values. Will be ignored if configurationSource is REPOSITORY. Default: - no values will be passed. The apprunner.yaml from the github reopsitory will be used instead.

  • configuration_source (ConfigurationSourceType) – (experimental) The source of the App Runner configuration.

  • connection (GitHubConnection) – (experimental) ARN of the connection to Github. Only required for Github source.

  • repository_url (str) – (experimental) The location of the repository that contains the source code.

Stability

experimental

Return type

GithubSource