public static final class CfnAppMonitor.MetricDefinitionProperty.Builder
extends java.lang.Object
CfnAppMonitor.MetricDefinitionProperty
Constructor and Description |
---|
Builder() |
public CfnAppMonitor.MetricDefinitionProperty.Builder name(java.lang.String name)
CfnAppMonitor.MetricDefinitionProperty.getName()
name
- The name of the metric that is defined in this structure. This parameter is required.this
public CfnAppMonitor.MetricDefinitionProperty.Builder dimensionKeys(IResolvable dimensionKeys)
CfnAppMonitor.MetricDefinitionProperty.getDimensionKeys()
dimensionKeys
- This field is a map of field paths to dimension names.
It defines the dimensions to associate with this metric in CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the metric destination is Evidently
, the value of DimensionKeys
is ignored.this
public CfnAppMonitor.MetricDefinitionProperty.Builder dimensionKeys(java.util.Map<java.lang.String,java.lang.String> dimensionKeys)
CfnAppMonitor.MetricDefinitionProperty.getDimensionKeys()
dimensionKeys
- This field is a map of field paths to dimension names.
It defines the dimensions to associate with this metric in CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the metric destination is Evidently
, the value of DimensionKeys
is ignored.this
public CfnAppMonitor.MetricDefinitionProperty.Builder eventPattern(java.lang.String eventPattern)
CfnAppMonitor.MetricDefinitionProperty.getEventPattern()
eventPattern
- The pattern that defines the metric.
RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in DimensionKeys
, then the metric is published with the specified dimensions.
this
public CfnAppMonitor.MetricDefinitionProperty.Builder unitLabel(java.lang.String unitLabel)
CfnAppMonitor.MetricDefinitionProperty.getUnitLabel()
unitLabel
- Use this field only if you are sending this metric to CloudWatch .
It defines the CloudWatch metric unit that this metric is measured in.this
public CfnAppMonitor.MetricDefinitionProperty.Builder valueKey(java.lang.String valueKey)
CfnAppMonitor.MetricDefinitionProperty.getValueKey()
valueKey
- The field within the event object that the metric value is sourced from.this
public CfnAppMonitor.MetricDefinitionProperty build()
CfnAppMonitor.MetricDefinitionProperty
java.lang.NullPointerException
- if any required attribute was not provided