put_webhook
¶
put_webhook(
webhook: WebhookDefinition,
*,
config_overrides: Optional[CodePipelineClientConfig] = None,
tags: Optional[TagList] = None,
) -> PutWebhookOutput
Defines a webhook and returns a unique webhook URL generated by CodePipeline. This URL can be supplied to third party source hosting providers to call every time there's a code change. When CodePipeline receives a POST request on this URL, the pipeline defined in the webhook is started as long as the POST request satisfied the authentication and filtering requirements supplied when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty APIs can be used to automatically configure supported third parties to call the generated webhook URL.
When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.
If a secret token was provided, it will be redacted in the response.
Parameters:
-
webhook(WebhookDefinition) –The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it's used for later.
-
tags(Optional[TagList], default:None) –The tags for the webhook.
Raises:
-
ConcurrentModificationException–Unable to modify the tag due to a simultaneous update request.
-
InvalidTagsException–The specified resource tags are invalid.
-
InvalidWebhookAuthenticationParametersException–The specified authentication type is in an invalid format.
-
InvalidWebhookFilterPatternException–The specified event filter rule is in an invalid format.
-
LimitExceededException–The number of pipelines associated with the Amazon Web Services account has exceeded the limit allowed for the account.
-
PipelineNotFoundException–The pipeline was specified in an invalid format or cannot be found.
-
TooManyTagsException–The tags limit for a resource has been exceeded.
-
ValidationException–The validation was specified in an invalid format.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 | |