put_webhook
async
¶
put_webhook(
webhook: WebhookDefinition,
*,
config_overrides: Optional[AsyncCodePipelineClientConfig] = 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/async_code_pipeline.py
2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 | |