libZSservicesZSamazonka-piZSamazonka-pi
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Pi.GetResourceMetrics

Description

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

Creating a Request

data GetResourceMetrics Source #

See: newGetResourceMetrics smart constructor.

Constructors

GetResourceMetrics' 

Fields

  • periodInSeconds :: Maybe Int

    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.

  • nextToken :: Maybe Text

    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 :: Maybe Natural

    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.

  • serviceType :: ServiceType

    The AWS service for which Performance Insights returns metrics. The only valid value for ServiceType is RDS.

  • identifier :: Text

    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.

  • metricQueries :: NonEmpty MetricQuery

    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.

  • startTime :: POSIX

    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.

  • endTime :: POSIX

    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.

Instances

Instances details
Eq GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Read GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Show GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Generic GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Associated Types

type Rep GetResourceMetrics :: Type -> Type #

NFData GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Methods

rnf :: GetResourceMetrics -> () #

Hashable GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

ToJSON GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

AWSRequest GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Associated Types

type AWSResponse GetResourceMetrics #

ToHeaders GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

ToPath GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

ToQuery GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

type Rep GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

type AWSResponse GetResourceMetrics Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

newGetResourceMetrics Source #

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.

Constructors

GetResourceMetricsResponse' 

Fields

  • identifier :: Maybe Text

    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

  • metricList :: Maybe [MetricKeyDataPoints]

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

  • alignedEndTime :: Maybe POSIX

    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.

  • alignedStartTime :: Maybe POSIX

    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.

  • nextToken :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Read GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Show GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Generic GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

Associated Types

type Rep GetResourceMetricsResponse :: Type -> Type #

NFData GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

type Rep GetResourceMetricsResponse Source # 
Instance details

Defined in Amazonka.Pi.GetResourceMetrics

type Rep GetResourceMetricsResponse = D1 ('MetaData "GetResourceMetricsResponse" "Amazonka.Pi.GetResourceMetrics" "libZSservicesZSamazonka-piZSamazonka-pi" 'False) (C1 ('MetaCons "GetResourceMetricsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "identifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "metricList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [MetricKeyDataPoints])) :*: S1 ('MetaSel ('Just "alignedEndTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "alignedStartTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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.