describe_dimension_keys
¶
describe_dimension_keys(
service_type: ServiceType,
identifier: IdentifierString,
start_time: ISOTimestamp,
end_time: ISOTimestamp,
metric: RequestString,
group_by: DimensionGroup,
*,
config_overrides: Optional[PIClientConfig] = None,
period_in_seconds: Optional[Integer] = None,
additional_metrics: Optional[AdditionalMetricsList] = None,
partition_by: Optional[DimensionGroup] = None,
filter: Optional[MetricQueryFilterMap] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> DescribeDimensionKeysResponse
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:
-
service_type(ServiceType) –The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:
-
RDS -
DOCDB
-
-
identifier(IdentifierString) –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
DbiResourceIdvalue. For example, specifydb-FAIHNTYBKTGAUSUZQYPDS2GW4A. -
start_time(ISOTimestamp) –The date and time specifying the beginning of the requested time series data. You must specify a
StartTimewithin the past 7 days. The value specified is inclusive, which means that data points equal to or greater thanStartTimeare returned.The value for
StartTimemust be earlier than the value forEndTime. -
end_time(ISOTimestamp) –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)
EndTimeare returned.The value for
EndTimemust be later than the value forStartTime. -
metric(RequestString) –The name of a Performance Insights metric to be measured.
Valid values for
Metricare:-
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.avganddb.sampledload.avgare the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, withdb.load.avgshowing the scaled values,db.sampledload.avgshowing the raw values, anddb.sampledload.avgless thandb.load.avg. For most use cases, you can querydb.load.avgonly. -
-
period_in_seconds(Optional[Integer], default:None) –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. -
-
group_by(DimensionGroup) –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.
-
additional_metrics(Optional[AdditionalMetricsList], default:None) –Additional metrics for the top
Ndimension keys. If the specified dimension group in theGroupByparameter isdb.sql_tokenized, you can specify per-SQL metrics to get the values for the topNSQL digests. The response syntax is as follows:"AdditionalMetrics" : { "string" : "string" }.The only supported statistic function is
.avg. -
partition_by(Optional[DimensionGroup], default:None) –For each dimension specified in
GroupBy, specify a secondary dimension to further subdivide the partition keys in the response. -
filter(Optional[MetricQueryFilterMap], default:None) –One or more filters to apply in the request. Restrictions:
-
Any number of filters by the same dimension, as specified in the
GroupByorPartitionparameters. -
A single filter for any other dimension in this dimension group.
The
db.sql.db_idfilter isn't available for RDS for SQL Server DB instances. -
-
max_results(Optional[MaxResults], default:None) –The maximum number of items to return in the response. If more items exist than the specified
MaxRecordsvalue, a pagination token is included in the response so that the remaining results can be retrieved. -
next_token(Optional[NextToken], default:None) –An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by
MaxRecords.
Raises:
-
InternalServiceError–The request failed due to an unknown error.
-
InvalidArgumentException–One of the arguments provided is invalid for this request.
-
NotAuthorizedException–The user is not authorized to perform this request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_pi/_services/pi.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |