GitHubSourceCodeProvider

class aws_cdk.aws_amplify_alpha.GitHubSourceCodeProvider(*, oauth_token, owner, repository)

Bases: object

(experimental) GitHub source code provider.

Stability:

experimental

ExampleMetadata:

infused

Example:

amplify_app = amplify.App(self, "App",
    source_code_provider=amplify.GitHubSourceCodeProvider(
        owner="<user>",
        repository="<repo>",
        oauth_token=SecretValue.secrets_manager("my-github-token")
    ),
    custom_response_headers=[amplify.CustomResponseHeader(
        pattern="*.json",
        headers={
            "custom-header-name-1": "custom-header-value-1",
            "custom-header-name-2": "custom-header-value-2"
        }
    ), amplify.CustomResponseHeader(
        pattern="/path/*",
        headers={
            "custom-header-name-1": "custom-header-value-2"
        }
    )
    ]
)
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

Methods

bind(_app)

(experimental) Binds the source code provider to an app.

Parameters:

_app (App)

Stability:

experimental

Return type:

SourceCodeProviderConfig