Skip to content

delete_webhook async

delete_webhook(
    name: WebhookName,
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
) -> DeleteWebhookOutput

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/async_code_pipeline.py
async def delete_webhook(
    self,
    name: "capo_codepipeline.types.webhook_name.WebhookName",
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codepipeline.types.delete_webhook_input.DeleteWebhookInput]",
    ) -> AsyncOperationResponse[
        "capo_codepipeline.types.delete_webhook_output.DeleteWebhookOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.delete_webhook

        (
            output,
            http_response,
        ) = await capo_codepipeline._operations.code_pipeline_20150709.delete_webhook.async_delete_webhook(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output