Class CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.rum.CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAppMonitorPropsMixin.MetricDefinitionProperty>
- Enclosing interface:
CfnAppMonitorPropsMixin.MetricDefinitionProperty
@Stability(Stable)
public static final class CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAppMonitorPropsMixin.MetricDefinitionProperty>
A builder for
CfnAppMonitorPropsMixin.MetricDefinitionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.dimensionKeys(Map<String, String> dimensionKeys) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getDimensionKeys()dimensionKeys(IResolvable dimensionKeys) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getDimensionKeys()eventPattern(String eventPattern) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getEventPattern()Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getName()Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getNamespace()Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getUnitLabel()Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getValueKey()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dimensionKeys
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder dimensionKeys(Map<String, String> dimensionKeys) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getDimensionKeys()- Parameters:
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 isCloudWatch. If the metric destination isEvidently, the value ofDimensionKeysis ignored.- Returns:
this
-
dimensionKeys
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder dimensionKeys(IResolvable dimensionKeys) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getDimensionKeys()- Parameters:
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 isCloudWatch. If the metric destination isEvidently, the value ofDimensionKeysis ignored.- Returns:
this
-
eventPattern
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder eventPattern(String eventPattern) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getEventPattern()- Parameters:
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
CloudWatchand the event also matches a value inDimensionKeys, then the metric is published with the specified dimensions.- Returns:
this
-
name
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder name(String name) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getName()- Parameters:
name- The name of the metric that is defined in this structure.- Returns:
this
-
namespace
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder namespace(String namespace) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getNamespace()- Parameters:
namespace- If you are creating a custom metric instead of an extended metrics, use this parameter to define the metric namespace for that custom metric. Do not specify this parameter if you are creating an extended metric.You can't use any string that starts with
AWS/for your namespace.- Returns:
this
-
unitLabel
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder unitLabel(String unitLabel) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getUnitLabel()- Parameters:
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.- Returns:
this
-
valueKey
@Stability(Stable) public CfnAppMonitorPropsMixin.MetricDefinitionProperty.Builder valueKey(String valueKey) Sets the value ofCfnAppMonitorPropsMixin.MetricDefinitionProperty.getValueKey()- Parameters:
valueKey- The field within the event object that the metric value is sourced from.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAppMonitorPropsMixin.MetricDefinitionProperty>- Returns:
- a new instance of
CfnAppMonitorPropsMixin.MetricDefinitionProperty - Throws:
NullPointerException- if any required attribute was not provided
-