AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Performance Insights DescribeDimensionKeys API operation.

Syntax

Get-PIDimensionKey
-AdditionalMetric <String[]>
-GroupBy_Dimension <String[]>
-PartitionBy_Dimension <String[]>
-EndTime <DateTime>
-Filter <Hashtable>
-GroupBy_Group <String>
-PartitionBy_Group <String>
-Identifier <String>
-GroupBy_Limit <Int32>
-PartitionBy_Limit <Int32>
-Metric <String>
-PeriodInSecond <Int32>
-ServiceType <ServiceType>
-StartTime <DateTime>
-MaxResult <Int32>
-NextToken <String>
-Select <String>
-ClientConfig <AmazonPIConfig>

Description

For a specific time period, retrieve the top N dimension keys for a metric. Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

Parameters

-AdditionalMetric <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" }.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAdditionalMetrics
-ClientConfig <AmazonPIConfig>
Amazon.PowerShell.Cmdlets.PI.AmazonPIClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EndTime <DateTime>
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.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Filter <Hashtable>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GroupBy_Dimension <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
  • 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).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGroupBy_Dimensions
-GroupBy_Group <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).
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-GroupBy_Limit <Int32>
The maximum number of items to fetch for this dimension group.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxResult <Int32>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMaxResults
-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.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PartitionBy_Dimension <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
  • 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).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPartitionBy_Dimensions
-PartitionBy_Group <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).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PartitionBy_Limit <Int32>
The maximum number of items to fetch for this dimension group.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PeriodInSecond <Int32>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPeriodInSeconds
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.PI.Model.DescribeDimensionKeysResponse). Specifying the name of a property of type Amazon.PI.Model.DescribeDimensionKeysResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ServiceType <ServiceType>
The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:
  • RDS
  • DOCDB
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-StartTime <DateTime>
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.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.PI.Model.DescribeDimensionKeysResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z