Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide specific dimension groups and dimensions, and provide aggregation and filtering criteria for each group.
Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.
Synopsis
- data GetResourceMetrics = GetResourceMetrics' {}
- newGetResourceMetrics :: ServiceType -> Text -> NonEmpty MetricQuery -> UTCTime -> UTCTime -> GetResourceMetrics
- getResourceMetrics_maxResults :: Lens' GetResourceMetrics (Maybe Natural)
- getResourceMetrics_nextToken :: Lens' GetResourceMetrics (Maybe Text)
- getResourceMetrics_periodInSeconds :: Lens' GetResourceMetrics (Maybe Int)
- getResourceMetrics_serviceType :: Lens' GetResourceMetrics ServiceType
- getResourceMetrics_identifier :: Lens' GetResourceMetrics Text
- getResourceMetrics_metricQueries :: Lens' GetResourceMetrics (NonEmpty MetricQuery)
- getResourceMetrics_startTime :: Lens' GetResourceMetrics UTCTime
- getResourceMetrics_endTime :: Lens' GetResourceMetrics UTCTime
- data GetResourceMetricsResponse = GetResourceMetricsResponse' {}
- newGetResourceMetricsResponse :: Int -> GetResourceMetricsResponse
- getResourceMetricsResponse_alignedEndTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
- getResourceMetricsResponse_alignedStartTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
- getResourceMetricsResponse_identifier :: Lens' GetResourceMetricsResponse (Maybe Text)
- getResourceMetricsResponse_metricList :: Lens' GetResourceMetricsResponse (Maybe [MetricKeyDataPoints])
- getResourceMetricsResponse_nextToken :: Lens' GetResourceMetricsResponse (Maybe Text)
- getResourceMetricsResponse_httpStatus :: Lens' GetResourceMetricsResponse Int
Creating a Request
data GetResourceMetrics Source #
See: newGetResourceMetrics
smart constructor.
GetResourceMetrics' | |
|
Instances
newGetResourceMetrics Source #
:: ServiceType | |
-> Text | |
-> NonEmpty MetricQuery | |
-> UTCTime | |
-> UTCTime | |
-> GetResourceMetrics |
Create a value of GetResourceMetrics
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:maxResults:GetResourceMetrics'
, getResourceMetrics_maxResults
- 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.
GetResourceMetrics
, getResourceMetrics_nextToken
- 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
.
$sel:periodInSeconds:GetResourceMetrics'
, getResourceMetrics_periodInSeconds
- 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.
$sel:serviceType:GetResourceMetrics'
, getResourceMetrics_serviceType
- The Amazon Web Services service for which Performance Insights returns
metrics. Valid values are as follows:
RDS
DOCDB
GetResourceMetrics
, getResourceMetrics_identifier
- 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
.
$sel:metricQueries:GetResourceMetrics'
, getResourceMetrics_metricQueries
- An array of one or more queries to perform. Each query must specify a
Performance Insights metric, and can optionally specify aggregation and
filtering criteria.
$sel:startTime:GetResourceMetrics'
, getResourceMetrics_startTime
- 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
.
$sel:endTime:GetResourceMetrics'
, getResourceMetrics_endTime
- 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
.
Request Lenses
getResourceMetrics_maxResults :: Lens' GetResourceMetrics (Maybe Natural) Source #
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.
getResourceMetrics_nextToken :: Lens' GetResourceMetrics (Maybe Text) Source #
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
.
getResourceMetrics_periodInSeconds :: Lens' GetResourceMetrics (Maybe Int) Source #
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.
getResourceMetrics_serviceType :: Lens' GetResourceMetrics ServiceType Source #
The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
RDS
DOCDB
getResourceMetrics_identifier :: Lens' GetResourceMetrics Text Source #
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
.
getResourceMetrics_metricQueries :: Lens' GetResourceMetrics (NonEmpty MetricQuery) Source #
An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can optionally specify aggregation and filtering criteria.
getResourceMetrics_startTime :: Lens' GetResourceMetrics UTCTime Source #
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
.
getResourceMetrics_endTime :: Lens' GetResourceMetrics UTCTime Source #
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
.
Destructuring the Response
data GetResourceMetricsResponse Source #
See: newGetResourceMetricsResponse
smart constructor.
GetResourceMetricsResponse' | |
|
Instances
newGetResourceMetricsResponse Source #
Create a value of GetResourceMetricsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:alignedEndTime:GetResourceMetricsResponse'
, getResourceMetricsResponse_alignedEndTime
- 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
.
$sel:alignedStartTime:GetResourceMetricsResponse'
, getResourceMetricsResponse_alignedStartTime
- 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
.
GetResourceMetrics
, getResourceMetricsResponse_identifier
- 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
.
$sel:metricList:GetResourceMetricsResponse'
, getResourceMetricsResponse_metricList
- An array of metric results, where each array element contains all of the
data points for a particular dimension.
GetResourceMetrics
, getResourceMetricsResponse_nextToken
- 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
.
$sel:httpStatus:GetResourceMetricsResponse'
, getResourceMetricsResponse_httpStatus
- The response's http status code.
Response Lenses
getResourceMetricsResponse_alignedEndTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime) Source #
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
.
getResourceMetricsResponse_alignedStartTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime) Source #
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
.
getResourceMetricsResponse_identifier :: Lens' GetResourceMetricsResponse (Maybe Text) Source #
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
.
getResourceMetricsResponse_metricList :: Lens' GetResourceMetricsResponse (Maybe [MetricKeyDataPoints]) Source #
An array of metric results, where each array element contains all of the data points for a particular dimension.
getResourceMetricsResponse_nextToken :: Lens' GetResourceMetricsResponse (Maybe Text) Source #
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
.
getResourceMetricsResponse_httpStatus :: Lens' GetResourceMetricsResponse Int Source #
The response's http status code.