Skip to content

Put Webhook

codepipeline_put_webhook R Documentation

Defines a webhook and returns a unique webhook URL generated by CodePipeline

Description

Defines a webhook and returns a unique webhook URL generated by CodePipeline. This URL can be supplied to third party source hosting providers to call every time there's a code change. When CodePipeline receives a POST request on this URL, the pipeline defined in the webhook is started as long as the POST request satisfied the authentication and filtering requirements supplied when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty APIs can be used to automatically configure supported third parties to call the generated webhook URL.

When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.

If a secret token was provided, it will be redacted in the response.

Usage

codepipeline_put_webhook(webhook, tags)

Arguments

webhook

[required] The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it's used for later.

tags

The tags for the webhook.

Value

A list with the following syntax:

list(
  webhook = list(
    definition = list(
      name = "string",
      targetPipeline = "string",
      targetAction = "string",
      filters = list(
        list(
          jsonPath = "string",
          matchEquals = "string"
        )
      ),
      authentication = "GITHUB_HMAC"|"IP"|"UNAUTHENTICATED",
      authenticationConfiguration = list(
        AllowedIPRange = "string",
        SecretToken = "string"
      )
    ),
    url = "string",
    errorMessage = "string",
    errorCode = "string",
    lastTriggered = as.POSIXct(
      "2015-01-01"
    ),
    arn = "string",
    tags = list(
      list(
        key = "string",
        value = "string"
      )
    )
  )
)

Request syntax

svc$put_webhook(
  webhook = list(
    name = "string",
    targetPipeline = "string",
    targetAction = "string",
    filters = list(
      list(
        jsonPath = "string",
        matchEquals = "string"
      )
    ),
    authentication = "GITHUB_HMAC"|"IP"|"UNAUTHENTICATED",
    authenticationConfiguration = list(
      AllowedIPRange = "string",
      SecretToken = "string"
    )
  ),
  tags = list(
    list(
      key = "string",
      value = "string"
    )
  )
)