webhooks
Creates, updates, deletes or gets a webhook resource or lists webhooks in a region
Overview
| Name | webhooks |
| Type | Resource |
| Description | Resource Type definition for AWS::CodePipeline::Webhook |
| Id | awscc.codepipeline.webhooks |
Fields
| Name | Datatype | Description |
|---|---|---|
authentication_configuration | object | Properties that configure the authentication applied to incoming webhook trigger requests |
filters | array | A list of rules applied to the body/payload sent in the POST request to a webhook URL |
authentication | string | Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED. |
target_pipeline | string | The name of the pipeline you want to connect to the webhook. |
target_action | string | The name of the action in a pipeline you want to connect to the webhook. |
id | string | logical id of the webhook |
url | string | The webhook URL generated by AWS CodePipeline |
name | string | The name of the webhook |
target_pipeline_version | integer | The version number of the pipeline to be connected to the trigger request. |
register_with_third_party | boolean | Configures a connection between the webhook that was created and the external tool with events to be detected. |
region | string | AWS region. |
For more information, see AWS::CodePipeline::Webhook.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | AuthenticationConfiguration, Filters, Authentication, TargetPipeline, TargetAction, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual webhook.
SELECT
region,
authentication_configuration,
filters,
authentication,
target_pipeline,
target_action,
id,
url,
name,
target_pipeline_version,
register_with_third_party
FROM awscc.codepipeline.webhooks
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT example
Use the following StackQL query and manifest file to create a new webhook resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.codepipeline.webhooks (
AuthenticationConfiguration,
Filters,
Authentication,
TargetPipeline,
TargetAction,
region
)
SELECT
'{{ AuthenticationConfiguration }}',
'{{ Filters }}',
'{{ Authentication }}',
'{{ TargetPipeline }}',
'{{ TargetAction }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.codepipeline.webhooks (
AuthenticationConfiguration,
Filters,
Authentication,
TargetPipeline,
TargetAction,
Name,
TargetPipelineVersion,
RegisterWithThirdParty,
region
)
SELECT
'{{ AuthenticationConfiguration }}',
'{{ Filters }}',
'{{ Authentication }}',
'{{ TargetPipeline }}',
'{{ TargetAction }}',
'{{ Name }}',
'{{ TargetPipelineVersion }}',
'{{ RegisterWithThirdParty }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: webhook
props:
- name: AuthenticationConfiguration
value:
AllowedIPRange: '{{ AllowedIPRange }}'
SecretToken: '{{ SecretToken }}'
- name: Filters
value:
- JsonPath: '{{ JsonPath }}'
MatchEquals: '{{ MatchEquals }}'
- name: Authentication
value: '{{ Authentication }}'
- name: TargetPipeline
value: '{{ TargetPipeline }}'
- name: TargetAction
value: '{{ TargetAction }}'
- name: Name
value: '{{ Name }}'
- name: TargetPipelineVersion
value: '{{ TargetPipelineVersion }}'
- name: RegisterWithThirdParty
value: '{{ RegisterWithThirdParty }}'
DELETE example
/*+ delete */
DELETE FROM awscc.codepipeline.webhooks
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the webhooks resource, the following permissions are required:
Create
codepipeline:ListWebhooks,
codepipeline:RegisterWebhookWithThirdParty,
codepipeline:PutWebhook
Read
codepipeline:ListWebhooks
Update
codepipeline:ListWebhooks,
codepipeline:RegisterWebhookWithThirdParty,
codepipeline:PutWebhook,
codepipeline:DeregisterWebhookWithThirdParty
Delete
codepipeline:ListWebhooks,
codepipeline:DeleteWebhook,
codepipeline:DeregisterWebhookWithThirdParty
List
codepipeline:ListWebhooks