Class CfnMetricFilter.DimensionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.logs.CfnMetricFilter.DimensionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMetricFilter.DimensionProperty>
- Enclosing interface:
CfnMetricFilter.DimensionProperty
@Stability(Stable)
public static final class CfnMetricFilter.DimensionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnMetricFilter.DimensionProperty>
A builder for
CfnMetricFilter.DimensionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnMetricFilter.DimensionProperty.getKey()Sets the value ofCfnMetricFilter.DimensionProperty.getValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
key
Sets the value ofCfnMetricFilter.DimensionProperty.getKey()- Parameters:
key- The name for the CloudWatch metric dimension that the metric filter creates. This parameter is required. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).- Returns:
this
-
value
Sets the value ofCfnMetricFilter.DimensionProperty.getValue()- Parameters:
value- The log event field that will contain the value for this dimension. This parameter is required. This dimension will only be published for a metric if the value is found in the log event. For example,$.eventTypefor JSON log events, or$serverfor space-delimited log events.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnMetricFilter.DimensionProperty>- Returns:
- a new instance of
CfnMetricFilter.DimensionProperty - Throws:
NullPointerException- if any required attribute was not provided
-