Skip to main content

webhooks

Creates, updates, deletes or gets a webhook resource or lists webhooks in a region

Overview

Namewebhooks
TypeResource
DescriptionResource Type definition for AWS::CodePipeline::Webhook
Idawscc.codepipeline.webhooks

Fields

NameDatatypeDescription
authentication_configurationobjectProperties that configure the authentication applied to incoming webhook trigger requests
filtersarrayA list of rules applied to the body/payload sent in the POST request to a webhook URL
authenticationstringSupported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
target_pipelinestringThe name of the pipeline you want to connect to the webhook.
target_actionstringThe name of the action in a pipeline you want to connect to the webhook.
idstringlogical id of the webhook
urlstringThe webhook URL generated by AWS CodePipeline
namestringThe name of the webhook
target_pipeline_versionintegerThe version number of the pipeline to be connected to the trigger request.
register_with_third_partybooleanConfigures a connection between the webhook that was created and the external tool with events to be detected.
regionstringAWS region.

For more information, see AWS::CodePipeline::Webhook.

Methods

NameResourceAccessible byRequired Params
create_resourcewebhooksINSERTAuthenticationConfiguration, Filters, Authentication, TargetPipeline, TargetAction, region
delete_resourcewebhooksDELETEIdentifier, region
update_resourcewebhooksUPDATEIdentifier, PatchDocument, region
list_resourceswebhooks_list_onlySELECTregion
get_resourcewebhooksSELECTIdentifier, 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
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new webhook resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.codepipeline.webhooks (
AuthenticationConfiguration,
Filters,
Authentication,
TargetPipeline,
TargetAction,
region
)
SELECT
'{{ authentication_configuration }}',
'{{ filters }}',
'{{ authentication }}',
'{{ target_pipeline }}',
'{{ target_action }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a webhook resource, using stack-deploy.

/*+ update */
UPDATE awscc.codepipeline.webhooks
SET PatchDocument = string('{{ {
"AuthenticationConfiguration": authentication_configuration,
"Filters": filters,
"Authentication": authentication,
"TargetPipeline": target_pipeline,
"TargetAction": target_action,
"TargetPipelineVersion": target_pipeline_version,
"RegisterWithThirdParty": register_with_third_party
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.codepipeline.webhooks
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

To operate on the webhooks resource, the following permissions are required:

codepipeline:ListWebhooks,
codepipeline:RegisterWebhookWithThirdParty,
codepipeline:PutWebhook