UpdateWebhookCommand

Updates a webhook.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AmplifyClient, UpdateWebhookCommand } from "@aws-sdk/client-amplify"; // ES Modules import
// const { AmplifyClient, UpdateWebhookCommand } = require("@aws-sdk/client-amplify"); // CommonJS import
const client = new AmplifyClient(config);
const input = { // UpdateWebhookRequest
  webhookId: "STRING_VALUE", // required
  branchName: "STRING_VALUE",
  description: "STRING_VALUE",
};
const command = new UpdateWebhookCommand(input);
const response = await client.send(command);
// { // UpdateWebhookResult
//   webhook: { // Webhook
//     webhookArn: "STRING_VALUE", // required
//     webhookId: "STRING_VALUE", // required
//     webhookUrl: "STRING_VALUE", // required
//     appId: "STRING_VALUE",
//     branchName: "STRING_VALUE", // required
//     description: "STRING_VALUE", // required
//     createTime: new Date("TIMESTAMP"), // required
//     updateTime: new Date("TIMESTAMP"), // required
//   },
// };

UpdateWebhookCommand Input

See UpdateWebhookCommandInput for more details

Parameter
Type
Description
webhookId
Required
string | undefined

The unique ID for a webhook.

branchName
string | undefined

The name for a branch that is part of an Amplify app.

description
string | undefined

The description for a webhook.

UpdateWebhookCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
webhook
Required
Webhook | undefined

Describes a webhook that connects repository events to an Amplify app.

Throws

Name
Fault
Details
BadRequestException
client

A request contains unexpected data.

DependentServiceFailureException
server

An operation failed because a dependent service threw an exception.

InternalFailureException
server

The service failed to perform an operation due to an internal issue.

NotFoundException
client

An entity was not found during an operation.

UnauthorizedException
client

An operation failed due to a lack of access.

AmplifyServiceException
Base exception class for all service exceptions from Amplify service.