Interface Webhook.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Webhook.Builder,Webhook>, SdkBuilder<Webhook.Builder,Webhook>, SdkPojo
Enclosing class:
Webhook

@Mutable @NotThreadSafe public static interface Webhook.Builder extends SdkPojo, CopyableBuilder<Webhook.Builder,Webhook>
  • Method Details

    • url

      The URL to the webhook.

      Parameters:
      url - The URL to the webhook.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • payloadUrl

      Webhook.Builder payloadUrl(String payloadUrl)

      The CodeBuild endpoint where webhook events are sent.

      Parameters:
      payloadUrl - The CodeBuild endpoint where webhook events are sent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • secret

      Webhook.Builder secret(String secret)

      The secret token of the associated repository.

      A Bitbucket webhook does not support secret.

      Parameters:
      secret - The secret token of the associated repository.

      A Bitbucket webhook does not support secret.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • branchFilter

      Webhook.Builder branchFilter(String branchFilter)

      A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

      It is recommended that you use filterGroups instead of branchFilter.

      Parameters:
      branchFilter - A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

      It is recommended that you use filterGroups instead of branchFilter.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filterGroups

      Webhook.Builder filterGroups(Collection<? extends Collection<WebhookFilter>> filterGroups)

      An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

      For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

      Parameters:
      filterGroups - An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

      For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filterGroups

      Webhook.Builder filterGroups(Collection<WebhookFilter>... filterGroups)

      An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

      For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

      Parameters:
      filterGroups - An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

      For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • buildType

      Webhook.Builder buildType(String buildType)

      Specifies the type of build this webhook will trigger.

      RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the CodeBuild user guide.

      Parameters:
      buildType - Specifies the type of build this webhook will trigger.

      RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the CodeBuild user guide.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • buildType

      Webhook.Builder buildType(WebhookBuildType buildType)

      Specifies the type of build this webhook will trigger.

      RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the CodeBuild user guide.

      Parameters:
      buildType - Specifies the type of build this webhook will trigger.

      RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the CodeBuild user guide.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • manualCreation

      Webhook.Builder manualCreation(Boolean manualCreation)

      If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns payloadUrl and secret values for the webhook. The payloadUrl and secret values in the output can be used to manually create a webhook within GitHub.

      manualCreation is only available for GitHub webhooks.

      Parameters:
      manualCreation - If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns payloadUrl and secret values for the webhook. The payloadUrl and secret values in the output can be used to manually create a webhook within GitHub.

      manualCreation is only available for GitHub webhooks.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lastModifiedSecret

      Webhook.Builder lastModifiedSecret(Instant lastModifiedSecret)

      A timestamp that indicates the last time a repository's secret token was modified.

      Parameters:
      lastModifiedSecret - A timestamp that indicates the last time a repository's secret token was modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scopeConfiguration

      Webhook.Builder scopeConfiguration(ScopeConfiguration scopeConfiguration)

      The scope configuration for global or organization webhooks.

      Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.

      Parameters:
      scopeConfiguration - The scope configuration for global or organization webhooks.

      Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scopeConfiguration

      default Webhook.Builder scopeConfiguration(Consumer<ScopeConfiguration.Builder> scopeConfiguration)

      The scope configuration for global or organization webhooks.

      Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.

      This is a convenience method that creates an instance of the ScopeConfiguration.Builder avoiding the need to create one manually via ScopeConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to scopeConfiguration(ScopeConfiguration).

      Parameters:
      scopeConfiguration - a consumer that will call methods on ScopeConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      Webhook.Builder status(String status)

      The status of the webhook. Valid values include:

      • CREATING: The webhook is being created.

      • CREATE_FAILED: The webhook has failed to create.

      • ACTIVE: The webhook has succeeded and is active.

      • DELETING: The webhook is being deleted.

      Parameters:
      status - The status of the webhook. Valid values include:

      • CREATING: The webhook is being created.

      • CREATE_FAILED: The webhook has failed to create.

      • ACTIVE: The webhook has succeeded and is active.

      • DELETING: The webhook is being deleted.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the webhook. Valid values include:

      • CREATING: The webhook is being created.

      • CREATE_FAILED: The webhook has failed to create.

      • ACTIVE: The webhook has succeeded and is active.

      • DELETING: The webhook is being deleted.

      Parameters:
      status - The status of the webhook. Valid values include:

      • CREATING: The webhook is being created.

      • CREATE_FAILED: The webhook has failed to create.

      • ACTIVE: The webhook has succeeded and is active.

      • DELETING: The webhook is being deleted.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusMessage

      Webhook.Builder statusMessage(String statusMessage)

      A message associated with the status of a webhook.

      Parameters:
      statusMessage - A message associated with the status of a webhook.
      Returns:
      Returns a reference to this object so that method calls can be chained together.