GithubSource

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

Bases: Source

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

Stability:

experimental

ExampleMetadata:

fixture=_generated

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_alpha as apprunner_alpha

# git_hub_connection: apprunner_alpha.GitHubConnection
# runtime: apprunner_alpha.Runtime
# secret: apprunner_alpha.Secret

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

    # the properties below are optional
    branch="branch",
    code_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"
    )
)
Parameters:
  • 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.

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

  • code_configuration_values (Union[CodeConfigurationValues, Dict[str, Any], None]) – (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.

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 (Union[ImageConfiguration, Dict[str, Any], None]) – (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(*, repository, image_configuration=None, tag=None, tag_or_digest=None)

(experimental) Source from the ECR repository.

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

  • image_configuration (Union[ImageConfiguration, Dict[str, Any], None]) – (experimental) The image configuration for the image from ECR. Default: - no image configuration will be passed. The default port will be 8080.

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

  • tag_or_digest (Optional[str]) – (experimental) Image tag or digest (digests must start with sha256:). Default: - ‘latest’

Stability:

experimental

Return type:

EcrSource

classmethod from_ecr_public(*, image_identifier, image_configuration=None)

(experimental) Source from the ECR Public repository.

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

  • image_configuration (Union[ImageConfiguration, Dict[str, Any], None]) – (experimental) The image configuration for the image from ECR Public. Default: - no image configuration will be passed. The default port will be 8080.

Stability:

experimental

Return type:

EcrPublicSource

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

(experimental) Source from the GitHub repository.

Parameters:
  • 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.

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

  • code_configuration_values (Union[CodeConfigurationValues, Dict[str, Any], None]) – (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.

Stability:

experimental

Return type:

GithubSource