Skip to content

get_webhook

get_webhook(
    webhook_id: WebhookId, *, config_overrides: Optional[AmplifyClientConfig] = None
) -> GetWebhookResult

Returns the webhook information that corresponds to a specified webhook ID.

Parameters:

  • webhook_id (WebhookId) –

    The unique ID for a webhook.

Raises:

Source code in docs_src/capo_amplify/_services/amplify.py
def get_webhook(
    self,
    webhook_id: "capo_amplify.types.webhook_id.WebhookId",
    *,
    config_overrides: Optional[AmplifyClientConfig] = None,
) -> "capo_amplify.types.get_webhook_result.GetWebhookResult":
    """<p>Returns the webhook information that corresponds to a specified webhook ID. </p>

    Args:
        webhook_id: <p>The unique ID for a webhook. </p>

    Raises:
        capo_amplify.errors.bad_request_exception.BadRequestException: <p>A request contains unexpected data. </p>
        capo_amplify.errors.internal_failure_exception.InternalFailureException: <p>The service failed to perform an operation due to an internal issue. </p>
        capo_amplify.errors.limit_exceeded_exception.LimitExceededException: <p>A resource could not be created because service quotas were exceeded. </p>
        capo_amplify.errors.not_found_exception.NotFoundException: <p>An entity was not found during an operation. </p>
        capo_amplify.errors.unauthorized_exception.UnauthorizedException: <p>An operation failed due to a lack of access. </p>
        capo_amplify.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplify.types.get_webhook_request.GetWebhookRequest]",
    ) -> OperationResponse[
        "capo_amplify.types.get_webhook_result.GetWebhookResult"
    ]:
        import capo_amplify._operations.amplify.get_webhook

        output, http_response = (
            capo_amplify._operations.amplify.get_webhook.get_webhook(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetWebhook")
    )
    input_: capo_amplify.types.get_webhook_request.GetWebhookRequest = {
        "webhook_id": webhook_id
    }

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