class Aws::Connect::Types::GetMetricDataRequest

@note When making an API call, you may pass GetMetricDataRequest

data as a hash:

    {
      instance_id: "InstanceId", # required
      start_time: Time.now, # required
      end_time: Time.now, # required
      filters: { # required
        queues: ["QueueId"],
        channels: ["VOICE"], # accepts VOICE, CHAT, TASK
      },
      groupings: ["QUEUE"], # accepts QUEUE, CHANNEL
      historical_metrics: [ # required
        {
          name: "CONTACTS_QUEUED", # accepts CONTACTS_QUEUED, CONTACTS_HANDLED, CONTACTS_ABANDONED, CONTACTS_CONSULTED, CONTACTS_AGENT_HUNG_UP_FIRST, CONTACTS_HANDLED_INCOMING, CONTACTS_HANDLED_OUTBOUND, CONTACTS_HOLD_ABANDONS, CONTACTS_TRANSFERRED_IN, CONTACTS_TRANSFERRED_OUT, CONTACTS_TRANSFERRED_IN_FROM_QUEUE, CONTACTS_TRANSFERRED_OUT_FROM_QUEUE, CONTACTS_MISSED, CALLBACK_CONTACTS_HANDLED, API_CONTACTS_HANDLED, OCCUPANCY, HANDLE_TIME, AFTER_CONTACT_WORK_TIME, QUEUED_TIME, ABANDON_TIME, QUEUE_ANSWER_TIME, HOLD_TIME, INTERACTION_TIME, INTERACTION_AND_HOLD_TIME, SERVICE_LEVEL
          threshold: {
            comparison: "LT", # accepts LT
            threshold_value: 1.0,
          },
          statistic: "SUM", # accepts SUM, MAX, AVG
          unit: "SECONDS", # accepts SECONDS, COUNT, PERCENT
        },
      ],
      next_token: "NextToken",
      max_results: 1,
    }

@!attribute [rw] instance_id

The identifier of the Amazon Connect instance. You can find the
instanceId in the ARN of the instance.
@return [String]

@!attribute [rw] start_time

The timestamp, in UNIX Epoch time format, at which to start the
reporting interval for the retrieval of historical metrics data. The
time must be specified using a multiple of 5 minutes, such as 10:05,
10:10, 10:15.

The start time cannot be earlier than 24 hours before the time of
the request. Historical metrics are available only for 24 hours.
@return [Time]

@!attribute [rw] end_time

The timestamp, in UNIX Epoch time format, at which to end the
reporting interval for the retrieval of historical metrics data. The
time must be specified using an interval of 5 minutes, such as
11:00, 11:05, 11:10, and must be later than the start time
timestamp.

The time range between the start and end time must be less than 24
hours.
@return [Time]

@!attribute [rw] filters

The queues, up to 100, or channels, to use to filter the metrics
returned. Metric data is retrieved only for the resources associated
with the queues or channels included in the filter. You can include
both queue IDs and queue ARNs in the same request. VOICE, CHAT, and
TASK channels are supported.

<note markdown="1"> To filter by `Queues`, enter the queue ID/ARN, not the name of the
queue.

 </note>
@return [Types::Filters]

@!attribute [rw] groupings

The grouping applied to the metrics returned. For example, when
results are grouped by queue, the metrics returned are grouped by
queue. The values returned apply to the metrics for each queue
rather than aggregated for all queues.

If no grouping is specified, a summary of metrics for all queues is
returned.
@return [Array<String>]

@!attribute [rw] historical_metrics

The metrics to retrieve. Specify the name, unit, and statistic for
each metric. The following historical metrics are available. For a
description of each metric, see [Historical Metrics Definitions][1]
in the *Amazon Connect Administrator Guide*.

<note markdown="1"> This API does not support a contacts incoming metric (there's no
CONTACTS\_INCOMING metric missing from the documented list).

 </note>

ABANDON\_TIME

: Unit: SECONDS

  Statistic: AVG

AFTER\_CONTACT\_WORK\_TIME

: Unit: SECONDS

  Statistic: AVG

API\_CONTACTS\_HANDLED

: Unit: COUNT

  Statistic: SUM

CALLBACK\_CONTACTS\_HANDLED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_ABANDONED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_AGENT\_HUNG\_UP\_FIRST

: Unit: COUNT

  Statistic: SUM

CONTACTS\_CONSULTED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_HANDLED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_HANDLED\_INCOMING

: Unit: COUNT

  Statistic: SUM

CONTACTS\_HANDLED\_OUTBOUND

: Unit: COUNT

  Statistic: SUM

CONTACTS\_HOLD\_ABANDONS

: Unit: COUNT

  Statistic: SUM

CONTACTS\_MISSED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_QUEUED

: Unit: COUNT

  Statistic: SUM

CONTACTS\_TRANSFERRED\_IN

: Unit: COUNT

  Statistic: SUM

CONTACTS\_TRANSFERRED\_IN\_FROM\_QUEUE

: Unit: COUNT

  Statistic: SUM

CONTACTS\_TRANSFERRED\_OUT

: Unit: COUNT

  Statistic: SUM

CONTACTS\_TRANSFERRED\_OUT\_FROM\_QUEUE

: Unit: COUNT

  Statistic: SUM

HANDLE\_TIME

: Unit: SECONDS

  Statistic: AVG

HOLD\_TIME

: Unit: SECONDS

  Statistic: AVG

INTERACTION\_AND\_HOLD\_TIME

: Unit: SECONDS

  Statistic: AVG

INTERACTION\_TIME

: Unit: SECONDS

  Statistic: AVG

OCCUPANCY

: Unit: PERCENT

  Statistic: AVG

QUEUE\_ANSWER\_TIME

: Unit: SECONDS

  Statistic: AVG

QUEUED\_TIME

: Unit: SECONDS

  Statistic: MAX

SERVICE\_LEVEL

: You can include up to 20 SERVICE\_LEVEL metrics in a request.

  Unit: PERCENT

  Statistic: AVG

  Threshold: For `ThresholdValue`, enter any whole number from 1 to
  604800 (inclusive), in seconds. For `Comparison`, you must enter
  `LT` (for "Less than").

[1]: https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html
@return [Array<Types::HistoricalMetric>]

@!attribute [rw] next_token

The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of
results.
@return [String]

@!attribute [rw] max_results

The maximum number of results to return per page.
@return [Integer]

@see docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/GetMetricDataRequest AWS API Documentation

Constants

SENSITIVE