import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CodePipelineClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodePipelineClient"; import type { PutWebhookInput, PutWebhookOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link PutWebhookCommand}. */ export interface PutWebhookCommandInput extends PutWebhookInput { } /** * @public * * The output of {@link PutWebhookCommand}. */ export interface PutWebhookCommandOutput extends PutWebhookOutput, __MetadataBearer { } declare const PutWebhookCommand_base: { new (input: PutWebhookCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: PutWebhookCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

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.

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CodePipelineClient, PutWebhookCommand } from "@aws-sdk/client-codepipeline"; // ES Modules import * // const { CodePipelineClient, PutWebhookCommand } = require("@aws-sdk/client-codepipeline"); // CommonJS import * // import type { CodePipelineClientConfig } from "@aws-sdk/client-codepipeline"; * const config = {}; // type is CodePipelineClientConfig * const client = new CodePipelineClient(config); * const input = { // PutWebhookInput * webhook: { // WebhookDefinition * name: "STRING_VALUE", // required * targetPipeline: "STRING_VALUE", // required * targetAction: "STRING_VALUE", // required * filters: [ // WebhookFilters // required * { // WebhookFilterRule * jsonPath: "STRING_VALUE", // required * matchEquals: "STRING_VALUE", * }, * ], * authentication: "GITHUB_HMAC" || "IP" || "UNAUTHENTICATED", // required * authenticationConfiguration: { // WebhookAuthConfiguration * AllowedIPRange: "STRING_VALUE", * SecretToken: "STRING_VALUE", * }, * }, * tags: [ // TagList * { // Tag * key: "STRING_VALUE", // required * value: "STRING_VALUE", // required * }, * ], * }; * const command = new PutWebhookCommand(input); * const response = await client.send(command); * // { // PutWebhookOutput * // webhook: { // ListWebhookItem * // definition: { // WebhookDefinition * // name: "STRING_VALUE", // required * // targetPipeline: "STRING_VALUE", // required * // targetAction: "STRING_VALUE", // required * // filters: [ // WebhookFilters // required * // { // WebhookFilterRule * // jsonPath: "STRING_VALUE", // required * // matchEquals: "STRING_VALUE", * // }, * // ], * // authentication: "GITHUB_HMAC" || "IP" || "UNAUTHENTICATED", // required * // authenticationConfiguration: { // WebhookAuthConfiguration * // AllowedIPRange: "STRING_VALUE", * // SecretToken: "STRING_VALUE", * // }, * // }, * // url: "STRING_VALUE", // required * // errorMessage: "STRING_VALUE", * // errorCode: "STRING_VALUE", * // lastTriggered: new Date("TIMESTAMP"), * // arn: "STRING_VALUE", * // tags: [ // TagList * // { // Tag * // key: "STRING_VALUE", // required * // value: "STRING_VALUE", // required * // }, * // ], * // }, * // }; * * ``` * * @param PutWebhookCommandInput - {@link PutWebhookCommandInput} * @returns {@link PutWebhookCommandOutput} * @see {@link PutWebhookCommandInput} for command's `input` shape. * @see {@link PutWebhookCommandOutput} for command's `response` shape. * @see {@link CodePipelineClientResolvedConfig | config} for CodePipelineClient's `config` shape. * * @throws {@link ConcurrentModificationException} (client fault) *

Unable to modify the tag due to a simultaneous update request.

* * @throws {@link InvalidTagsException} (client fault) *

The specified resource tags are invalid.

* * @throws {@link InvalidWebhookAuthenticationParametersException} (client fault) *

The specified authentication type is in an invalid format.

* * @throws {@link InvalidWebhookFilterPatternException} (client fault) *

The specified event filter rule is in an invalid format.

* * @throws {@link LimitExceededException} (client fault) *

The number of pipelines associated with the Amazon Web Services account has exceeded * the limit allowed for the account.

* * @throws {@link PipelineNotFoundException} (client fault) *

The pipeline was specified in an invalid format or cannot be found.

* * @throws {@link TooManyTagsException} (client fault) *

The tags limit for a resource has been exceeded.

* * @throws {@link ValidationException} (client fault) *

The validation was specified in an invalid format.

* * @throws {@link CodePipelineServiceException} *

Base exception class for all service exceptions from CodePipeline service.

* * * @public */ export declare class PutWebhookCommand extends PutWebhookCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutWebhookInput; output: PutWebhookOutput; }; sdk: { input: PutWebhookCommandInput; output: PutWebhookCommandOutput; }; }; }