Lists the Amazon Web Services Cost and Usage Report available to this account.
Raises:
Examples:
To list the AWS Cost and Usage reports for the account.
The following example lists the AWS Cost and Usage reports for the account.
>>> await client.describe_report_definitions(max_results=5)
Source code in docs_src/capo_cost_and_usage_report_service/_services/async_costand_usage_report_service.py
| async def describe_report_definitions(
self,
*,
config_overrides: Optional[AsyncCostandUsageReportServiceClientConfig] = None,
max_results: Optional[
"capo_cost_and_usage_report_service.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_cost_and_usage_report_service.types.generic_string.GenericString"
] = None,
) -> "capo_cost_and_usage_report_service.types.describe_report_definitions_response.DescribeReportDefinitionsResponse":
"""<p>Lists the Amazon Web Services Cost and Usage Report available to this account.</p>
Raises:
capo_cost_and_usage_report_service.errors.internal_error_exception.InternalErrorException: <p>An error on the server occurred during the processing of your request. Try again later.</p>
capo_cost_and_usage_report_service.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To list the AWS Cost and Usage reports for the account.
The following example lists the AWS Cost and Usage reports for the account.
>>> await client.describe_report_definitions(max_results=5)
"""
async def _handler(
req: "AsyncOperationRequest[capo_cost_and_usage_report_service.types.describe_report_definitions_request.DescribeReportDefinitionsRequest]",
) -> AsyncOperationResponse[
"capo_cost_and_usage_report_service.types.describe_report_definitions_response.DescribeReportDefinitionsResponse"
]:
import capo_cost_and_usage_report_service._operations.aws_origami_service_gateway_service.describe_report_definitions
(
output,
http_response,
) = await capo_cost_and_usage_report_service._operations.aws_origami_service_gateway_service.describe_report_definitions.async_describe_report_definitions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeReportDefinitions")
)
input_: capo_cost_and_usage_report_service.types.describe_report_definitions_request.DescribeReportDefinitionsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|