Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . connect ]

get-current-metric-data

Description

The GetCurrentMetricData operation retrieves current metric data from your Amazon Connect instance.

If you are using an IAM account, it must have permission to the connect:GetCurrentMetricData action.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  get-current-metric-data
--instance-id <value>
--filters <value>
[--groupings <value>]
--current-metrics <value>
[--next-token <value>]
[--max-results <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--instance-id (string)

The identifier for your Amazon Connect instance. To find the ID of your instance, open the AWS console and select Amazon Connect. Select the alias of the instance in the Instance alias column. The instance ID is displayed in the Overview section of your instance settings. For example, the instance ID is the set of characters at the end of the instance ARN, after instance/, such as 10a4c4eb-f57e-4d4c-b602-bf39176ced07.

--filters (structure)

A Filters object that contains a list of queue IDs or queue ARNs, up to 100, or list of Channels to use to filter the metrics returned in the response. Metric data is retrieved only for the resources associated with the queue IDs, ARNs, or Channels included in the filter. You can include both IDs and ARNs in the same request. To retrieve metrics for all queues, add the queue ID or ARN for each queue in your instance. Only VOICE is supported for Channels.

To find the ARN for a queue, open the queue you want to use in the Amazon Connect Queue editor. The ARN for the queue is displayed in the address bar as part of the URL. For example, the queue ARN is the set of characters at the end of the URL, after 'id=' such as arn:aws:connect:us-east-1:270923740243:instance/78fb859d-1b7d-44b1-8aa3-12f0835c5855/queue/1d1a4575-9618-40ab-bbeb-81e45795fe61 . The queue ID is also included in the URL, and is the string after 'queue/'.

Shorthand Syntax:

Queues=string,string,Channels=string,string

JSON Syntax:

{
  "Queues": ["string", ...],
  "Channels": ["VOICE", ...]
}

--groupings (list)

The grouping applied to the metrics returned. For example, when grouped by QUEUE, the metrics returned apply to each queue rather than aggregated for all queues. If you group by CHANNEL, you should include a Channels filter. The only supported channel is VOICE.

If no Grouping is included in the request, a summary of CurrentMetrics is returned.

Syntax:

"string" "string" ...

Where valid values are:
  QUEUE
  CHANNEL

--current-metrics (list)

A list of CurrentMetric objects for the metrics to retrieve. Each CurrentMetric includes a name of a metric to retrieve and the unit to use for it. You must list each metric to retrieve data for in the request.

The following metrics are available:

AGENTS_AVAILABLE

Unit: COUNT

AGENTS_ONLINE

Unit: COUNT

AGENTS_ON_CALL

Unit: COUNT

AGENTS_STAFFED

Unit: COUNT

AGENTS_AFTER_CONTACT_WORK

Unit: COUNT

AGENTS_NON_PRODUCTIVE

Unit: COUNT

AGENTS_ERROR

Unit: COUNT

CONTACTS_IN_QUEUE

Unit: COUNT

OLDEST_CONTACT_AGE

Unit: SECONDS

CONTACTS_SCHEDULED

Unit: COUNT

Shorthand Syntax:

Name=string,Unit=string ...

JSON Syntax:

[
  {
    "Name": "AGENTS_ONLINE"|"AGENTS_AVAILABLE"|"AGENTS_ON_CALL"|"AGENTS_NON_PRODUCTIVE"|"AGENTS_AFTER_CONTACT_WORK"|"AGENTS_ERROR"|"AGENTS_STAFFED"|"CONTACTS_IN_QUEUE"|"OLDEST_CONTACT_AGE"|"CONTACTS_SCHEDULED",
    "Unit": "SECONDS"|"COUNT"|"PERCENT"
  }
  ...
]

--next-token (string)

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.

The token expires after 5 minutes from the time it is created. Subsequent requests that use the `NextToken must use the same request parameters as the request that generated the token.

--max-results (integer)

MaxResults indicates the maximum number of results to return per page in the response, between 1 and 100.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

NextToken -> (string)

A string returned in the response. Use the value returned in the response as the value of the NextToken in a subsequent request to retrieve the next set of results.

The token expires after 5 minutes from the time it is created. Subsequent requests that use the NextToken must use the same request parameters as the request that generated the token.

MetricResults -> (list)

A list of CurrentMetricResult objects organized by Dimensions combining with CurrentMetricDataCollections .

Dimensions is the resourceId specified in the Filters of the request.

Collections is a list of CurrentMetricData objects with corresponding values to the CurrentMetrics specified in the request.

If no Grouping is specified in the request, Collections is a summary for the CurrentMetric returned.

(structure)

A CurrentMetricResult object.

Dimensions -> (structure)

The Dimensions for the CurrentMetricResult object.

Queue -> (structure)

A QueueReference object used as one part of dimension for the metrics results.

Id -> (string)

The ID of the queue associated with the metrics returned.

Arn -> (string)

The Amazon Resource Name (ARN) of queue.

Channel -> (string)

The channel used for grouping and filters. Only VOICE is supported.

Collections -> (list)

The Collections for the CurrentMetricResult object.

(structure)

A CurrentMetricData object.

Metric -> (structure)

The metric in a CurrentMetricData object.

Name -> (string)

The name of the metric.

Unit -> (string)

The unit for the metric.

Value -> (double)

The value of the metric in the CurrentMetricData object.

DataSnapshotTime -> (timestamp)

The time at which CurrentMetricData was retrieved and cached for pagination.