Skip to content

get_usage_profile

get_usage_profile(
    name: NameString, *, config_overrides: Optional[GlueClientConfig] = None
) -> GetUsageProfileResponse

Retrieves information about the specified Glue usage profile.

Parameters:

  • name (NameString) –

    The name of the usage profile to retrieve.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def get_usage_profile(
    self,
    name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.get_usage_profile_response.GetUsageProfileResponse":
    """<p>Retrieves information about the specified Glue usage profile.</p>

    Args:
        name: <p>The name of the usage profile to retrieve.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_not_supported_exception.OperationNotSupportedException: <p>The operation is not available in the region.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.get_usage_profile_request.GetUsageProfileRequest]",
    ) -> OperationResponse[
        "capo_glue.types.get_usage_profile_response.GetUsageProfileResponse"
    ]:
        import capo_glue._operations.aws_glue.get_usage_profile

        output, http_response = (
            capo_glue._operations.aws_glue.get_usage_profile.get_usage_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetUsageProfile")
    )
    input_: capo_glue.types.get_usage_profile_request.GetUsageProfileRequest = {
        "name": name
    }

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