Class GetMetricDataRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<GetMetricDataRequest.Builder,GetMetricDataRequest>

@Generated("software.amazon.awssdk:codegen") public final class GetMetricDataRequest extends ConnectRequest implements ToCopyableBuilder<GetMetricDataRequest.Builder,GetMetricDataRequest>
  • Method Details

    • instanceId

      public final String instanceId()

      The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

      Returns:
      The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
    • startTime

      public final Instant startTime()

      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.

      Returns:
      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.

    • endTime

      public final Instant endTime()

      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.

      Returns:
      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.

    • filters

      public final Filters 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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

      To filter by Queues, enter the queue ID/ARN, not the name of the queue.

      Returns:
      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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

      To filter by Queues, enter the queue ID/ARN, not the name of the queue.

    • groupings

      public final List<Grouping> 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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasGroupings() method.

      Returns:
      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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

    • hasGroupings

      public final boolean hasGroupings()
      For responses, this returns true if the service returned a value for the Groupings property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • groupingsAsStrings

      public final List<String> groupingsAsStrings()

      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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasGroupings() method.

      Returns:
      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.

      RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.

    • hasHistoricalMetrics

      public final boolean hasHistoricalMetrics()
      For responses, this returns true if the service returned a value for the HistoricalMetrics property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • historicalMetrics

      public final List<HistoricalMetric> historicalMetrics()

      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 in the Amazon Connect Administrator Guide.

      This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list).

      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").

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasHistoricalMetrics() method.

      Returns:
      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 in the Amazon Connect Administrator Guide.

      This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list).

      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").

    • nextToken

      public final String nextToken()

      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.

      Returns:
      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.
    • maxResults

      public final Integer maxResults()

      The maximum number of results to return per page.

      Returns:
      The maximum number of results to return per page.
    • toBuilder

      public GetMetricDataRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<GetMetricDataRequest.Builder,GetMetricDataRequest>
      Specified by:
      toBuilder in class ConnectRequest
      Returns:
      a builder for type T
    • builder

      public static GetMetricDataRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends GetMetricDataRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      Parameters:
      fieldName - The name of the member to be retrieved.
      clazz - The class to cast the returned object to.
      Returns:
      Optional containing the casted return value
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.