public static final class GitHubSourceOptions.Builder
extends java.lang.Object
GitHubSourceOptions
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
GitHubSourceOptions.Builder |
authentication(SecretValue authentication)
Sets the value of
GitHubSourceOptions.getAuthentication() |
GitHubSourceOptions |
build()
Builds the configured instance.
|
GitHubSourceOptions.Builder |
trigger(GitHubTrigger trigger)
Sets the value of
GitHubSourceOptions.getTrigger() |
public GitHubSourceOptions.Builder authentication(SecretValue authentication)
GitHubSourceOptions.getAuthentication()
authentication
- A GitHub OAuth token to use for authentication.
It is recommended to use a Secrets Manager Secret
to obtain the token:
SecretValue oauth = SecretValue.secretsManager("my-github-token");
The GitHub Personal Access Token should have these scopes:
this
public GitHubSourceOptions.Builder trigger(GitHubTrigger trigger)
GitHubSourceOptions.getTrigger()
trigger
- How AWS CodePipeline should be triggered.
With the default value "WEBHOOK", a webhook is created in GitHub that triggers the action.
With "POLL", CodePipeline periodically checks the source for changes.
With "None", the action is not triggered through changes in the source.
To use WEBHOOK
, your GitHub Personal Access Token should have
admin:repo_hook scope (in addition to the regular repo scope).
this
public GitHubSourceOptions build()
GitHubSourceOptions
java.lang.NullPointerException
- if any required attribute was not provided