Skip to content

get_minute_usage

get_minute_usage(
    month: Month,
    year: Year,
    *,
    config_overrides: Optional[GroundStationClientConfig] = None,
) -> GetMinuteUsageResponse

Returns the number of reserved minutes used by account.

Parameters:

  • month (Month) –

    The month being requested, with a value of 1-12.

  • year (Year) –

    The year being requested, in the format of YYYY.

Raises:

Source code in docs_src/capo_groundstation/_services/ground_station.py
def get_minute_usage(
    self,
    month: "capo_groundstation.types.month.Month",
    year: "capo_groundstation.types.year.Year",
    *,
    config_overrides: Optional[GroundStationClientConfig] = None,
) -> "capo_groundstation.types.get_minute_usage_response.GetMinuteUsageResponse":
    """<p>Returns the number of reserved minutes used by account.</p>

    Args:
        month: <p>The month being requested, with a value of 1-12.</p>
        year: <p>The year being requested, in the format of YYYY.</p>

    Raises:
        capo_groundstation.errors.dependency_exception.DependencyException: <p>Dependency encountered an error.</p>
        capo_groundstation.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
        capo_groundstation.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource was not found.</p>
        capo_groundstation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_groundstation.types.get_minute_usage_request.GetMinuteUsageRequest]",
    ) -> OperationResponse[
        "capo_groundstation.types.get_minute_usage_response.GetMinuteUsageResponse"
    ]:
        import capo_groundstation._operations.ground_station.get_minute_usage

        output, http_response = (
            capo_groundstation._operations.ground_station.get_minute_usage.get_minute_usage(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetMinuteUsage")
    )
    input_: capo_groundstation.types.get_minute_usage_request.GetMinuteUsageRequest = {
        "month": month,
        "year": year,
    }

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