Connect / Client / describe_metric
describe_metric¶
- Connect.Client.describe_metric(**kwargs)¶
Retrieves the full definition of an existing metric from the specified Connect Customer instance.
See also: AWS API Documentation
Request Syntax
response = client.describe_metric( InstanceId='string', MetricId='string' )
- Parameters:
InstanceId (string) –
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
MetricId (string) –
[REQUIRED]
The identifier of the metric to describe. Adding the
$SAVEDqualifier will describe the saved version of the metric. Adding$LATESTor omitting a qualifier will describe the published version.
- Return type:
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
$SAVEDor$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 withMetricId.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.Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
ConnectUserArn,AWSIdentityArn. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
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
ConnectUserArnis 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.Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
ConnectUserArn,AWSIdentityArn. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
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
ConnectUserArnis 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) –
Exceptions