Skip to content

deregister_webhook_with_third_party

deregister_webhook_with_third_party(
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    webhook_name: Optional[WebhookName] = None,
) -> DeregisterWebhookWithThirdPartyOutput

Removes the connection between the webhook that was created by CodePipeline and the external tool with events to be detected. Currently supported only for webhooks that target an action type of GitHub.

Parameters:

  • webhook_name (Optional[WebhookName], default: None ) –

    The name of the webhook you want to deregister.

Raises:

Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
def deregister_webhook_with_third_party(
    self,
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    webhook_name: Optional[
        "capo_codepipeline.types.webhook_name.WebhookName"
    ] = None,
) -> "capo_codepipeline.types.deregister_webhook_with_third_party_output.DeregisterWebhookWithThirdPartyOutput":
    """<p>Removes the connection between the webhook that was created by CodePipeline and the external tool with events to be detected. Currently supported only for webhooks that target an action type of GitHub.</p>

    Args:
        webhook_name: <p>The name of the webhook you want to deregister.</p>

    Raises:
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.webhook_not_found_exception.WebhookNotFoundException: <p>The specified webhook was entered in an invalid format or cannot be found.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codepipeline.types.deregister_webhook_with_third_party_input.DeregisterWebhookWithThirdPartyInput]",
    ) -> OperationResponse[
        "capo_codepipeline.types.deregister_webhook_with_third_party_output.DeregisterWebhookWithThirdPartyOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.deregister_webhook_with_third_party

        output, http_response = (
            capo_codepipeline._operations.code_pipeline_20150709.deregister_webhook_with_third_party.deregister_webhook_with_third_party(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeregisterWebhookWithThirdParty")
    )
    input_: capo_codepipeline.types.deregister_webhook_with_third_party_input.DeregisterWebhookWithThirdPartyInput = {}
    if webhook_name is not None:
        input_["webhook_name"] = webhook_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output