Deletes the specified report. Any tags associated with the report are also deleted.
Parameters:
-
report_name
(ReportName)
–
The name of the report that you want to delete. The name must be unique, is case sensitive, and can't include spaces.
Raises:
-
InternalErrorException
–
An error on the server occurred during the processing of your request. Try again later.
-
ValidationException
–
The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete the AWS Cost and Usage report named ExampleReport.
The following example deletes the AWS Cost and Usage report named ExampleReport.
>>> await client.delete_report_definition(report_name='ExampleReport')
Source code in docs_src/capo_cost_and_usage_report_service/_services/async_costand_usage_report_service.py
| async def delete_report_definition(
self,
report_name: "capo_cost_and_usage_report_service.types.report_name.ReportName",
*,
config_overrides: Optional[AsyncCostandUsageReportServiceClientConfig] = None,
) -> "capo_cost_and_usage_report_service.types.delete_report_definition_response.DeleteReportDefinitionResponse":
"""<p>Deletes the specified report. Any tags associated with the report are also deleted.</p>
Args:
report_name: <p>The name of the report that you want to delete. The name must be unique, is case sensitive, and can't include spaces.</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.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_cost_and_usage_report_service.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete the AWS Cost and Usage report named ExampleReport.
The following example deletes the AWS Cost and Usage report named ExampleReport.
>>> await client.delete_report_definition(report_name='ExampleReport')
"""
async def _handler(
req: "AsyncOperationRequest[capo_cost_and_usage_report_service.types.delete_report_definition_request.DeleteReportDefinitionRequest]",
) -> AsyncOperationResponse[
"capo_cost_and_usage_report_service.types.delete_report_definition_response.DeleteReportDefinitionResponse"
]:
import capo_cost_and_usage_report_service._operations.aws_origami_service_gateway_service.delete_report_definition
(
output,
http_response,
) = await capo_cost_and_usage_report_service._operations.aws_origami_service_gateway_service.delete_report_definition.async_delete_report_definition(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteReportDefinition")
)
input_: capo_cost_and_usage_report_service.types.delete_report_definition_request.DeleteReportDefinitionRequest = {
"report_name": report_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|