Skip to content

get_resource_metadata

get_resource_metadata(
    service_type: ServiceType,
    identifier: IdentifierString,
    *,
    config_overrides: Optional[PIClientConfig] = None,
) -> GetResourceMetadataResponse

Retrieve the metadata for different features. For example, the metadata might indicate that a feature is turned on or off on a specific 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 for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use a DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

Raises:

Source code in docs_src/capo_pi/_services/pi.py
def get_resource_metadata(
    self,
    service_type: "capo_pi.types.service_type.ServiceType",
    identifier: "capo_pi.types.identifier_string.IdentifierString",
    *,
    config_overrides: Optional[PIClientConfig] = None,
) -> "capo_pi.types.get_resource_metadata_response.GetResourceMetadataResponse":
    """<p>Retrieve the metadata for different features. For example, the metadata might indicate that a feature is turned on or off on a specific 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 for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use a DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>. </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.get_resource_metadata_request.GetResourceMetadataRequest]",
    ) -> OperationResponse[
        "capo_pi.types.get_resource_metadata_response.GetResourceMetadataResponse"
    ]:
        import capo_pi._operations.performance_insightsv20180227.get_resource_metadata

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetResourceMetadata")
    )
    input_: capo_pi.types.get_resource_metadata_request.GetResourceMetadataRequest = {
        "service_type": service_type,
        "identifier": identifier,
    }

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