Deletes a previously created webhook by name. Deleting the webhook stops CodePipeline from starting a pipeline every time an external event occurs. The API returns successfully when trying to delete a webhook that is already deleted. If a deleted webhook is re-created by calling PutWebhook with the same name, it will have a different URL.
Parameters:
-
name
(WebhookName)
–
The name of the webhook you want to delete.
Raises:
Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
| def delete_webhook(
self,
name: "capo_codepipeline.types.webhook_name.WebhookName",
*,
config_overrides: Optional[CodePipelineClientConfig] = None,
) -> "capo_codepipeline.types.delete_webhook_output.DeleteWebhookOutput":
"""<p>Deletes a previously created webhook by name. Deleting the webhook stops CodePipeline from starting a pipeline every time an external event occurs. The API returns successfully when trying to delete a webhook that is already deleted. If a deleted webhook is re-created by calling PutWebhook with the same name, it will have a different URL.</p>
Args:
name: <p>The name of the webhook you want to delete.</p>
Raises:
capo_codepipeline.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Unable to modify the tag due to a simultaneous update request.</p>
capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codepipeline.types.delete_webhook_input.DeleteWebhookInput]",
) -> OperationResponse[
"capo_codepipeline.types.delete_webhook_output.DeleteWebhookOutput"
]:
import capo_codepipeline._operations.code_pipeline_20150709.delete_webhook
output, http_response = (
capo_codepipeline._operations.code_pipeline_20150709.delete_webhook.delete_webhook(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteWebhook")
)
input_: capo_codepipeline.types.delete_webhook_input.DeleteWebhookInput = {
"name": name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|