We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.PI

Inherits:
AWS.Service show all
Identifier:
pi
API Version:
2018-02-27
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon RDS Performance Insights enables you to monitor and explore different dimensions of database load based on data captured from a running DB instance. The guide provides detailed information about Performance Insights data types, parameters and errors.

When Performance Insights is enabled, the Amazon RDS Performance Insights API provides visibility into the performance of your DB instance. Amazon CloudWatch provides the authoritative source for Amazon Web Services service-vended monitoring metrics. Performance Insights offers a domain-specific view of DB load.

DB load is measured as average active sessions. Performance Insights provides the data to API consumers as a two-dimensional time-series dataset. The time dimension provides DB load data for each time point in the queried time range. Each time point decomposes overall load in relation to the requested dimensions, measured at that time point. Examples include SQL, Wait event, User, and Host.

Sending a Request Using PI

var pi = new AWS.PI();
pi.createPerformanceAnalysisReport(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the PI object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var pi = new AWS.PI({apiVersion: '2018-02-27'});

You can also set the API version globally in AWS.config.apiVersions using the pi service identifier:

AWS.config.apiVersions = {
  pi: '2018-02-27',
  // other service API versions
};

var pi = new AWS.PI();

Version:

  • 2018-02-27

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.PI(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a PI object

var pi = new AWS.PI({apiVersion: '2018-02-27'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.PI.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.PI.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.PI.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createPerformanceAnalysisReport(params = {}, callback) ⇒ AWS.Request

Creates a new performance analysis report for a specific time period for the DB instance.

Service Reference:

Examples:

Calling the createPerformanceAnalysisReport operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
pi.createPerformanceAnalysisReport(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.

      To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. For example, specify db-ADECBTYHKTSAUMUZQYPDS2GW4A.

    • StartTime — (Date)

      The start time defined for the analysis report.

    • EndTime — (Date)

      The end time defined for the analysis report.

    • Tags — (Array<map>)

      The metadata assigned to the analysis report consisting of a key-value pair.

      • Keyrequired — (String)

        A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").

      • Valuerequired — (String)

        A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\\p{Z}\\p{N}.:/=+\-@]*)$").

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AnalysisReportId — (String)

        A unique identifier for the created analysis report.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePerformanceAnalysisReport(params = {}, callback) ⇒ AWS.Request

Deletes a performance analysis report.

Service Reference:

Examples:

Calling the deletePerformanceAnalysisReport operation

var params = {
  AnalysisReportId: 'STRING_VALUE', /* required */
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB /* required */
};
pi.deletePerformanceAnalysisReport(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

    • AnalysisReportId — (String)

      The unique identifier of the analysis report for deletion.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDimensionKeys(params = {}, callback) ⇒ AWS.Request

For a specific time period, retrieve the top N dimension keys for a metric.

Note: Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

Service Reference:

Examples:

Calling the describeDimensionKeys operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  GroupBy: { /* required */
    Group: 'STRING_VALUE', /* required */
    Dimensions: [
      'STRING_VALUE',
      /* more items */
    ],
    Limit: 'NUMBER_VALUE'
  },
  Identifier: 'STRING_VALUE', /* required */
  Metric: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  AdditionalMetrics: [
    'STRING_VALUE',
    /* more items */
  ],
  Filter: {
    '<SanitizedString>': 'STRING_VALUE',
    /* '<SanitizedString>': ... */
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PartitionBy: {
    Group: 'STRING_VALUE', /* required */
    Dimensions: [
      'STRING_VALUE',
      /* more items */
    ],
    Limit: 'NUMBER_VALUE'
  },
  PeriodInSeconds: 'NUMBER_VALUE'
};
pi.describeDimensionKeys(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

      The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:

      • RDS

      • DOCDB

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.

      To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. For example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A.

    • StartTime — (Date)

      The date and time specifying the beginning of the requested time series data. You must specify a StartTime within the past 7 days. The value specified is inclusive, which means that data points equal to or greater than StartTime are returned.

      The value for StartTime must be earlier than the value for EndTime.

    • EndTime — (Date)

      The date and time specifying the end of the requested time series data. The value specified is exclusive, which means that data points less than (but not equal to) EndTime are returned.

      The value for EndTime must be later than the value for StartTime.

    • Metric — (String)

      The name of a Performance Insights metric to be measured.

      Valid values for Metric are:

      • db.load.avg - A scaled representation of the number of active sessions for the database engine.

      • db.sampledload.avg - The raw number of active sessions for the database engine.

      If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg and db.sampledload.avg are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and db.sampledload.avg less than db.load.avg. For most use cases, you can query db.load.avg only.

    • PeriodInSeconds — (Integer)

      The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:

      • 1 (one second)

      • 60 (one minute)

      • 300 (five minutes)

      • 3600 (one hour)

      • 86400 (twenty-four hours)

      If you don't specify PeriodInSeconds, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.

    • GroupBy — (map)

      A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.

      • Grouprequired — (String)

        The name of the dimension group. Valid values are as follows:

        • db - The name of the database to which the client is connected. The following values are permitted:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Aurora MySQL

          • Amazon RDS MySQL

          • Amazon RDS MariaDB

          • Amazon DocumentDB

        • db.application - The name of the application that is connected to the database. The following values are permitted:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Amazon DocumentDB

        • db.host - The host name of the connected client (all engines).

        • db.query - The query that is currently running (only Amazon DocumentDB).

        • db.query_tokenized - The digest query (only Amazon DocumentDB).

        • db.session_type - The type of the current session (only Aurora PostgreSQL and RDS PostgreSQL).

        • db.sql - The text of the SQL statement that is currently running (all engines except Amazon DocumentDB).

        • db.sql_tokenized - The SQL digest (all engines except Amazon DocumentDB).

        • db.user - The user logged in to the database (all engines except Amazon DocumentDB).

        • db.wait_event - The event for which the database backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event_type - The type of event for which the database backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_state - The event for which the database backend is waiting (only Amazon DocumentDB).

      • Dimensions — (Array<String>)

        A list of specific dimensions from a dimension group. If this parameter is not present, then it signifies that all of the dimensions in the group were requested, or are present in the response.

        Valid values for elements in the Dimensions array are:

        • db.application.name - The name of the application that is connected to the database. Valid values are as follows:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Amazon DocumentDB

        • db.host.id - The host ID of the connected client (all engines).

        • db.host.name - The host name of the connected client (all engines).

        • db.name - The name of the database to which the client is connected. Valid values are as follows:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Aurora MySQL

          • Amazon RDS MySQL

          • Amazon RDS MariaDB

          • Amazon DocumentDB

        • db.query.id - The query ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.db_id - The query ID generated by the database (only Amazon DocumentDB).

        • db.query.statement - The text of the query that is being run (only Amazon DocumentDB).

        • db.query.tokenized_id

        • db.query.tokenized.id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.tokenized.db_id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.tokenized.statement - The text of the query digest (only Amazon DocumentDB).

        • db.session_type.name - The type of the current session (only Amazon DocumentDB).

        • db.sql.id - The hash of the full, non-tokenized SQL statement generated by Performance Insights (all engines except Amazon DocumentDB).

        • db.sql.db_id - Either the SQL ID generated by the database engine, or a value generated by Performance Insights that begins with pi- (all engines except Amazon DocumentDB).

        • db.sql.statement - The full text of the SQL statement that is running, as in SELECT * FROM employees (all engines except Amazon DocumentDB)

        • db.sql.tokenized_id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). The db.sql.tokenized_id dimension fetches the value of the db.sql_tokenized.id dimension. Amazon RDS returns db.sql.tokenized_id from the db.sql dimension group.

        • db.sql_tokenized.id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). In the console, db.sql_tokenized.id is called the Support ID because Amazon Web Services Support can look at this data to help you troubleshoot database issues.

        • db.sql_tokenized.db_id - Either the native database ID used to refer to the SQL statement, or a synthetic ID such as pi-2372568224 that Performance Insights generates if the native database ID isn't available (all engines except Amazon DocumentDB).

        • db.sql_tokenized.statement - The text of the SQL digest, as in SELECT * FROM employees WHERE employee_id = ? (all engines except Amazon DocumentDB)

        • db.user.id - The ID of the user logged in to the database (all engines except Amazon DocumentDB).

        • db.user.name - The name of the user logged in to the database (all engines except Amazon DocumentDB).

        • db.wait_event.name - The event for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event.type - The type of event for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event_type.name - The name of the event type for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_state.name - The event for which the backend is waiting (only Amazon DocumentDB).

      • Limit — (Integer)

        The maximum number of items to fetch for this dimension group.

    • AdditionalMetrics — (Array<String>)

      Additional metrics for the top N dimension keys. If the specified dimension group in the GroupBy parameter is db.sql_tokenized, you can specify per-SQL metrics to get the values for the top N SQL digests. The response syntax is as follows: "AdditionalMetrics" : { "string" : "string" }.

    • PartitionBy — (map)

      For each dimension specified in GroupBy, specify a secondary dimension to further subdivide the partition keys in the response.

      • Grouprequired — (String)

        The name of the dimension group. Valid values are as follows:

        • db - The name of the database to which the client is connected. The following values are permitted:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Aurora MySQL

          • Amazon RDS MySQL

          • Amazon RDS MariaDB

          • Amazon DocumentDB

        • db.application - The name of the application that is connected to the database. The following values are permitted:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Amazon DocumentDB

        • db.host - The host name of the connected client (all engines).

        • db.query - The query that is currently running (only Amazon DocumentDB).

        • db.query_tokenized - The digest query (only Amazon DocumentDB).

        • db.session_type - The type of the current session (only Aurora PostgreSQL and RDS PostgreSQL).

        • db.sql - The text of the SQL statement that is currently running (all engines except Amazon DocumentDB).

        • db.sql_tokenized - The SQL digest (all engines except Amazon DocumentDB).

        • db.user - The user logged in to the database (all engines except Amazon DocumentDB).

        • db.wait_event - The event for which the database backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event_type - The type of event for which the database backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_state - The event for which the database backend is waiting (only Amazon DocumentDB).

      • Dimensions — (Array<String>)

        A list of specific dimensions from a dimension group. If this parameter is not present, then it signifies that all of the dimensions in the group were requested, or are present in the response.

        Valid values for elements in the Dimensions array are:

        • db.application.name - The name of the application that is connected to the database. Valid values are as follows:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Amazon DocumentDB

        • db.host.id - The host ID of the connected client (all engines).

        • db.host.name - The host name of the connected client (all engines).

        • db.name - The name of the database to which the client is connected. Valid values are as follows:

          • Aurora PostgreSQL

          • Amazon RDS PostgreSQL

          • Aurora MySQL

          • Amazon RDS MySQL

          • Amazon RDS MariaDB

          • Amazon DocumentDB

        • db.query.id - The query ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.db_id - The query ID generated by the database (only Amazon DocumentDB).

        • db.query.statement - The text of the query that is being run (only Amazon DocumentDB).

        • db.query.tokenized_id

        • db.query.tokenized.id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.tokenized.db_id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

        • db.query.tokenized.statement - The text of the query digest (only Amazon DocumentDB).

        • db.session_type.name - The type of the current session (only Amazon DocumentDB).

        • db.sql.id - The hash of the full, non-tokenized SQL statement generated by Performance Insights (all engines except Amazon DocumentDB).

        • db.sql.db_id - Either the SQL ID generated by the database engine, or a value generated by Performance Insights that begins with pi- (all engines except Amazon DocumentDB).

        • db.sql.statement - The full text of the SQL statement that is running, as in SELECT * FROM employees (all engines except Amazon DocumentDB)

        • db.sql.tokenized_id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). The db.sql.tokenized_id dimension fetches the value of the db.sql_tokenized.id dimension. Amazon RDS returns db.sql.tokenized_id from the db.sql dimension group.

        • db.sql_tokenized.id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). In the console, db.sql_tokenized.id is called the Support ID because Amazon Web Services Support can look at this data to help you troubleshoot database issues.

        • db.sql_tokenized.db_id - Either the native database ID used to refer to the SQL statement, or a synthetic ID such as pi-2372568224 that Performance Insights generates if the native database ID isn't available (all engines except Amazon DocumentDB).

        • db.sql_tokenized.statement - The text of the SQL digest, as in SELECT * FROM employees WHERE employee_id = ? (all engines except Amazon DocumentDB)

        • db.user.id - The ID of the user logged in to the database (all engines except Amazon DocumentDB).

        • db.user.name - The name of the user logged in to the database (all engines except Amazon DocumentDB).

        • db.wait_event.name - The event for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event.type - The type of event for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_event_type.name - The name of the event type for which the backend is waiting (all engines except Amazon DocumentDB).

        • db.wait_state.name - The event for which the backend is waiting (only Amazon DocumentDB).

      • Limit — (Integer)

        The maximum number of items to fetch for this dimension group.

    • Filter — (map<String>)

      One or more filters to apply in the request. Restrictions:

      • Any number of filters by the same dimension, as specified in the GroupBy or Partition parameters.

      • A single filter for any other dimension in this dimension group.

      Note: The db.sql.db_id filter isn't available for RDS for SQL Server DB instances.
    • MaxResults — (Integer)

      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.

    • NextToken — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AlignedStartTime — (Date)

        The start time for the returned dimension keys, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedStartTime will be less than or equal to the value of the user-specified StartTime.

      • AlignedEndTime — (Date)

        The end time for the returned dimension keys, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater than or equal to the value of the user-specified Endtime.

      • PartitionKeys — (Array<map>)

        If PartitionBy was present in the request, PartitionKeys contains the breakdown of dimension keys by the specified partitions.

        • Dimensionsrequired — (map<String>)

          A dimension map that contains the dimensions for this partition.

      • Keys — (Array<map>)

        The dimension keys that were requested.

        • Dimensions — (map<String>)

          A map of name-value pairs for the dimensions in the group.

        • Total — (Float)

          The aggregated metric value for the dimensions, over the requested time range.

        • AdditionalMetrics — (map<Float>)

          A map that contains the value for each additional metric.

        • Partitions — (Array<Float>)

          If PartitionBy was specified, PartitionKeys contains the dimensions that were.

      • NextToken — (String)

        A pagination token that indicates the response didn’t return all available records because MaxRecords was specified in the previous request. To get the remaining records, specify NextToken in a separate request with this value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDimensionKeyDetails(params = {}, callback) ⇒ AWS.Request

Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID, GetDimensionKeyDetails retrieves the full text of the dimension db.sql.statement associated with this ID. This operation is useful because GetResourceMetrics and DescribeDimensionKeys don't support retrieval of large SQL statement text.

Service Reference:

Examples:

Calling the getDimensionKeyDetails operation

var params = {
  Group: 'STRING_VALUE', /* required */
  GroupIdentifier: 'STRING_VALUE', /* required */
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  RequestedDimensions: [
    'STRING_VALUE',
    /* more items */
  ]
};
pi.getDimensionKeyDetails(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

      The Amazon Web Services service for which Performance Insights returns data. The only valid value is RDS.

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      The ID for a data source from which to gather dimension data. This ID must be immutable and unique within an Amazon Web Services Region. When a DB instance is the data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

    • Group — (String)

      The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are valid:

      • db.query (Amazon DocumentDB only)

      • db.sql (Amazon RDS and Aurora only)

    • GroupIdentifier — (String)

      The ID of the dimension group from which to retrieve dimension details. For dimension group db.sql, the group ID is db.sql.id. The following group ID values are valid:

      • db.sql.id for dimension group db.sql (Aurora and RDS only)

      • db.query.id for dimension group db.query (DocumentDB only)

    • RequestedDimensions — (Array<String>)

      A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

      • db.sql - Specify either the full dimension name db.sql.statement or the short dimension name statement (Aurora and RDS only).

      • db.query - Specify either the full dimension name db.query.statement or the short dimension name statement (DocumentDB only).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Dimensions — (Array<map>)

        The details for the requested dimensions.

        • Value — (String)

          The value of the dimension detail data. Depending on the return status, this value is either the full or truncated SQL query for the following dimensions:

          • db.query.statement (Amazon DocumentDB)

          • db.sql.statement (Amazon RDS and Aurora)

        • Dimension — (String)

          The full name of the dimension. The full name includes the group name and key name. The following values are valid:

          • db.query.statement (Amazon DocumentDB)

          • db.sql.statement (Amazon RDS and Aurora)

        • Status — (String)

          The status of the dimension detail data. Possible values include the following:

          • AVAILABLE - The dimension detail data is ready to be retrieved.

          • PROCESSING - The dimension detail data isn't ready to be retrieved because more processing time is required. If the requested detail data has the status PROCESSING, Performance Insights returns the truncated query.

          • UNAVAILABLE - The dimension detail data could not be collected successfully.

          Possible values include:
          • "AVAILABLE"
          • "PROCESSING"
          • "UNAVAILABLE"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPerformanceAnalysisReport(params = {}, callback) ⇒ AWS.Request

Retrieves the report including the report ID, status, time details, and the insights with recommendations. The report status can be RUNNING, SUCCEEDED, or FAILED. The insights include the description and recommendation fields.

Service Reference:

Examples:

Calling the getPerformanceAnalysisReport operation

var params = {
  AnalysisReportId: 'STRING_VALUE', /* required */
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  AcceptLanguage: EN_US,
  TextFormat: PLAIN_TEXT | MARKDOWN
};
pi.getPerformanceAnalysisReport(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

    • AnalysisReportId — (String)

      A unique identifier of the created analysis report. For example, report-12345678901234567

    • TextFormat — (String)

      Indicates the text format in the report. The options are PLAIN_TEXT or MARKDOWN. The default value is plain text.

      Possible values include:
      • "PLAIN_TEXT"
      • "MARKDOWN"
    • AcceptLanguage — (String)

      The text language in the report. The default language is EN_US (English).

      Possible values include:
      • "EN_US"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AnalysisReport — (map)

        The summary of the performance analysis report created for a time period.

        • AnalysisReportIdrequired — (String)

          The name of the analysis report.

        • Identifier — (String)

          The unique identifier of the analysis report.

        • ServiceType — (String)

          List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:

          • RDS

          • DOCDB

          Possible values include:
          • "RDS"
          • "DOCDB"
        • CreateTime — (Date)

          The time you created the analysis report.

        • StartTime — (Date)

          The analysis start time in the report.

        • EndTime — (Date)

          The analysis end time in the report.

        • Status — (String)

          The status of the created analysis report.

          Possible values include:
          • "RUNNING"
          • "SUCCEEDED"
          • "FAILED"
        • Insights — (Array<map>)

          The list of identified insights in the analysis report.

          • InsightIdrequired — (String)

            The unique identifier for the insight. For example, insight-12345678901234567.

          • InsightType — (String)

            The type of insight. For example, HighDBLoad, HighCPU, or DominatingSQLs.

          • Context — (String)

            Indicates if the insight is causal or correlated insight.

            Possible values include:
            • "CAUSAL"
            • "CONTEXTUAL"
          • StartTime — (Date)

            The start time of the insight. For example, 2018-10-30T00:00:00Z.

          • EndTime — (Date)

            The end time of the insight. For example, 2018-10-30T00:00:00Z.

          • Severity — (String)

            The severity of the insight. The values are: Low, Medium, or High.

            Possible values include:
            • "LOW"
            • "MEDIUM"
            • "HIGH"
          • Description — (String)

            Description of the insight. For example: A high severity Insight found between 02:00 to 02:30, where there was an unusually high DB load 600x above baseline. Likely performance impact.

          • Recommendations — (Array<map>)

            List of recommendations for the insight. For example, Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id.

            • RecommendationId — (String)

              The unique identifier for the recommendation.

            • RecommendationDescription — (String)

              The recommendation details to help resolve the performance issue. For example, Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id

          • InsightData — (Array<map>)

            List of data objects containing metrics and references from the time range while generating the insight.

            • PerformanceInsightsMetric — (map)

              This field determines the Performance Insights metric to render for the insight. The name field refers to a Performance Insights metric.

              • Metric — (String)

                The Performance Insights metric.

              • DisplayName — (String)

                The Performance Insights metric name.

              • Dimensions — (map<String>)

                A dimension map that contains the dimensions for this partition.

              • Value — (Float)

                The value of the metric. For example, 9 for db.load.avg.

          • BaselineData — (Array<map>)

            Metric names and values from the timeframe used as baseline to generate the insight.

            • PerformanceInsightsMetric — (map)

              This field determines the Performance Insights metric to render for the insight. The name field refers to a Performance Insights metric.

              • Metric — (String)

                The Performance Insights metric.

              • DisplayName — (String)

                The Performance Insights metric name.

              • Dimensions — (map<String>)

                A dimension map that contains the dimensions for this partition.

              • Value — (Float)

                The value of the metric. For example, 9 for db.load.avg.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getResourceMetadata(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getResourceMetadata operation

var params = {
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB /* required */
};
pi.getResourceMetadata(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Identifier — (String)

        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.

      • Features — (map<map>)

        The metadata for different features. For example, the metadata might indicate that a feature is turned on or off on a specific DB instance.

        • Status — (String)

          The status of the feature on the DB instance. Possible values include the following:

          • ENABLED - The feature is enabled on the instance.

          • DISABLED - The feature is disabled on the instance.

          • UNSUPPORTED - The feature isn't supported on the instance.

          • ENABLED_PENDING_REBOOT - The feature is enabled on the instance but requires a reboot to take effect.

          • DISABLED_PENDING_REBOOT - The feature is disabled on the instance but requires a reboot to take effect.

          • UNKNOWN - The feature status couldn't be determined.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "UNSUPPORTED"
          • "ENABLED_PENDING_REBOOT"
          • "DISABLED_PENDING_REBOOT"
          • "UNKNOWN"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getResourceMetrics(params = {}, callback) ⇒ AWS.Request

Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for each metric.

Note: Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

Service Reference:

Examples:

Calling the getResourceMetrics operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  Identifier: 'STRING_VALUE', /* required */
  MetricQueries: [ /* required */
    {
      Metric: 'STRING_VALUE', /* required */
      Filter: {
        '<SanitizedString>': 'STRING_VALUE',
        /* '<SanitizedString>': ... */
      },
      GroupBy: {
        Group: 'STRING_VALUE', /* required */
        Dimensions: [
          'STRING_VALUE',
          /* more items */
        ],
        Limit: 'NUMBER_VALUE'
      }
    },
    /* more items */
  ],
  ServiceType: RDS | DOCDB, /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PeriodAlignment: END_TIME | START_TIME,
  PeriodInSeconds: 'NUMBER_VALUE'
};
pi.getResourceMetrics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

      The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:

      • RDS

      • DOCDB

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

    • MetricQueries — (Array<map>)

      An array of one or more queries to perform. Each query must specify a Performance Insights metric and specify an aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric. For example, to find the average for the metric db.load you must use db.load.avg. Valid values for aggregate functions include .avg, .min, .max, and .sum.

      • Metricrequired — (String)

        The name of a Performance Insights metric to be measured.

        Valid values for Metric are:

        If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg and db.sampledload.avg are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and db.sampledload.avg less than db.load.avg. For most use cases, you can query db.load.avg only.

      • GroupBy — (map)

        A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.

        • Grouprequired — (String)

          The name of the dimension group. Valid values are as follows:

          • db - The name of the database to which the client is connected. The following values are permitted:

            • Aurora PostgreSQL

            • Amazon RDS PostgreSQL

            • Aurora MySQL

            • Amazon RDS MySQL

            • Amazon RDS MariaDB

            • Amazon DocumentDB

          • db.application - The name of the application that is connected to the database. The following values are permitted:

            • Aurora PostgreSQL

            • Amazon RDS PostgreSQL

            • Amazon DocumentDB

          • db.host - The host name of the connected client (all engines).

          • db.query - The query that is currently running (only Amazon DocumentDB).

          • db.query_tokenized - The digest query (only Amazon DocumentDB).

          • db.session_type - The type of the current session (only Aurora PostgreSQL and RDS PostgreSQL).

          • db.sql - The text of the SQL statement that is currently running (all engines except Amazon DocumentDB).

          • db.sql_tokenized - The SQL digest (all engines except Amazon DocumentDB).

          • db.user - The user logged in to the database (all engines except Amazon DocumentDB).

          • db.wait_event - The event for which the database backend is waiting (all engines except Amazon DocumentDB).

          • db.wait_event_type - The type of event for which the database backend is waiting (all engines except Amazon DocumentDB).

          • db.wait_state - The event for which the database backend is waiting (only Amazon DocumentDB).

        • Dimensions — (Array<String>)

          A list of specific dimensions from a dimension group. If this parameter is not present, then it signifies that all of the dimensions in the group were requested, or are present in the response.

          Valid values for elements in the Dimensions array are:

          • db.application.name - The name of the application that is connected to the database. Valid values are as follows:

            • Aurora PostgreSQL

            • Amazon RDS PostgreSQL

            • Amazon DocumentDB

          • db.host.id - The host ID of the connected client (all engines).

          • db.host.name - The host name of the connected client (all engines).

          • db.name - The name of the database to which the client is connected. Valid values are as follows:

            • Aurora PostgreSQL

            • Amazon RDS PostgreSQL

            • Aurora MySQL

            • Amazon RDS MySQL

            • Amazon RDS MariaDB

            • Amazon DocumentDB

          • db.query.id - The query ID generated by Performance Insights (only Amazon DocumentDB).

          • db.query.db_id - The query ID generated by the database (only Amazon DocumentDB).

          • db.query.statement - The text of the query that is being run (only Amazon DocumentDB).

          • db.query.tokenized_id

          • db.query.tokenized.id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

          • db.query.tokenized.db_id - The query digest ID generated by Performance Insights (only Amazon DocumentDB).

          • db.query.tokenized.statement - The text of the query digest (only Amazon DocumentDB).

          • db.session_type.name - The type of the current session (only Amazon DocumentDB).

          • db.sql.id - The hash of the full, non-tokenized SQL statement generated by Performance Insights (all engines except Amazon DocumentDB).

          • db.sql.db_id - Either the SQL ID generated by the database engine, or a value generated by Performance Insights that begins with pi- (all engines except Amazon DocumentDB).

          • db.sql.statement - The full text of the SQL statement that is running, as in SELECT * FROM employees (all engines except Amazon DocumentDB)

          • db.sql.tokenized_id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). The db.sql.tokenized_id dimension fetches the value of the db.sql_tokenized.id dimension. Amazon RDS returns db.sql.tokenized_id from the db.sql dimension group.

          • db.sql_tokenized.id - The hash of the SQL digest generated by Performance Insights (all engines except Amazon DocumentDB). In the console, db.sql_tokenized.id is called the Support ID because Amazon Web Services Support can look at this data to help you troubleshoot database issues.

          • db.sql_tokenized.db_id - Either the native database ID used to refer to the SQL statement, or a synthetic ID such as pi-2372568224 that Performance Insights generates if the native database ID isn't available (all engines except Amazon DocumentDB).

          • db.sql_tokenized.statement - The text of the SQL digest, as in SELECT * FROM employees WHERE employee_id = ? (all engines except Amazon DocumentDB)

          • db.user.id - The ID of the user logged in to the database (all engines except Amazon DocumentDB).

          • db.user.name - The name of the user logged in to the database (all engines except Amazon DocumentDB).

          • db.wait_event.name - The event for which the backend is waiting (all engines except Amazon DocumentDB).

          • db.wait_event.type - The type of event for which the backend is waiting (all engines except Amazon DocumentDB).

          • db.wait_event_type.name - The name of the event type for which the backend is waiting (all engines except Amazon DocumentDB).

          • db.wait_state.name - The event for which the backend is waiting (only Amazon DocumentDB).

        • Limit — (Integer)

          The maximum number of items to fetch for this dimension group.

      • Filter — (map<String>)

        One or more filters to apply in the request. Restrictions:

        • Any number of filters by the same dimension, as specified in the GroupBy parameter.

        • A single filter for any other dimension in this dimension group.

        Note: The db.sql.db_id filter isn't available for RDS for SQL Server DB instances.
    • StartTime — (Date)

      The date and time specifying the beginning of the requested time series query range. You can't specify a StartTime that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention, but you can extend this range up to 2 years. The value specified is inclusive. Thus, the command returns data points equal to or greater than StartTime.

      The value for StartTime must be earlier than the value for EndTime.

    • EndTime — (Date)

      The date and time specifying the end of the requested time series query range. The value specified is exclusive. Thus, the command returns data points less than (but not equal to) EndTime.

      The value for EndTime must be later than the value for StartTime.

    • PeriodInSeconds — (Integer)

      The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:

      • 1 (one second)

      • 60 (one minute)

      • 300 (five minutes)

      • 3600 (one hour)

      • 86400 (twenty-four hours)

      If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a goal of returning roughly 100-200 data points in the response.

    • MaxResults — (Integer)

      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.

    • NextToken — (String)

      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.

    • PeriodAlignment — (String)

      The returned timestamp which is the start or end time of the time periods. The default value is END_TIME.

      Possible values include:
      • "END_TIME"
      • "START_TIME"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AlignedStartTime — (Date)

        The start time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedStartTime will be less than or equal to the value of the user-specified StartTime.

      • AlignedEndTime — (Date)

        The end time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater than or equal to the value of the user-specified Endtime.

      • Identifier — (String)

        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.

      • MetricList — (Array<map>)

        An array of metric results, where each array element contains all of the data points for a particular dimension.

        • Key — (map)

          The dimensions to which the data points apply.

          • Metricrequired — (String)

            The name of a Performance Insights metric to be measured.

            Valid values for Metric are:

            If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg and db.sampledload.avg are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and db.sampledload.avg less than db.load.avg. For most use cases, you can query db.load.avg only.

          • Dimensions — (map<String>)

            The valid dimensions for the metric.

        • DataPoints — (Array<map>)

          An array of timestamp-value pairs, representing measurements over a period of time.

          • Timestamprequired — (Date)

            The time, in epoch format, associated with a particular Value.

          • Valuerequired — (Float)

            The actual value associated with a particular Timestamp.

      • NextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAvailableResourceDimensions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAvailableResourceDimensions operation

var params = {
  Identifier: 'STRING_VALUE', /* required */
  Metrics: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ServiceType: RDS | DOCDB, /* required */
  AuthorizedActions: [
    DescribeDimensionKeys | GetDimensionKeyDetails | GetResourceMetrics,
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
pi.listAvailableResourceDimensions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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 — (Array<String>)

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

    • MaxResults — (Integer)

      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.

    • NextToken — (String)

      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.

    • AuthorizedActions — (Array<String>)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MetricDimensions — (Array<map>)

        The dimension information returned for requested metric types.

        • Metric — (String)

          The metric type to which the dimension information belongs.

        • Groups — (Array<map>)

          The available dimension groups for a metric type.

          • Group — (String)

            The name of the dimension group.

          • Dimensions — (Array<map>)

            The dimensions within a dimension group.

            • Identifier — (String)

              The identifier of a dimension.

      • NextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAvailableResourceMetrics(params = {}, callback) ⇒ AWS.Request

Retrieve metrics of the specified types that can be queried for a specified DB instance.

Service Reference:

Examples:

Calling the listAvailableResourceMetrics operation

var params = {
  Identifier: 'STRING_VALUE', /* required */
  MetricTypes: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ServiceType: RDS | DOCDB, /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
pi.listAvailableResourceMetrics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

    • MetricTypes — (Array<String>)

      The types of metrics to return in the response. Valid values in the array include the following:

      • os (OS counter metrics) - All engines

      • db (DB load metrics) - All engines except for Amazon DocumentDB

      • db.sql.stats (per-SQL metrics) - All engines except for Amazon DocumentDB

      • db.sql_tokenized.stats (per-SQL digest metrics) - All engines except for Amazon DocumentDB

    • NextToken — (String)

      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.

    • MaxResults — (Integer)

      The maximum number of items to return. If the MaxRecords value is less than the number of existing items, the response includes a pagination token.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metrics — (Array<map>)

        An array of metrics available to query. Each array element contains the full name, description, and unit of the metric.

        • Metric — (String)

          The full name of the metric.

        • Description — (String)

          The description of the metric.

        • Unit — (String)

          The unit of the metric.

      • NextToken — (String)

        A pagination token that indicates the response didn’t return all available records because MaxRecords was specified in the previous request. To get the remaining records, specify NextToken in a separate request with this value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPerformanceAnalysisReports(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listPerformanceAnalysisReports operation

var params = {
  Identifier: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  ListTags: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
pi.listPerformanceAnalysisReports(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • Identifier — (String)

      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.

    • NextToken — (String)

      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.

    • MaxResults — (Integer)

      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.

    • ListTags — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AnalysisReports — (Array<map>)

        List of reports including the report identifier, start and end time, creation time, and status.

        • AnalysisReportId — (String)

          The name of the analysis report.

        • CreateTime — (Date)

          The time you created the analysis report.

        • StartTime — (Date)

          The start time of the analysis in the report.

        • EndTime — (Date)

          The end time of the analysis in the report.

        • Status — (String)

          The status of the analysis report.

          Possible values include:
          • "RUNNING"
          • "SUCCEEDED"
          • "FAILED"
        • Tags — (Array<map>)

          List of all the tags added to the analysis report.

          • Keyrequired — (String)

            A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").

          • Valuerequired — (String)

            A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\\p{Z}\\p{N}.:/=+\-@]*)$").

      • NextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB /* required */
};
pi.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

      List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

      Possible values include:
      • "RDS"
      • "DOCDB"
    • ResourceARN — (String)

      Lists all the tags for the Amazon RDS Performance Insights resource. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (Array<map>)

        The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

        • Keyrequired — (String)

          A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").

        • Valuerequired — (String)

          A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\\p{Z}\\p{N}.:/=+\-@]*)$").

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds metadata tags to the Amazon RDS Performance Insights resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
pi.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

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

      Possible values include:
      • "RDS"
      • "DOCDB"
    • ResourceARN — (String)

      The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

    • Tags — (Array<map>)

      The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

      • Keyrequired — (String)

        A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").

      • Valuerequired — (String)

        A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds:. The string can only contain only the set of Unicode letters, digits, white-space, '', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\\p{Z}\\p{N}.:/=+\-@]*)$").

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Deletes the metadata tags from the Amazon RDS Performance Insights resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  ServiceType: RDS | DOCDB, /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
pi.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServiceType — (String)

      List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

      Possible values include:
      • "RDS"
      • "DOCDB"
    • ResourceARN — (String)

      The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

    • TagKeys — (Array<String>)

      The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.