Skip to content
v2.276.0

MetricDefinitionObjectProperty Struct ​

This structure defines a metric that you want to use to evaluate the variations during a launch or experiment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_evidently as evidently } from 'aws-cdk-lib';
const metricDefinitionObjectProperty: evidently.CfnLaunch.MetricDefinitionObjectProperty = {
  entityIdKey: 'entityIdKey',
  metricName: 'metricName',
  valueKey: 'valueKey',

  // the properties below are optional
  eventPattern: 'eventPattern',
  unitLabel: 'unitLabel',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_evidently as evidently

metric_definition_object_property = evidently.CfnLaunch.MetricDefinitionObjectProperty(
    entity_id_key="entityIdKey",
    metric_name="metricName",
    value_key="valueKey",

    # the properties below are optional
    event_pattern="eventPattern",
    unit_label="unitLabel"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.evidently.*;

MetricDefinitionObjectProperty metricDefinitionObjectProperty = MetricDefinitionObjectProperty.builder()
        .entityIdKey("entityIdKey")
        .metricName("metricName")
        .valueKey("valueKey")

        // the properties below are optional
        .eventPattern("eventPattern")
        .unitLabel("unitLabel")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Evidently;

var metricDefinitionObjectProperty = new MetricDefinitionObjectProperty {
    EntityIdKey = "entityIdKey",
    MetricName = "metricName",
    ValueKey = "valueKey",

    // the properties below are optional
    EventPattern = "eventPattern",
    UnitLabel = "unitLabel"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

metricDefinitionObjectProperty := &MetricDefinitionObjectProperty{
	EntityIdKey: jsii.String("entityIdKey"),
	MetricName: jsii.String("metricName"),
	ValueKey: jsii.String("valueKey"),

	// the properties below are optional
	EventPattern: jsii.String("eventPattern"),
	UnitLabel: jsii.String("unitLabel"),
}

Properties ​

entityIdKeystringentity_id_keystrentityIdKeyStringEntityIdKeystringEntityIdKey*stringrequired#
The entity, such as a user or session, that does an action that causes a metric value to be recorded.

An example is userDetails.userID .

eventPatternoptionalstringevent_patternoptionalstreventPatternoptionalStringEventPatternoptionalstringEventPatternoptional*string#
The EventBridge event pattern that defines how the metric is recorded.

For more information about EventBridge event patterns, see Amazon EventBridge event patterns .

metricNamestringmetric_namestrmetricNameStringMetricNamestringMetricName*stringrequired#
A name for the metric.

It can include up to 255 characters.

unitLabeloptionalstringunit_labeloptionalstrunitLabeloptionalStringUnitLabeloptionalstringUnitLabeloptional*string#
A label for the units that the metric is measuring.
valueKeystringvalue_keystrvalueKeyStringValueKeystringValueKey*stringrequired#
The value that is tracked to produce the metric.