def delete_performance_analysis_report(
self,
service_type: "capo_pi.types.service_type.ServiceType",
identifier: "capo_pi.types.identifier_string.IdentifierString",
analysis_report_id: "capo_pi.types.analysis_report_id.AnalysisReportId",
*,
config_overrides: Optional[PIClientConfig] = None,
) -> "capo_pi.types.delete_performance_analysis_report_response.DeletePerformanceAnalysisReportResponse":
"""<p>Deletes a performance analysis report.</p>
Args:
service_type: <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid value is <code>RDS</code>.</p>
identifier: <p>An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as <i>ResourceID</i>. When you call <code>DescribeDBInstances</code>, the identifier is returned as <code>DbiResourceId</code>.</p> <p>To use a DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>.</p>
analysis_report_id: <p>The unique identifier of the analysis report for deletion.</p>
Raises:
capo_pi.errors.internal_service_error.InternalServiceError: <p>The request failed due to an unknown error.</p>
capo_pi.errors.invalid_argument_exception.InvalidArgumentException: <p>One of the arguments provided is invalid for this request.</p>
capo_pi.errors.not_authorized_exception.NotAuthorizedException: <p>The user is not authorized to perform this request.</p>
capo_pi.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_pi.types.delete_performance_analysis_report_request.DeletePerformanceAnalysisReportRequest]",
) -> OperationResponse[
"capo_pi.types.delete_performance_analysis_report_response.DeletePerformanceAnalysisReportResponse"
]:
if req.options.protocol == "awsJson1_1":
import capo_pi._operations.performance_insightsv20180227.aws_json1_1.delete_performance_analysis_report
output, http_response = (
capo_pi._operations.performance_insightsv20180227.aws_json1_1.delete_performance_analysis_report.delete_performance_analysis_report(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_pi._operations.performance_insightsv20180227.rpcv2_cbor.delete_performance_analysis_report
output, http_response = (
capo_pi._operations.performance_insightsv20180227.rpcv2_cbor.delete_performance_analysis_report.delete_performance_analysis_report(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeletePerformanceAnalysisReport")
)
input_: capo_pi.types.delete_performance_analysis_report_request.DeletePerformanceAnalysisReportRequest = {
"service_type": service_type,
"identifier": identifier,
"analysis_report_id": analysis_report_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output