Retrieves the quota utilization report for your Amazon Web Services account. This operation returns paginated results showing your quota usage across all Amazon Web Services services, sorted by utilization percentage in descending order (highest utilization first).
You must first initiate a report using the StartQuotaUtilizationReport operation. The report generation process is asynchronous and may take several seconds to complete. Poll this operation periodically to check the status and retrieve results when the report is ready.
Each report contains up to 1,000 quota records per page. Use the NextToken parameter to retrieve additional pages of results. Reports are automatically deleted after 15 minutes.
Parameters:
-
report_id
(ReportId)
–
The unique identifier for the quota utilization report. This identifier is returned by the StartQuotaUtilizationReport operation.
-
next_token
(Optional[NextToken], default:
None
)
–
A token that indicates the next page of results to retrieve. This token is returned in the response when there are more results available. Omit this parameter for the first request.
-
max_results
(Optional[MaxResultsUtilization], default:
None
)
–
The maximum number of results to return per page. The default value is 1,000 and the maximum allowed value is 1,000.
Raises:
Source code in docs_src/capo_service_quotas/_services/service_quotas.py
| def get_quota_utilization_report(
self,
report_id: "capo_service_quotas.types.report_id.ReportId",
*,
config_overrides: Optional[ServiceQuotasClientConfig] = None,
next_token: Optional["capo_service_quotas.types.next_token.NextToken"] = None,
max_results: Optional[
"capo_service_quotas.types.max_results_utilization.MaxResultsUtilization"
] = None,
) -> "capo_service_quotas.types.get_quota_utilization_report_response.GetQuotaUtilizationReportResponse":
"""<p>Retrieves the quota utilization report for your Amazon Web Services account. This operation returns paginated results showing your quota usage across all Amazon Web Services services, sorted by utilization percentage in descending order (highest utilization first).</p> <p>You must first initiate a report using the <code>StartQuotaUtilizationReport</code> operation. The report generation process is asynchronous and may take several seconds to complete. Poll this operation periodically to check the status and retrieve results when the report is ready.</p> <p>Each report contains up to 1,000 quota records per page. Use the <code>NextToken</code> parameter to retrieve additional pages of results. Reports are automatically deleted after 15 minutes.</p>
Args:
report_id: <p>The unique identifier for the quota utilization report. This identifier is returned by the <code>StartQuotaUtilizationReport</code> operation.</p>
next_token: <p>A token that indicates the next page of results to retrieve. This token is returned in the response when there are more results available. Omit this parameter for the first request.</p>
max_results: <p>The maximum number of results to return per page. The default value is 1,000 and the maximum allowed value is 1,000.</p>
Raises:
capo_service_quotas.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permission to perform this action.</p>
capo_service_quotas.errors.illegal_argument_exception.IllegalArgumentException: <p>Invalid input was provided.</p>
capo_service_quotas.errors.invalid_pagination_token_exception.InvalidPaginationTokenException: <p>Invalid input was provided.</p>
capo_service_quotas.errors.no_such_resource_exception.NoSuchResourceException: <p>The specified resource does not exist.</p>
capo_service_quotas.errors.service_exception.ServiceException: <p>Something went wrong.</p>
capo_service_quotas.errors.too_many_requests_exception.TooManyRequestsException: <p>Due to throttling, the request was denied. Slow down the rate of request calls, or request an increase for this quota.</p>
capo_service_quotas.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_service_quotas.types.get_quota_utilization_report_request.GetQuotaUtilizationReportRequest]",
) -> OperationResponse[
"capo_service_quotas.types.get_quota_utilization_report_response.GetQuotaUtilizationReportResponse"
]:
import capo_service_quotas._operations.service_quotas_v20190624.get_quota_utilization_report
output, http_response = (
capo_service_quotas._operations.service_quotas_v20190624.get_quota_utilization_report.get_quota_utilization_report(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetQuotaUtilizationReport")
)
input_: capo_service_quotas.types.get_quota_utilization_report_request.GetQuotaUtilizationReportRequest = {
"report_id": report_id
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|