Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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_periodInSeconds :: Lens' GetResourceMetrics (Maybe Int)
- getResourceMetrics_nextToken :: Lens' GetResourceMetrics (Maybe Text)
- getResourceMetrics_maxResults :: Lens' GetResourceMetrics (Maybe Natural)
- 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_identifier :: Lens' GetResourceMetricsResponse (Maybe Text)
- getResourceMetricsResponse_metricList :: Lens' GetResourceMetricsResponse (Maybe [MetricKeyDataPoints])
- getResourceMetricsResponse_alignedEndTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
- getResourceMetricsResponse_alignedStartTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
- 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: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:nextToken: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: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.
$sel:serviceType:GetResourceMetrics'
, getResourceMetrics_serviceType
- The AWS service for which Performance Insights returns metrics. The only
valid value for ServiceType is RDS
.
$sel:identifier:GetResourceMetrics'
, getResourceMetrics_identifier
- An immutable, AWS Region-unique identifier for a data source.
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-FAIHNTYBKTGAUSUZQYPDS2GW4A
.
$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
data. You can't specify a StartTime
that's earlier than 7 days ago.
The value specified is inclusive - data points equal to or greater
than StartTime
will be returned.
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 data.
The value specified is exclusive - data points less than (but not
equal to) EndTime
will be returned.
The value for EndTime
must be later than the value for StartTime
.
Request Lenses
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_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_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_serviceType :: Lens' GetResourceMetrics ServiceType Source #
The AWS service for which Performance Insights returns metrics. The only
valid value for ServiceType is RDS
.
getResourceMetrics_identifier :: Lens' GetResourceMetrics Text Source #
An immutable, AWS Region-unique identifier for a data source. 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-FAIHNTYBKTGAUSUZQYPDS2GW4A
.
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
data. You can't specify a StartTime
that's earlier than 7 days ago.
The value specified is inclusive - data points equal to or greater
than StartTime
will be returned.
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 data.
The value specified is exclusive - data points less than (but not
equal to) EndTime
will be returned.
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:identifier:GetResourceMetrics'
, getResourceMetricsResponse_identifier
- An immutable, AWS Region-unique identifier for a data source.
Performance Insights gathers metrics from this data source.
To use a DB instance as a data source, you specify its DbiResourceId
value - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
$sel:metricList:GetResourceMetricsResponse'
, getResourceMetricsResponse_metricList
- An array of metric results,, where each array element contains all of
the data points for a particular dimension.
$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
.
$sel:nextToken: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_identifier :: Lens' GetResourceMetricsResponse (Maybe Text) Source #
An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.
To use a DB instance as a data source, you specify its DbiResourceId
value - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
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_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_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.