webhooks
Creates, updates, deletes, gets or lists a webhooks resource.
Overview
| Name | webhooks |
| Type | Resource |
| Id | aws.amplify.webhooks |
Fields
The following fields are returned by SELECT queries:
- list_webhooks
- get_webhook
| Name | Datatype | Description |
|---|---|---|
next_token | string | A 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>) |
webhooks | array | A list of webhooks. |
| Name | Datatype | Description |
|---|---|---|
app_id | string | The unique ID of an Amplify app. (pattern: <code>d[a-z0-9]+</code>) |
branch_name | string | The name for a branch that is part of an Amplify app. (pattern: <code>(?s).+</code>) |
create_time | string (date-time) | A timestamp of when Amplify created the webhook in your Git repository. |
description | string | The description for a webhook. (pattern: <code>(?s).*</code>) |
update_time | string (date-time) | A timestamp of when Amplify updated the webhook in your Git repository. |
webhook_arn | string | The Amazon Resource Name (ARN) for the webhook. |
webhook_id | string | The ID of the webhook. (pattern: <code>(?s).*</code>) |
webhook_url | string | The URL of the webhook. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_webhooks | select | app_id, region | nextToken, maxResults | Returns a list of webhooks for an Amplify app. |
get_webhook | select | webhook_id, region | Returns the webhook information that corresponds to a specified webhook ID. | |
create_webhook | insert | app_id, region, branchName | Creates a new webhook on an Amplify app. | |
update_webhook | update | webhook_id, region | Updates a webhook. | |
delete_webhook | delete | webhook_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The unique ID for an Amplify app. |
region | string | AWS region (default: us-east-1) |
webhook_id | string | The unique ID for a webhook. |
maxResults | integer | The maximum number of records to list in a single response. |
nextToken | string | A 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
- list_webhooks
- get_webhook
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 }}'
;
Returns the webhook information that corresponds to a specified webhook ID.
SELECT
app_id,
branch_name,
create_time,
description,
update_time,
webhook_arn,
webhook_id,
webhook_url
FROM aws.amplify.webhooks
WHERE webhook_id = '{{ webhook_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_webhook
- Manifest
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
;
# Description fields are for documentation purposes
- name: webhooks
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the webhooks resource.
- name: region
value: "{{ region }}"
description: Required parameter for the webhooks resource.
- name: branchName
value: "{{ branchName }}"
- name: description
value: "{{ description }}"
UPDATE examples
- update_webhook
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
- delete_webhook
Deletes a webhook.
DELETE FROM aws.amplify.webhooks
WHERE webhook_id = '{{ webhook_id }}' --required
AND region = '{{ region }}' --required
;