Creates a new metric definition for the specified Connect Customer instance¶
Description¶
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.
Usage¶
connect_create_metric(InstanceId, Name, MetricCalculation, Unit, Status,
ClientToken, Description, PositiveTrendIndicator, Tags)
Arguments¶
-
InstanceId[required] The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
Name[required] The name of the metric.
-
MetricCalculation[required] The calculation definition for the metric, including the formula expression and the component metrics it references.
-
Unit[required] The display unit for the metric's data.
-
StatusThe publish status of the metric. Set to
PUBLISHEDto make the metric available for use in dashboards and reports, orSAVEDto keep it in draft state. -
ClientTokenA 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.
-
DescriptionThe description of the metric.
-
PositiveTrendIndicatorHow an increase in the metric value should be interpreted. Valid values:
POSITIVE,NEUTRAL,NEGATIVE. -
TagsThe tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Value¶
A list with the following syntax:
Request syntax¶
svc$create_metric(
InstanceId = "string",
Name = "string",
MetricCalculation = list(
CalculationComponents = list(
list(
Alias = "string",
MetricName = "string",
MetricId = "string",
MetricFilters = list(
list(
MetricFilterKey = "string",
Negate = TRUE|FALSE,
NumberCondition = list(
Comparison = "LESSER"|"LESSER_OR_EQUAL"|"GREATER"|"GREATER_OR_EQUAL",
Values = list(
123.0
)
),
StringCondition = list(
Comparison = "MATCHES_ANY"|"MATCHES_NONE",
Values = list(
"string"
)
),
BooleanCondition = list(
Comparison = "IS_TRUE"|"IS_FALSE"
)
)
)
)
),
Calculation = "string"
),
Unit = "INTEGER"|"DOUBLE"|"PERCENT"|"SECONDS",
Status = "PUBLISHED"|"SAVED",
ClientToken = "string",
Description = "string",
PositiveTrendIndicator = "POSITIVE"|"NEGATIVE"|"NEUTRAL",
Tags = list(
"string"
)
)