GitHubSourceCodeProviderProps

class aws_cdk.aws_amplify.GitHubSourceCodeProviderProps(*, oauth_token, owner, repository)

Bases: object

(experimental) Properties for a GitHub source code provider.

Parameters
  • oauth_token (SecretValue) – (experimental) A personal access token with the repo scope.

  • owner (str) – (experimental) The user or organization owning the repository.

  • repository (str) – (experimental) The name of the repository.

Stability

experimental

Example:

# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.aws_codebuild as codebuild
import aws_cdk.aws_amplify as amplify
import aws_cdk.core as cdk

amplify_app = amplify.App(self, "MyApp",
    source_code_provider=amplify.GitHubSourceCodeProvider(
        owner="<user>",
        repository="<repo>",
        oauth_token=cdk.SecretValue.secrets_manager("my-github-token")
    ),
    build_spec=codebuild.BuildSpec.from_object_to_yaml({ # Alternatively add a `amplify.yml` to the repo
        "version": "1.0",
        "frontend": {
            "phases": {
                "pre_build": {
                    "commands": ["yarn"
                    ]
                },
                "build": {
                    "commands": ["yarn build"
                    ]
                }
            },
            "artifacts": {
                "base_directory": "public",
                "files": -"**/*"
            }
        }})
)

Attributes

oauth_token

(experimental) A personal access token with the repo scope.

Stability

experimental

Return type

SecretValue

owner

(experimental) The user or organization owning the repository.

Stability

experimental

Return type

str

repository

(experimental) The name of the repository.

Stability

experimental

Return type

str