Class CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingMetricDataQueryProperty>
- Enclosing interface:
CfnScalingPolicy.TargetTrackingMetricDataQueryProperty
@Stability(Stable)
public static final class CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingMetricDataQueryProperty>
A builder for
CfnScalingPolicy.TargetTrackingMetricDataQueryProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.expression
(String expression) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getExpression()
Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getId()
Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getLabel()
metricStat
(IResolvable metricStat) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getMetricStat()
Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getMetricStat()
returnData
(Boolean returnData) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getReturnData()
returnData
(IResolvable returnData) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getReturnData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder id(String id) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getId()
- Parameters:
id
- A short name that identifies the object's results in the response. This parameter is required. This name must be unique among allTargetTrackingMetricDataQuery
objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.- Returns:
this
-
expression
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder expression(String expression) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getExpression()
- Parameters:
expression
- The math expression to perform on the returned data, if this object is performing a math expression. This expression can use theId
of the other metrics to refer to those metrics, and can also use theId
of other expressions to use the result of those expressions.Conditional: Within each
TargetTrackingMetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.- Returns:
this
-
label
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder label(String label) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getLabel()
- Parameters:
label
- A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.- Returns:
this
-
metricStat
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder metricStat(IResolvable metricStat) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getMetricStat()
- Parameters:
metricStat
- Information about the metric data to return. Conditional: Within eachTargetTrackingMetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.- Returns:
this
-
metricStat
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder metricStat(CfnScalingPolicy.TargetTrackingMetricStatProperty metricStat) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getMetricStat()
- Parameters:
metricStat
- Information about the metric data to return. Conditional: Within eachTargetTrackingMetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.- Returns:
this
-
returnData
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder returnData(Boolean returnData) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getReturnData()
- Parameters:
returnData
- Indicates whether to return the timestamps and raw data values of this metric. If you use any math expressions, specifytrue
for this value for only the final math expression that the metric specification is based on. You must specifyfalse
forReturnData
for all the other metrics and expressions used in the metric specification.If you are only retrieving metrics and not performing any math expressions, do not specify anything for
ReturnData
. This sets it to its default (true
).- Returns:
this
-
returnData
@Stability(Stable) public CfnScalingPolicy.TargetTrackingMetricDataQueryProperty.Builder returnData(IResolvable returnData) Sets the value ofCfnScalingPolicy.TargetTrackingMetricDataQueryProperty.getReturnData()
- Parameters:
returnData
- Indicates whether to return the timestamps and raw data values of this metric. If you use any math expressions, specifytrue
for this value for only the final math expression that the metric specification is based on. You must specifyfalse
forReturnData
for all the other metrics and expressions used in the metric specification.If you are only retrieving metrics and not performing any math expressions, do not specify anything for
ReturnData
. This sets it to its default (true
).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingMetricDataQueryProperty>
- Returns:
- a new instance of
CfnScalingPolicy.TargetTrackingMetricDataQueryProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-