Class CfnMetric
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.connect.CfnMetric
- All Implemented Interfaces:
IInspectable,IMetricRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-02T11:03:06.934Z")
@Stability(Stable)
public class CfnMetric
extends CfnResource
implements IInspectable, IMetricRef, ITaggableV2
Resource Type definition for AWS::Connect::Metric, a custom metric configured for an Amazon Connect instance.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.connect.*;
CfnMetric cfnMetric = CfnMetric.Builder.create(this, "MyCfnMetric")
.instanceArn("instanceArn")
// the properties below are optional
.description("description")
.metricCalculation(MetricCalculationProperty.builder()
.calculation("calculation")
.calculationComponents(List.of(CalculationComponentProperty.builder()
.alias("alias")
// the properties below are optional
.metricFilters(List.of(MetricFilterProperty.builder()
.metricFilterKey("metricFilterKey")
// the properties below are optional
.booleanCondition(MetricFilterBooleanConditionProperty.builder()
.comparison("comparison")
.build())
.negate(false)
.numberCondition(MetricFilterNumberConditionProperty.builder()
.comparison("comparison")
.values(List.of(123))
.build())
.stringCondition(MetricFilterStringConditionProperty.builder()
.comparison("comparison")
.values(List.of("values"))
.build())
.build()))
.metricId("metricId")
.metricName("metricName")
.build()))
.build())
.name("name")
.positiveTrendIndicator("positiveTrendIndicator")
.status("status")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.unit("unit")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExample:static final classA fluent builder forCfnMetric.static interfaceExample:static interfaceExample:static interfaceThe calculation configuration for the metric.static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.connect.IMetricRef
IMetricRef.Jsii$Default, IMetricRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnMetric(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnMetric(software.amazon.jsii.JsiiObjectRef objRef) CfnMetric(software.constructs.Construct scope, String id, CfnMetricProps props) Create a newAWS::Connect::Metric. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForMetric(IMetricRef resource) The category of the custom metric.The timestamp where the metric was created.Whether the metric was built with the guided Service Level (SL) experience, or with the free-form metric builder.Earliest time that can be queried for this metric.List of filter types that may be used with this metric.List of groupings that may be used with this metric.The AWS region where the metric was last modified.The timestamp where the metric was last modified.The Amazon Resource Name (ARN) for the custom metric.Main provider of the document/row-level data for the metric;Identifies the timestamp used to place the metrics on a time-series;Recommended time to wait between each refresh of data for the metric.List of stat aggregations available for the metric.The metric may be used to compose other (custom) metrics.The metric may be used to compose other (custom) metrics, meaning it can be used inside of aggregate stat functions.Whether the metric is provided out-of-the-box or created by each customer.Tag Manager which manages the tags for this resource.The description of the custom metric.The identifier of the Amazon Connect instance.The calculation configuration for the metric.A reference to a Metric resource.getName()The name of the custom metric.Indicates how to classify a positive trend in metric data on the UI.The status of the custom metric.getTags()One or more tags.getUnit()Display unit for the metric data.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnMetric.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the custom metric.voidsetInstanceArn(String value) The identifier of the Amazon Connect instance.voidsetMetricCalculation(IResolvable value) The calculation configuration for the metric.voidThe calculation configuration for the metric.voidThe name of the custom metric.voidsetPositiveTrendIndicator(String value) Indicates how to classify a positive trend in metric data on the UI.voidThe status of the custom metric.voidOne or more tags.voidDisplay unit for the metric data.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, addResourceDependency, addResourceDependency, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, removeDependency, removeResourceDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnMetric
protected CfnMetric(software.amazon.jsii.JsiiObjectRef objRef) -
CfnMetric
protected CfnMetric(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnMetric
@Stability(Stable) public CfnMetric(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMetricProps props) Create a newAWS::Connect::Metric.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForMetric
- Parameters:
resource- This parameter is required.
-
isCfnMetric
Checks whether the given object is a CfnMetric.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCategory
The category of the custom metric. -
getAttrCreatedTime
The timestamp where the metric was created. -
getAttrCreatedUser
-
getAttrCreationMethod
Whether the metric was built with the guided Service Level (SL) experience, or with the free-form metric builder. -
getAttrEffectiveTime
Earliest time that can be queried for this metric. -
getAttrFilters
List of filter types that may be used with this metric. -
getAttrGroupings
List of groupings that may be used with this metric. -
getAttrLastModifiedRegion
The AWS region where the metric was last modified. -
getAttrLastModifiedTime
The timestamp where the metric was last modified. -
getAttrLastModifiedUser
-
getAttrMetricArn
The Amazon Resource Name (ARN) for the custom metric. -
getAttrPrimaryEventSource
Main provider of the document/row-level data for the metric;should match Data Lake table names
-
getAttrPrimaryEventSourceEffectiveTimestampType
Identifies the timestamp used to place the metrics on a time-series;should match public attribute name
-
getAttrRefreshRate
Recommended time to wait between each refresh of data for the metric. -
getAttrSupportedStats
List of stat aggregations available for the metric. -
getAttrSupportsCustomCalculation
The metric may be used to compose other (custom) metrics. -
getAttrSupportsPreaggregateCalculation
The metric may be used to compose other (custom) metrics, meaning it can be used inside of aggregate stat functions. -
getAttrType
Whether the metric is provided out-of-the-box or created by each customer. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getMetricRef
A reference to a Metric resource.- Specified by:
getMetricRefin interfaceIMetricRef
-
getInstanceArn
The identifier of the Amazon Connect instance. -
setInstanceArn
The identifier of the Amazon Connect instance. -
getDescription
The description of the custom metric. -
setDescription
The description of the custom metric. -
getMetricCalculation
The calculation configuration for the metric.Returns union: either
IResolvableorCfnMetric.MetricCalculationProperty -
setMetricCalculation
The calculation configuration for the metric. -
setMetricCalculation
@Stability(Stable) public void setMetricCalculation(@Nullable CfnMetric.MetricCalculationProperty value) The calculation configuration for the metric. -
getName
The name of the custom metric. -
setName
The name of the custom metric. -
getPositiveTrendIndicator
Indicates how to classify a positive trend in metric data on the UI. -
setPositiveTrendIndicator
Indicates how to classify a positive trend in metric data on the UI. -
getStatus
The status of the custom metric. -
setStatus
The status of the custom metric. -
getTags
One or more tags. -
setTags
One or more tags. -
getUnit
Display unit for the metric data. -
setUnit
Display unit for the metric data.
-