Skip to content

list_available_resource_dimensions

list_available_resource_dimensions(
    service_type: ServiceType,
    identifier: IdentifierString,
    metrics: DimensionsMetricList,
    *,
    config_overrides: Optional[PIClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    authorized_actions: Optional[AuthorizedActionsList] = None,
) -> ListAvailableResourceDimensionsResponse

Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.

Parameters:

  • service_type (ServiceType) –

    The Amazon Web Services service for which Performance Insights returns metrics.

  • identifier (IdentifierString) –

    An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.

  • metrics (DimensionsMetricList) –

    The types of metrics for which to retrieve dimensions. Valid values include db.load.

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

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

  • 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 MaxRecords.

  • authorized_actions (Optional[AuthorizedActionsList], default: None ) –

    The actions to discover the dimensions you are authorized to access. If you specify multiple actions, then the response will contain the dimensions common for all the actions.

    When you don't specify this request parameter or provide an empty list, the response contains all the available dimensions for the target database engine whether or not you are authorized to access them.

Raises:

Source code in docs_src/capo_pi/_services/pi.py
def list_available_resource_dimensions(
    self,
    service_type: "capo_pi.types.service_type.ServiceType",
    identifier: "capo_pi.types.identifier_string.IdentifierString",
    metrics: "capo_pi.types.dimensions_metric_list.DimensionsMetricList",
    *,
    config_overrides: Optional[PIClientConfig] = None,
    max_results: Optional["capo_pi.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_pi.types.next_token.NextToken"] = None,
    authorized_actions: Optional[
        "capo_pi.types.authorized_actions_list.AuthorizedActionsList"
    ] = None,
) -> "capo_pi.types.list_available_resource_dimensions_response.ListAvailableResourceDimensionsResponse":
    """<p>Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.</p>

    Args:
        service_type: <p>The Amazon Web Services service for which Performance Insights returns metrics.</p>
        identifier: <p>An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VWZ</code>. </p>
        metrics: <p>The types of metrics for which to retrieve dimensions. Valid values include <code>db.load</code>.</p>
        max_results: <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</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>MaxRecords</code>. </p>
        authorized_actions: <p>The actions to discover the dimensions you are authorized to access. If you specify multiple actions, then the response will contain the dimensions common for all the actions.</p> <p>When you don't specify this request parameter or provide an empty list, the response contains all the available dimensions for the target database engine whether or not you are authorized to access them.</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.list_available_resource_dimensions_request.ListAvailableResourceDimensionsRequest]",
    ) -> OperationResponse[
        "capo_pi.types.list_available_resource_dimensions_response.ListAvailableResourceDimensionsResponse"
    ]:
        import capo_pi._operations.performance_insightsv20180227.list_available_resource_dimensions

        output, http_response = (
            capo_pi._operations.performance_insightsv20180227.list_available_resource_dimensions.list_available_resource_dimensions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAvailableResourceDimensions")
    )
    input_: capo_pi.types.list_available_resource_dimensions_request.ListAvailableResourceDimensionsRequest = {
        "service_type": service_type,
        "identifier": identifier,
        "metrics": metrics,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if authorized_actions is not None:
        input_["authorized_actions"] = authorized_actions

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output