1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetMetricDataV2`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`resource_arn(impl Into<String>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_resource_arn): <p>The Amazon Resource Name (ARN) of the resource. This includes the <code>instanceId</code> an Amazon Connect instance.</p>
    ///   - [`start_time(DateTime)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::start_time) / [`set_start_time(Option<DateTime>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_start_time): <p>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 before the end time timestamp. The time range between the start and end time must be less than 24 hours. The start time cannot be earlier than 35 days before the time of the request. Historical metrics are available for 35 days.</p>
    ///   - [`end_time(DateTime)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::end_time) / [`set_end_time(Option<DateTime>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_end_time): <p>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 later than the start time timestamp. It cannot be later than the current timestamp.</p>  <p>The time range between the start and end time must be less than 24 hours.</p>
    ///   - [`filters(FilterV2)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::filters) / [`set_filters(Option<Vec<FilterV2>>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_filters): <p>The filters to apply to returned metrics. You can filter on the following resources:</p>  <ul>   <li> <p>Queues</p> </li>   <li> <p>Routing profiles</p> </li>   <li> <p>Agents</p> </li>   <li> <p>Channels</p> </li>   <li> <p>User hierarchy groups</p> </li>   <li> <p>Feature</p> </li>  </ul>  <p>At least one filter must be passed from queues, routing profiles, agents, or user hierarchy groups.</p>  <p>To filter by phone number, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/create-historical-metrics-report.html">Create a historical metrics report</a> in the <i>Amazon Connect Administrator's Guide</i>.</p>  <p>Note the following limits:</p>  <ul>   <li> <p> <b>Filter keys</b>: A maximum of 5 filter keys are supported in a single request. Valid filter keys: <code>QUEUE</code> | <code>ROUTING_PROFILE</code> | <code>AGENT</code> | <code>CHANNEL</code> | <code>AGENT_HIERARCHY_LEVEL_ONE</code> | <code>AGENT_HIERARCHY_LEVEL_TWO</code> | <code>AGENT_HIERARCHY_LEVEL_THREE</code> | <code>AGENT_HIERARCHY_LEVEL_FOUR</code> | <code>AGENT_HIERARCHY_LEVEL_FIVE</code> | <code>FEATURE</code> </p> </li>   <li> <p> <b>Filter values</b>: A maximum of 100 filter values are supported in a single request. VOICE, CHAT, and TASK are valid <code>filterValue</code> for the CHANNEL filter key. They do not count towards limitation of 100 filter values. For example, a GetMetricDataV2 request can filter by 50 queues, 35 agents, and 15 routing profiles for a total of 100 filter values, along with 3 channel filters. </p> <p> <code>contact_lens_conversational_analytics</code> is a valid filterValue for the <code>FEATURE</code> filter key. It is available only to contacts analyzed by Contact Lens conversational analytics.</p> </li>  </ul>
    ///   - [`groupings(impl Into<String>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::groupings) / [`set_groupings(Option<Vec<String>>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_groupings): <p>The grouping applied to the metrics that are returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values that are returned apply to the metrics for each queue. They are not aggregated for all queues.</p>  <p>If no grouping is specified, a summary of all metrics is returned.</p>  <p>Valid grouping keys: <code>QUEUE</code> | <code>ROUTING_PROFILE</code> | <code>AGENT</code> | <code>CHANNEL</code> | <code>AGENT_HIERARCHY_LEVEL_ONE</code> | <code>AGENT_HIERARCHY_LEVEL_TWO</code> | <code>AGENT_HIERARCHY_LEVEL_THREE</code> | <code>AGENT_HIERARCHY_LEVEL_FOUR</code> | <code>AGENT_HIERARCHY_LEVEL_FIVE</code> </p>
    ///   - [`metrics(MetricV2)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::metrics) / [`set_metrics(Option<Vec<MetricV2>>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_metrics): <p>The metrics to retrieve. Specify the name, groupings, and filters for each metric. The following historical metrics are available. For a description of each metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html">Historical metrics definitions</a> in the <i>Amazon Connect Administrator's Guide</i>.</p>  <dl>   <dt>   AGENT_ADHERENT_TIME  </dt>   <dd>    <p>This metric is available only in Amazon Web Services Regions where <a href="https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region">Forecasting, capacity planning, and scheduling</a> is available.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy </p>   </dd>   <dt>   AGENT_NON_RESPONSE  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy </p>   </dd>   <dt>   AGENT_OCCUPANCY  </dt>   <dd>    <p>Unit: Percentage</p>    <p>Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy </p>   </dd>   <dt>   AGENT_SCHEDULE_ADHERENCE  </dt>   <dd>    <p>This metric is available only in Amazon Web Services Regions where <a href="https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region">Forecasting, capacity planning, and scheduling</a> is available.</p>    <p>Unit: Percent</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AGENT_SCHEDULED_TIME  </dt>   <dd>    <p>This metric is available only in Amazon Web Services Regions where <a href="https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region">Forecasting, capacity planning, and scheduling</a> is available.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_ABANDON_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_AFTER_CONTACT_WORK_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_AGENT_CONNECTING_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid metric filter key: <code>INITIATION_METHOD</code>. For now, this metric only supports the following as <code>INITIATION_METHOD</code>: <code>INBOUND</code> | <code>OUTBOUND</code> | <code>CALLBACK</code> | <code>API</code> </p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_AGENT_CONNECTING_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid metric filter key: <code>INITIATION_METHOD</code>. For now, this metric only supports the following as <code>INITIATION_METHOD</code>: <code>INBOUND</code> | <code>OUTBOUND</code> | <code>CALLBACK</code> | <code>API</code> </p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_CONTACT_DURATION  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_CONVERSATION_DURATION  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_GREETING_TIME_AGENT  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_HANDLE_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_HOLD_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_HOLDS  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_INTERACTION_AND_HOLD_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_INTERACTION_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_INTERRUPTIONS_AGENT  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_INTERRUPTION_TIME_AGENT  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_NON_TALK_TIME  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_QUEUE_ANSWER_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   AVG_TALK_TIME  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_TALK_TIME_AGENT  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   AVG_TALK_TIME_CUSTOMER  </dt>   <dd>    <p>This metric is available only for contacts analyzed by Contact Lens conversational analytics.</p>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   CONTACTS_ABANDONED  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   CONTACTS_CREATED  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid metric filter key: <code>INITIATION_METHOD</code> </p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   CONTACTS_HANDLED  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid metric filter key: <code>INITIATION_METHOD</code>, <code>DISCONNECT_REASON</code> </p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   CONTACTS_HOLD_ABANDONS  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   CONTACTS_QUEUED  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   CONTACTS_TRANSFERRED_OUT  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature</p> <note>     <p>Feature is a valid filter but not a valid grouping.</p>    </note>   </dd>   <dt>   CONTACTS_TRANSFERRED_OUT_BY_AGENT  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   CONTACTS_TRANSFERRED_OUT_FROM_QUEUE  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   MAX_QUEUED_TIME  </dt>   <dd>    <p>Unit: Seconds</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy</p>   </dd>   <dt>   SERVICE_LEVEL  </dt>   <dd>    <p>You can include up to 20 SERVICE_LEVEL metrics in a request.</p>    <p>Unit: Percent</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile</p>    <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than"). </p>   </dd>   <dt>   SUM_CONTACTS_ANSWERED_IN_X  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile</p>    <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than"). </p>   </dd>   <dt>   SUM_CONTACTS_ABANDONED_IN_X  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile</p>    <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than"). </p>   </dd>   <dt>   SUM_CONTACTS_DISCONNECTED   </dt>   <dd>    <p>Valid metric filter key: <code>DISCONNECT_REASON</code> </p>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile</p>   </dd>   <dt>   SUM_RETRY_CALLBACK_ATTEMPTS  </dt>   <dd>    <p>Unit: Count</p>    <p>Valid groupings and filters: Queue, Channel, Routing Profile</p>   </dd>  </dl>
    ///   - [`next_token(impl Into<String>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_next_token): <p>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.</p>
    ///   - [`max_results(i32)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::set_max_results): <p>The maximum number of results to return per page.</p>
    /// - On success, responds with [`GetMetricDataV2Output`](crate::operation::get_metric_data_v2::GetMetricDataV2Output) with field(s):
    ///   - [`next_token(Option<String>)`](crate::operation::get_metric_data_v2::GetMetricDataV2Output::next_token): <p>If there are additional results, this is the token for the next set of results.</p>
    ///   - [`metric_results(Option<Vec<MetricResultV2>>)`](crate::operation::get_metric_data_v2::GetMetricDataV2Output::metric_results): <p>Information about the metrics requested in the API request If no grouping is specified, a summary of metric data is returned. </p>
    /// - On failure, responds with [`SdkError<GetMetricDataV2Error>`](crate::operation::get_metric_data_v2::GetMetricDataV2Error)
    pub fn get_metric_data_v2(&self) -> crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder {
        crate::operation::get_metric_data_v2::builders::GetMetricDataV2FluentBuilder::new(self.handle.clone())
    }
}