Skip to content

register_webhook_with_third_party

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

Configures a connection between the webhook that was created and the external tool with events to be detected.

Parameters:

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

    The name of an existing webhook created with PutWebhook to register with a supported third party.

Raises:

Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
def register_webhook_with_third_party(
    self,
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    webhook_name: Optional[
        "capo_codepipeline.types.webhook_name.WebhookName"
    ] = None,
) -> "capo_codepipeline.types.register_webhook_with_third_party_output.RegisterWebhookWithThirdPartyOutput":
    """<p>Configures a connection between the webhook that was created and the external tool with events to be detected.</p>

    Args:
        webhook_name: <p>The name of an existing webhook created with PutWebhook to register with a supported third party. </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.register_webhook_with_third_party_input.RegisterWebhookWithThirdPartyInput]",
    ) -> OperationResponse[
        "capo_codepipeline.types.register_webhook_with_third_party_output.RegisterWebhookWithThirdPartyOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.register_webhook_with_third_party

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterWebhookWithThirdParty")
    )
    input_: capo_codepipeline.types.register_webhook_with_third_party_input.RegisterWebhookWithThirdPartyInput = {}
    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