Skip to content

list_performance_analysis_reports async

list_performance_analysis_reports(
    service_type: ServiceType,
    identifier: IdentifierString,
    *,
    config_overrides: Optional[AsyncPIClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    list_tags: Optional[Boolean] = None,
) -> ListPerformanceAnalysisReportsResponse

Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.

Parameters:

  • service_type (ServiceType) –

    The Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

  • identifier (IdentifierString) –

    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 ResourceID. When you call DescribeDBInstances, the identifier is returned as DbiResourceId.

    To use a DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

  • next_token (Optional[NextToken], default: None ) –

    An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxResults.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of items to return in the response. If more items exist than the specified MaxResults value, a pagination token is included in the response so that the remaining results can be retrieved.

  • list_tags (Optional[Boolean], default: None ) –

    Specifies whether or not to include the list of tags in the response.

Raises:

Source code in docs_src/capo_pi/_services/async_pi.py
async def list_performance_analysis_reports(
    self,
    service_type: "capo_pi.types.service_type.ServiceType",
    identifier: "capo_pi.types.identifier_string.IdentifierString",
    *,
    config_overrides: Optional[AsyncPIClientConfig] = None,
    next_token: Optional["capo_pi.types.next_token.NextToken"] = None,
    max_results: Optional["capo_pi.types.max_results.MaxResults"] = None,
    list_tags: Optional["capo_pi.types.boolean.Boolean"] = None,
) -> "capo_pi.types.list_performance_analysis_reports_response.ListPerformanceAnalysisReportsResponse":
    """<p>Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.</p>

    Args:
        service_type: <p>The Amazon Web Services service for which Performance Insights returns 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>
        next_token: <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxResults</code>.</p>
        max_results: <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxResults</code> value, a pagination token is included in the response so that the remaining results can be retrieved. </p>
        list_tags: <p>Specifies whether or not to include the list of tags in the response.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pi.types.list_performance_analysis_reports_request.ListPerformanceAnalysisReportsRequest]",
    ) -> AsyncOperationResponse[
        "capo_pi.types.list_performance_analysis_reports_response.ListPerformanceAnalysisReportsResponse"
    ]:
        import capo_pi._operations.performance_insightsv20180227.list_performance_analysis_reports

        (
            output,
            http_response,
        ) = await capo_pi._operations.performance_insightsv20180227.list_performance_analysis_reports.async_list_performance_analysis_reports(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPerformanceAnalysisReports")
    )
    input_: capo_pi.types.list_performance_analysis_reports_request.ListPerformanceAnalysisReportsRequest = {
        "service_type": service_type,
        "identifier": identifier,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if list_tags is not None:
        input_["list_tags"] = list_tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output