Class CfnServiceLevelObjective.MetricDataQueryProperty.Builder
java.lang.Object
software.amazon.awscdk.services.applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnServiceLevelObjective.MetricDataQueryProperty>
- Enclosing interface:
CfnServiceLevelObjective.MetricDataQueryProperty
@Stability(Stable)
public static final class CfnServiceLevelObjective.MetricDataQueryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnServiceLevelObjective.MetricDataQueryProperty>
A builder for
CfnServiceLevelObjective.MetricDataQueryProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getAccountId()
build()
Builds the configured instance.expression
(String expression) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getExpression()
Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getId()
metricStat
(IResolvable metricStat) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getMetricStat()
Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getMetricStat()
returnData
(Boolean returnData) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getReturnData()
returnData
(IResolvable returnData) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getReturnData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getId()
- Parameters:
id
- A short name used to tie this object to the results in the response. This parameter is required. ThisId
must be unique within aMetricDataQueries
array. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the metric math expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.- Returns:
this
-
accountId
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder accountId(String accountId) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getAccountId()
- Parameters:
accountId
- The ID of the account where this metric is located. If you are performing this operation in a monitoring account, use this to specify which source account to retrieve this metric from.- Returns:
this
-
expression
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder expression(String expression) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getExpression()
- Parameters:
expression
- This field can contain a metric math expression to be performed on the other metrics that you are retrieving within thisMetricDataQueries
structure. A math expression can use theId
of the other metrics or queries to refer to those metrics, and can also use theId
of other expressions to use the result of those expressions. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide .Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
but not both.- Returns:
this
-
metricStat
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder metricStat(IResolvable metricStat) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getMetricStat()
- Parameters:
metricStat
- A metric to be used directly for the SLO, or to be used in the math expression that will be used for the SLO. Within oneMetricDataQuery
object, you must specify eitherExpression
orMetricStat
but not both.- Returns:
this
-
metricStat
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder metricStat(CfnServiceLevelObjective.MetricStatProperty metricStat) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getMetricStat()
- Parameters:
metricStat
- A metric to be used directly for the SLO, or to be used in the math expression that will be used for the SLO. Within oneMetricDataQuery
object, you must specify eitherExpression
orMetricStat
but not both.- Returns:
this
-
returnData
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder returnData(Boolean returnData) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getReturnData()
- Parameters:
returnData
- Use this only if you are using a metric math expression for the SLO. Specifytrue
forReturnData
for only the one expression result to use as the alarm. For all other metrics and expressions in the sameCreateServiceLevelObjective
operation, specifyReturnData
asfalse
.- Returns:
this
-
returnData
@Stability(Stable) public CfnServiceLevelObjective.MetricDataQueryProperty.Builder returnData(IResolvable returnData) Sets the value ofCfnServiceLevelObjective.MetricDataQueryProperty.getReturnData()
- Parameters:
returnData
- Use this only if you are using a metric math expression for the SLO. Specifytrue
forReturnData
for only the one expression result to use as the alarm. For all other metrics and expressions in the sameCreateServiceLevelObjective
operation, specifyReturnData
asfalse
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnServiceLevelObjective.MetricDataQueryProperty>
- Returns:
- a new instance of
CfnServiceLevelObjective.MetricDataQueryProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-