Amazon Connect Service

2026/08/11 - Amazon Connect Service - 7 new api methods

Changes  Seven new APIs for managing custom metrics, including create, describe, update, and delete. Using Custom Metrics, customers of Amazon Connect Customer can tailor analytics dashboards to their needs by applying custom thresholds, filters, and calculations to one or more out of the box measurements.

SearchMetrics (new) Link ¶

Searches for metrics in the specified Connect Customer instance using search criteria and optional tag-based filters. Use pagination to ensure that the operation returns quickly and successfully.

See also: AWS API Documentation

Request Syntax

client.search_metrics(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchFilter={
        'TagFilter': {
            'OrConditions': [
                [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
            ],
            'AndConditions': [
                {
                    'TagKey': 'string',
                    'TagValue': 'string'
                },
            ],
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    },
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        },
        'BooleanCondition': {
            'FieldName': 'string',
            'ComparisonType': 'IS_TRUE'|'IS_FALSE'
        }
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type NextToken:

string

param 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.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

type SearchFilter:

dict

param SearchFilter:

Filters to be applied to search results.

  • TagFilter (dict) --

    An object that can be used to specify tag conditions inside the SearchFilter. This accepts an OR of AND (List of List) input where:

    • The top level list specifies conditions that need to be applied with OR operator.

    • The inner list specifies conditions that need to be applied with AND operator.

    • OrConditions (list) --

      A list of conditions which would be applied together with an OR condition.

      • (list) --

        • (dict) --

          A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

          • TagKey (string) --

            The tag key in the tag condition.

          • TagValue (string) --

            The tag value in the tag condition.

    • AndConditions (list) --

      A list of conditions which would be applied together with an AND condition.

      • (dict) --

        A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

        • TagKey (string) --

          The tag key in the tag condition.

        • TagValue (string) --

          The tag value in the tag condition.

    • TagCondition (dict) --

      A leaf node condition which can be used to specify a tag condition.

      • TagKey (string) --

        The tag key in the tag condition.

      • TagValue (string) --

        The tag value in the tag condition.

type SearchCriteria:

dict

param SearchCriteria:

The search criteria to filter the metrics.

  • OrConditions (list) --

    A list of conditions to be met, where at least one condition must be satisfied.

    • (dict) --

      Defines the search criteria for filtering metrics.

  • AndConditions (list) --

    A list of conditions that must all be satisfied.

    • (dict) --

      Defines the search criteria for filtering metrics.

  • StringCondition (dict) --

    A leaf node condition which can be used to specify a string condition.

    • FieldName (string) --

      The name of the field in the string condition.

    • Value (string) --

      The value of the string.

    • ComparisonType (string) --

      The type of comparison to be made when evaluating the string condition.

  • BooleanCondition (dict) --

    A boolean search condition for Search APIs.

    • FieldName (string) --

      A name of the property to be searched.

    • ComparisonType (string) --

      Boolean property comparison type.

rtype:

dict

returns:

Response Syntax

{
    'Metrics': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Description': 'string',
            'MetricCalculation': {
                'CalculationComponents': [
                    {
                        'Alias': 'string',
                        'MetricName': 'string',
                        'MetricId': 'string',
                        'MetricFilters': [
                            {
                                'MetricFilterKey': 'string',
                                'Negate': True|False,
                                'NumberCondition': {
                                    'Comparison': 'LESSER'|'LESSER_OR_EQUAL'|'GREATER'|'GREATER_OR_EQUAL',
                                    'Values': [
                                        123.0,
                                    ]
                                },
                                'StringCondition': {
                                    'Comparison': 'MATCHES_ANY'|'MATCHES_NONE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'BooleanCondition': {
                                    'Comparison': 'IS_TRUE'|'IS_FALSE'
                                }
                            },
                        ]
                    },
                ],
                'Calculation': 'string'
            },
            'CreationMethod': 'SERVICE_LEVEL_BUILDER'|'METRIC_BUILDER',
            'Status': 'PUBLISHED'|'SAVED',
            'Type': 'AWS_MANAGED'|'CUSTOMER_MANAGED',
            'Unit': 'INTEGER'|'DOUBLE'|'PERCENT'|'SECONDS',
            'PositiveTrendIndicator': 'POSITIVE'|'NEGATIVE'|'NEUTRAL',
            'Groupings': [
                'string',
            ],
            'Filters': [
                {
                    'Id': 'string',
                    'Type': 'METRIC_LEVEL'|'RESOURCE_LEVEL'
                },
            ],
            'EffectiveTime': datetime(2015, 1, 1),
            'RefreshRate': 123,
            'Category': 'string',
            'SupportedStats': [
                'string',
            ],
            'DefaultStat': 'string',
            'SupportsPreaggregateCalculation': True|False,
            'SupportsCustomCalculation': True|False,
            'PrimaryEventSource': 'string',
            'PrimaryEventSourceEffectiveTimestampType': 'string',
            'CreatedTime': datetime(2015, 1, 1),
            'CreatedUser': {
                'ConnectUserArn': 'string',
                'AWSIdentityArn': 'string'
            },
            'LastModifiedRegion': 'string',
            'LastModifiedTime': datetime(2015, 1, 1),
            'LastModifiedUser': {
                'ConnectUserArn': 'string',
                'AWSIdentityArn': 'string'
            },
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • Metrics (list) --

      The metrics that matched the search criteria.

      • (dict) --

        Contains the full definition of a metric, including its calculation, unit, status, and trend indicator.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the metric. May be qualified with $SAVED or $LATEST.

        • Id (string) --

          The identifier of the metric.

        • Name (string) --

          The name of the metric.

        • Description (string) --

          The description of the metric.

        • MetricCalculation (dict) --

          The calculation definition for the metric.

          • CalculationComponents (list) --

            The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

            • (dict) --

              Represents a component metric referenced in a custom metric calculation formula.

              • Alias (string) --

                The alias used to reference this component in the calculation expression.

              • MetricName (string) --

                The name of an AWS-managed metric used in this calculation component (for example, CONTACTS_HANDLED). Mutually exclusive with MetricId.

              • MetricId (string) --

                The ARN of an AWS-managed metric used in this calculation component. Mutually exclusive with MetricName.

              • MetricFilters (list) --

                The filters applied to the calculation component.

                • (dict) --

                  A filter condition applied to a metric component in a calculation. Filters restrict the data included in the metric computation.

                  • MetricFilterKey (string) --

                    The key identifying the field to filter on.

                  • Negate (boolean) --

                    Specifies whether the filter condition is negated. When set to true, the filter excludes matching data instead of including it.

                  • NumberCondition (dict) --

                    A numeric comparison condition.

                    • Comparison (string) --

                      The comparison operator. Valid values: LESSER (less than) | LESSER_OR_EQUAL (less than or equal to) | GREATER (greater than) | GREATER_OR_EQUAL (greater than or equal to).

                    • Values (list) --

                      The numeric values to compare against.

                      • (float) --

                  • StringCondition (dict) --

                    A string comparison condition.

                    • Comparison (string) --

                      The comparison operator. Valid values: MATCHES_ANY (matches any of the specified values) | MATCHES_NONE (matches none of the specified values).

                    • Values (list) --

                      The string values to compare against.

                      • (string) --

                  • BooleanCondition (dict) --

                    A boolean comparison condition.

                    • Comparison (string) --

                      The comparison operator. Valid values: IS_TRUE (matches when the field is true) | IS_FALSE (matches when the field is false).

          • Calculation (string) --

            The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).

        • CreationMethod (string) --

          The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).

        • Status (string) --

          The publish status of the metric. Valid values: PUBLISHED | SAVED.

        • Type (string) --

          The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.

        • Unit (string) --

          The display unit for the metric's data.

        • PositiveTrendIndicator (string) --

          How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

        • Groupings (list) --

          The groupings available for this metric.

          • (string) --

        • Filters (list) --

          The filters applied to the metric.

          • (dict) --

            A filter that is available for use with the metric. Part of an AvailableFilterList that describes the filters that are available for use with the metric.

            • Id (string) --

              The identifier of the filter.

            • Type (string) --

              The type of the filter. Valid values: METRIC_LEVEL | RESOURCE_LEVEL.

        • EffectiveTime (datetime) --

          The earliest time that can be queried for this metric.

        • RefreshRate (integer) --

          The minimum interval, in seconds, between data refreshes for this metric.

        • Category (string) --

          The category of the metric.

        • SupportedStats (list) --

          The stat aggregations available for this metric.

          • (string) --

        • DefaultStat (string) --

          The default stat aggregation for the metric.

        • SupportsPreaggregateCalculation (boolean) --

          Specifies whether the metric can be used inside aggregating statistical functions (SUM, AVG, etc.) in custom metric calculations.

        • SupportsCustomCalculation (boolean) --

          Specifies whether the metric can be used as a component of custom metrics.

        • PrimaryEventSource (string) --

          The primary event source for the metric data.

        • PrimaryEventSourceEffectiveTimestampType (string) --

          The timestamp type that determines where the metric appears on a time series.

        • CreatedTime (datetime) --

          The timestamp of when the metric was created.

        • CreatedUser (dict) --

          The user that created the metric. The creator for metrics created through the CreateMetric API will be Amazon Connect API.

          • ConnectUserArn (string) --

            An agent ARN representing a connect user.

          • AWSIdentityArn (string) --

            STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ConnectUserArn is not provided.

        • LastModifiedRegion (string) --

          The region where the metric was last modified.

        • LastModifiedTime (datetime) --

          The timestamp of when the metric was last modified.

        • LastModifiedUser (dict) --

          The user that last modified the metric. For modifications made through the API, this will be Amazon Connect API.

          • ConnectUserArn (string) --

            An agent ARN representing a connect user.

          • AWSIdentityArn (string) --

            STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ConnectUserArn is not provided.

        • Tags (dict) --

          The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

          • (string) --

            • (string) --

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • ApproximateTotalCount (integer) --

      The approximate total number of metrics that matched your search criteria.

DeleteMetric (new) Link ¶

Deletes an existing metric from the specified Connect Customer instance. This operation fails with ResourceConflictException if the metric is currently in use in a dashboard.

See also: AWS API Documentation

Request Syntax

client.delete_metric(
    InstanceId='string',
    MetricId='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type MetricId:

string

param MetricId:

[REQUIRED]

The identifier of the metric to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateMetric (new) Link ¶

Creates a new metric definition for the specified Connect Customer instance. You can create custom metrics that use formulas referencing existing Amazon Web Services-managed metrics, optionally with filters applied.

See also: AWS API Documentation

Request Syntax

client.create_metric(
    InstanceId='string',
    Name='string',
    MetricCalculation={
        'CalculationComponents': [
            {
                'Alias': 'string',
                'MetricName': 'string',
                'MetricId': 'string',
                'MetricFilters': [
                    {
                        'MetricFilterKey': 'string',
                        'Negate': True|False,
                        'NumberCondition': {
                            'Comparison': 'LESSER'|'LESSER_OR_EQUAL'|'GREATER'|'GREATER_OR_EQUAL',
                            'Values': [
                                123.0,
                            ]
                        },
                        'StringCondition': {
                            'Comparison': 'MATCHES_ANY'|'MATCHES_NONE',
                            'Values': [
                                'string',
                            ]
                        },
                        'BooleanCondition': {
                            'Comparison': 'IS_TRUE'|'IS_FALSE'
                        }
                    },
                ]
            },
        ],
        'Calculation': 'string'
    },
    Unit='INTEGER'|'DOUBLE'|'PERCENT'|'SECONDS',
    Status='PUBLISHED'|'SAVED',
    ClientToken='string',
    Description='string',
    PositiveTrendIndicator='POSITIVE'|'NEGATIVE'|'NEUTRAL',
    Tags={
        'string': 'string'
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type Name:

string

param Name:

[REQUIRED]

The name of the metric.

type MetricCalculation:

dict

param MetricCalculation:

[REQUIRED]

The calculation definition for the metric, including the formula expression and the component metrics it references.

  • CalculationComponents (list) -- [REQUIRED]

    The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

    • (dict) --

      Represents a component metric referenced in a custom metric calculation formula.

      • Alias (string) -- [REQUIRED]

        The alias used to reference this component in the calculation expression.

      • MetricName (string) --

        The name of an AWS-managed metric used in this calculation component (for example, CONTACTS_HANDLED). Mutually exclusive with MetricId.

      • MetricId (string) --

        The ARN of an AWS-managed metric used in this calculation component. Mutually exclusive with MetricName.

      • MetricFilters (list) --

        The filters applied to the calculation component.

        • (dict) --

          A filter condition applied to a metric component in a calculation. Filters restrict the data included in the metric computation.

          • MetricFilterKey (string) -- [REQUIRED]

            The key identifying the field to filter on.

          • Negate (boolean) --

            Specifies whether the filter condition is negated. When set to true, the filter excludes matching data instead of including it.

          • NumberCondition (dict) --

            A numeric comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: LESSER (less than) | LESSER_OR_EQUAL (less than or equal to) | GREATER (greater than) | GREATER_OR_EQUAL (greater than or equal to).

            • Values (list) -- [REQUIRED]

              The numeric values to compare against.

              • (float) --

          • StringCondition (dict) --

            A string comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: MATCHES_ANY (matches any of the specified values) | MATCHES_NONE (matches none of the specified values).

            • Values (list) -- [REQUIRED]

              The string values to compare against.

              • (string) --

          • BooleanCondition (dict) --

            A boolean comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: IS_TRUE (matches when the field is true) | IS_FALSE (matches when the field is false).

  • Calculation (string) -- [REQUIRED]

    The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).

type Unit:

string

param Unit:

[REQUIRED]

The display unit for the metric's data.

type Status:

string

param Status:

The publish status of the metric. Set to PUBLISHED to make the metric available for use in dashboards and reports, or SAVED to keep it in draft state.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

This field is autopopulated if not provided.

type Description:

string

param Description:

The description of the metric.

type PositiveTrendIndicator:

string

param PositiveTrendIndicator:

How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

type Tags:

dict

param Tags:

The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'MetricArn': 'string',
    'MetricId': 'string'
}

Response Structure

  • (dict) --

    • MetricArn (string) --

      The Amazon Resource Name (ARN) of the metric.

    • MetricId (string) --

      The identifier of the metric.

ListMetrics (new) Link ¶

Retrieves a paginated list of metric summaries for the specified Connect Customer instance. Use pagination to ensure that the operation returns quickly and successfully.

See also: AWS API Documentation

Request Syntax

client.list_metrics(
    InstanceId='string',
    Type='AWS_MANAGED'|'CUSTOMER_MANAGED',
    MaxResults=123,
    NextToken='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type Type:

string

param Type:

The type of metrics to list. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

type NextToken:

string

param 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.

rtype:

dict

returns:

Response Syntax

{
    'MetricSummaryList': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Status': 'PUBLISHED'|'SAVED',
            'Type': 'AWS_MANAGED'|'CUSTOMER_MANAGED',
            'LastModifiedRegion': 'string',
            'LastModifiedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MetricSummaryList (list) --

      The list of metric summaries.

      • (dict) --

        Contains summary information about a metric.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the metric.

        • Id (string) --

          The identifier of the metric.

        • Name (string) --

          The name of the metric.

        • Status (string) --

          The publish status of the metric.

        • Type (string) --

          The type of the metric.

        • LastModifiedRegion (string) --

          The region where the metric was last modified.

        • LastModifiedTime (datetime) --

          The timestamp of when the metric was last modified.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

DescribeMetric (new) Link ¶

Retrieves the full definition of an existing metric from the specified Connect Customer instance.

See also: AWS API Documentation

Request Syntax

client.describe_metric(
    InstanceId='string',
    MetricId='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type MetricId:

string

param MetricId:

[REQUIRED]

The identifier of the metric to describe. Adding the $SAVED qualifier will describe the saved version of the metric. Adding $LATEST or omitting a qualifier will describe the published version.

rtype:

dict

returns:

Response Syntax

{
    'Metric': {
        'Arn': 'string',
        'Id': 'string',
        'Name': 'string',
        'Description': 'string',
        'MetricCalculation': {
            'CalculationComponents': [
                {
                    'Alias': 'string',
                    'MetricName': 'string',
                    'MetricId': 'string',
                    'MetricFilters': [
                        {
                            'MetricFilterKey': 'string',
                            'Negate': True|False,
                            'NumberCondition': {
                                'Comparison': 'LESSER'|'LESSER_OR_EQUAL'|'GREATER'|'GREATER_OR_EQUAL',
                                'Values': [
                                    123.0,
                                ]
                            },
                            'StringCondition': {
                                'Comparison': 'MATCHES_ANY'|'MATCHES_NONE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BooleanCondition': {
                                'Comparison': 'IS_TRUE'|'IS_FALSE'
                            }
                        },
                    ]
                },
            ],
            'Calculation': 'string'
        },
        'CreationMethod': 'SERVICE_LEVEL_BUILDER'|'METRIC_BUILDER',
        'Status': 'PUBLISHED'|'SAVED',
        'Type': 'AWS_MANAGED'|'CUSTOMER_MANAGED',
        'Unit': 'INTEGER'|'DOUBLE'|'PERCENT'|'SECONDS',
        'PositiveTrendIndicator': 'POSITIVE'|'NEGATIVE'|'NEUTRAL',
        'Groupings': [
            'string',
        ],
        'Filters': [
            {
                'Id': 'string',
                'Type': 'METRIC_LEVEL'|'RESOURCE_LEVEL'
            },
        ],
        'EffectiveTime': datetime(2015, 1, 1),
        'RefreshRate': 123,
        'Category': 'string',
        'SupportedStats': [
            'string',
        ],
        'DefaultStat': 'string',
        'SupportsPreaggregateCalculation': True|False,
        'SupportsCustomCalculation': True|False,
        'PrimaryEventSource': 'string',
        'PrimaryEventSourceEffectiveTimestampType': 'string',
        'CreatedTime': datetime(2015, 1, 1),
        'CreatedUser': {
            'ConnectUserArn': 'string',
            'AWSIdentityArn': 'string'
        },
        'LastModifiedRegion': 'string',
        'LastModifiedTime': datetime(2015, 1, 1),
        'LastModifiedUser': {
            'ConnectUserArn': 'string',
            'AWSIdentityArn': 'string'
        },
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Metric (dict) --

      The metric definition.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the metric. May be qualified with $SAVED or $LATEST.

      • Id (string) --

        The identifier of the metric.

      • Name (string) --

        The name of the metric.

      • Description (string) --

        The description of the metric.

      • MetricCalculation (dict) --

        The calculation definition for the metric.

        • CalculationComponents (list) --

          The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

          • (dict) --

            Represents a component metric referenced in a custom metric calculation formula.

            • Alias (string) --

              The alias used to reference this component in the calculation expression.

            • MetricName (string) --

              The name of an AWS-managed metric used in this calculation component (for example, CONTACTS_HANDLED). Mutually exclusive with MetricId.

            • MetricId (string) --

              The ARN of an AWS-managed metric used in this calculation component. Mutually exclusive with MetricName.

            • MetricFilters (list) --

              The filters applied to the calculation component.

              • (dict) --

                A filter condition applied to a metric component in a calculation. Filters restrict the data included in the metric computation.

                • MetricFilterKey (string) --

                  The key identifying the field to filter on.

                • Negate (boolean) --

                  Specifies whether the filter condition is negated. When set to true, the filter excludes matching data instead of including it.

                • NumberCondition (dict) --

                  A numeric comparison condition.

                  • Comparison (string) --

                    The comparison operator. Valid values: LESSER (less than) | LESSER_OR_EQUAL (less than or equal to) | GREATER (greater than) | GREATER_OR_EQUAL (greater than or equal to).

                  • Values (list) --

                    The numeric values to compare against.

                    • (float) --

                • StringCondition (dict) --

                  A string comparison condition.

                  • Comparison (string) --

                    The comparison operator. Valid values: MATCHES_ANY (matches any of the specified values) | MATCHES_NONE (matches none of the specified values).

                  • Values (list) --

                    The string values to compare against.

                    • (string) --

                • BooleanCondition (dict) --

                  A boolean comparison condition.

                  • Comparison (string) --

                    The comparison operator. Valid values: IS_TRUE (matches when the field is true) | IS_FALSE (matches when the field is false).

        • Calculation (string) --

          The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).

      • CreationMethod (string) --

        The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).

      • Status (string) --

        The publish status of the metric. Valid values: PUBLISHED | SAVED.

      • Type (string) --

        The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.

      • Unit (string) --

        The display unit for the metric's data.

      • PositiveTrendIndicator (string) --

        How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

      • Groupings (list) --

        The groupings available for this metric.

        • (string) --

      • Filters (list) --

        The filters applied to the metric.

        • (dict) --

          A filter that is available for use with the metric. Part of an AvailableFilterList that describes the filters that are available for use with the metric.

          • Id (string) --

            The identifier of the filter.

          • Type (string) --

            The type of the filter. Valid values: METRIC_LEVEL | RESOURCE_LEVEL.

      • EffectiveTime (datetime) --

        The earliest time that can be queried for this metric.

      • RefreshRate (integer) --

        The minimum interval, in seconds, between data refreshes for this metric.

      • Category (string) --

        The category of the metric.

      • SupportedStats (list) --

        The stat aggregations available for this metric.

        • (string) --

      • DefaultStat (string) --

        The default stat aggregation for the metric.

      • SupportsPreaggregateCalculation (boolean) --

        Specifies whether the metric can be used inside aggregating statistical functions (SUM, AVG, etc.) in custom metric calculations.

      • SupportsCustomCalculation (boolean) --

        Specifies whether the metric can be used as a component of custom metrics.

      • PrimaryEventSource (string) --

        The primary event source for the metric data.

      • PrimaryEventSourceEffectiveTimestampType (string) --

        The timestamp type that determines where the metric appears on a time series.

      • CreatedTime (datetime) --

        The timestamp of when the metric was created.

      • CreatedUser (dict) --

        The user that created the metric. The creator for metrics created through the CreateMetric API will be Amazon Connect API.

        • ConnectUserArn (string) --

          An agent ARN representing a connect user.

        • AWSIdentityArn (string) --

          STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ConnectUserArn is not provided.

      • LastModifiedRegion (string) --

        The region where the metric was last modified.

      • LastModifiedTime (datetime) --

        The timestamp of when the metric was last modified.

      • LastModifiedUser (dict) --

        The user that last modified the metric. For modifications made through the API, this will be Amazon Connect API.

        • ConnectUserArn (string) --

          An agent ARN representing a connect user.

        • AWSIdentityArn (string) --

          STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ConnectUserArn is not provided.

      • Tags (dict) --

        The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

        • (string) --

          • (string) --

UpdateMetricMetadata (new) Link ¶

Updates the name and/or description of an existing metric in the specified Connect Customer instance.

See also: AWS API Documentation

Request Syntax

client.update_metric_metadata(
    InstanceId='string',
    MetricId='string',
    Name='string',
    Description='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type MetricId:

string

param MetricId:

[REQUIRED]

The identifier of the metric to update. Adding the $SAVED qualifier will update the saved version of the metric. Adding $LATEST or omitting a qualifier will update the published version.

type Name:

string

param Name:

The updated name of the metric.

type Description:

string

param Description:

The updated description of the metric.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateMetricContent (new) Link ¶

Updates the calculation, unit, and/or trend indicator of an existing metric in the specified Connect Customer instance.

See also: AWS API Documentation

Request Syntax

client.update_metric_content(
    InstanceId='string',
    MetricId='string',
    MetricCalculation={
        'CalculationComponents': [
            {
                'Alias': 'string',
                'MetricName': 'string',
                'MetricId': 'string',
                'MetricFilters': [
                    {
                        'MetricFilterKey': 'string',
                        'Negate': True|False,
                        'NumberCondition': {
                            'Comparison': 'LESSER'|'LESSER_OR_EQUAL'|'GREATER'|'GREATER_OR_EQUAL',
                            'Values': [
                                123.0,
                            ]
                        },
                        'StringCondition': {
                            'Comparison': 'MATCHES_ANY'|'MATCHES_NONE',
                            'Values': [
                                'string',
                            ]
                        },
                        'BooleanCondition': {
                            'Comparison': 'IS_TRUE'|'IS_FALSE'
                        }
                    },
                ]
            },
        ],
        'Calculation': 'string'
    },
    Unit='INTEGER'|'DOUBLE'|'PERCENT'|'SECONDS',
    PositiveTrendIndicator='POSITIVE'|'NEGATIVE'|'NEUTRAL'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type MetricId:

string

param MetricId:

[REQUIRED]

The identifier of the metric to update. Adding the $SAVED qualifier will update the saved version of the metric. Adding $LATEST or omitting a qualifier will update the published version.

type MetricCalculation:

dict

param MetricCalculation:

The updated calculation definition for the metric.

  • CalculationComponents (list) -- [REQUIRED]

    The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

    • (dict) --

      Represents a component metric referenced in a custom metric calculation formula.

      • Alias (string) -- [REQUIRED]

        The alias used to reference this component in the calculation expression.

      • MetricName (string) --

        The name of an AWS-managed metric used in this calculation component (for example, CONTACTS_HANDLED). Mutually exclusive with MetricId.

      • MetricId (string) --

        The ARN of an AWS-managed metric used in this calculation component. Mutually exclusive with MetricName.

      • MetricFilters (list) --

        The filters applied to the calculation component.

        • (dict) --

          A filter condition applied to a metric component in a calculation. Filters restrict the data included in the metric computation.

          • MetricFilterKey (string) -- [REQUIRED]

            The key identifying the field to filter on.

          • Negate (boolean) --

            Specifies whether the filter condition is negated. When set to true, the filter excludes matching data instead of including it.

          • NumberCondition (dict) --

            A numeric comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: LESSER (less than) | LESSER_OR_EQUAL (less than or equal to) | GREATER (greater than) | GREATER_OR_EQUAL (greater than or equal to).

            • Values (list) -- [REQUIRED]

              The numeric values to compare against.

              • (float) --

          • StringCondition (dict) --

            A string comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: MATCHES_ANY (matches any of the specified values) | MATCHES_NONE (matches none of the specified values).

            • Values (list) -- [REQUIRED]

              The string values to compare against.

              • (string) --

          • BooleanCondition (dict) --

            A boolean comparison condition.

            • Comparison (string) -- [REQUIRED]

              The comparison operator. Valid values: IS_TRUE (matches when the field is true) | IS_FALSE (matches when the field is false).

  • Calculation (string) -- [REQUIRED]

    The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).

type Unit:

string

param Unit:

The updated display unit for the metric.

type PositiveTrendIndicator:

string

param PositiveTrendIndicator:

How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --