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.
>>> client.delete_report_definition(report_name='ExampleReport')
Source code in docs_src/capo_cost_and_usage_report_service/_services/costand_usage_report_service.py
| def delete_report_definition(
self,
report_name: "capo_cost_and_usage_report_service.types.report_name.ReportName",
*,
config_overrides: Optional[CostandUsageReportServiceClientConfig] = 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.
>>> client.delete_report_definition(report_name='ExampleReport')
"""
def _handler(
req: "OperationRequest[capo_cost_and_usage_report_service.types.delete_report_definition_request.DeleteReportDefinitionRequest]",
) -> OperationResponse[
"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 = (
capo_cost_and_usage_report_service._operations.aws_origami_service_gateway_service.delete_report_definition.delete_report_definition(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|