Skip to main content

webhooks

Creates, updates, deletes, gets or lists a webhooks resource.

Overview

Namewebhooks
TypeResource
Idaws.amplify.webhooks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringA pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries. (pattern: <code>(?s).*</code>)
webhooksarrayA list of webhooks.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_webhooksselectapp_id, regionnextToken, maxResultsReturns a list of webhooks for an Amplify app.
get_webhookselectwebhook_id, regionReturns the webhook information that corresponds to a specified webhook ID.
create_webhookinsertapp_id, region, branchNameCreates a new webhook on an Amplify app.
update_webhookupdatewebhook_id, regionUpdates a webhook.
delete_webhookdeletewebhook_id, regionDeletes a webhook.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_idstringThe unique ID for an Amplify app.
regionstringAWS region (default: us-east-1)
webhook_idstringThe unique ID for a webhook.
maxResultsintegerThe maximum number of records to list in a single response.
nextTokenstringA pagination token. Set to null to start listing webhooks from the start. If non-null,the pagination token is returned in a result. Pass its value in here to list more webhooks.

SELECT examples

Returns a list of webhooks for an Amplify app.

SELECT
next_token,
webhooks
FROM aws.amplify.webhooks
WHERE app_id = '{{ app_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

INSERT examples

Creates a new webhook on an Amplify app.

INSERT INTO aws.amplify.webhooks (
branchName,
description,
app_id,
region
)
SELECT
'{{ branchName }}' /* required */,
'{{ description }}',
'{{ app_id }}',
'{{ region }}'
RETURNING
webhook
;

UPDATE examples

Updates a webhook.

UPDATE aws.amplify.webhooks
SET
branchName = '{{ branchName }}',
description = '{{ description }}'
WHERE
webhook_id = '{{ webhook_id }}' --required
AND region = '{{ region }}' --required
RETURNING
webhook;

DELETE examples

Deletes a webhook.

DELETE FROM aws.amplify.webhooks
WHERE webhook_id = '{{ webhook_id }}' --required
AND region = '{{ region }}' --required
;