Skip to content

get_deployment async

get_deployment(
    rest_api_id: String,
    deployment_id: String,
    *,
    config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
    embed: Optional[ListOfString] = None,
) -> Deployment

Gets information about a Deployment resource.

Parameters:

  • rest_api_id (String) –

    The string identifier of the associated RestApi.

  • deployment_id (String) –

    The identifier of the Deployment resource to get information about.

  • embed (Optional[ListOfString], default: None ) –

    A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this embed parameter value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the "apisummary" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary.

Raises:

  • BadRequestException –

    The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

  • NotFoundException –

    The requested resource is not found. Make sure that the request URI is correct.

  • ServiceUnavailableException –

    The requested service is not available. For details see the accompanying error message. Retry after the specified time period.

  • TooManyRequestsException –

    The request has reached its throttling limit. Retry after the specified time period.

  • UnauthorizedException –

    The request is denied because the caller has insufficient permissions.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_api_gateway/_services/async_api_gateway.py
async def get_deployment(
    self,
    rest_api_id: "capo_api_gateway.types.string.String",
    deployment_id: "capo_api_gateway.types.string.String",
    *,
    config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
    embed: Optional["capo_api_gateway.types.list_of_string.ListOfString"] = None,
) -> "capo_api_gateway.types.deployment.Deployment":
    """<p>Gets information about a Deployment resource.</p>

    Args:
        rest_api_id: <p>The string identifier of the associated RestApi.</p>
        deployment_id: <p>The identifier of the Deployment resource to get information about.</p>
        embed: <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>

    Raises:
        capo_api_gateway.errors.bad_request_exception.BadRequestException: <p>The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
        capo_api_gateway.errors.not_found_exception.NotFoundException: <p>The requested resource is not found. Make sure that the request URI is correct.</p>
        capo_api_gateway.errors.service_unavailable_exception.ServiceUnavailableException: <p>The requested service is not available. For details see the accompanying error message. Retry after the specified time period.</p>
        capo_api_gateway.errors.too_many_requests_exception.TooManyRequestsException: <p>The request has reached its throttling limit. Retry after the specified time period.</p>
        capo_api_gateway.errors.unauthorized_exception.UnauthorizedException: <p>The request is denied because the caller has insufficient permissions.</p>
        capo_api_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_api_gateway.types.get_deployment_request.GetDeploymentRequest]",
    ) -> AsyncOperationResponse["capo_api_gateway.types.deployment.Deployment"]:
        import capo_api_gateway._operations.backplane_control_service.get_deployment

        (
            output,
            http_response,
        ) = await capo_api_gateway._operations.backplane_control_service.get_deployment.async_get_deployment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeployment")
    )
    input_: capo_api_gateway.types.get_deployment_request.GetDeploymentRequest = {
        "rest_api_id": rest_api_id,
        "deployment_id": deployment_id,
    }
    if embed is not None:
        input_["embed"] = embed

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output