public final class MetricTrigger extends Object
| Constructor and Description |
|---|
MetricTrigger() |
| Modifier and Type | Method and Description |
|---|---|
List<ScaleRuleMetricDimension> |
dimensions()
Get the dimensions property: List of dimension conditions.
|
String |
metricName()
Get the metricName property: the name of the metric that defines what the rule monitors.
|
String |
metricNamespace()
Get the metricNamespace property: the namespace of the metric that defines what the rule monitors.
|
String |
metricResourceUri()
Get the metricResourceUri property: the resource identifier of the resource the rule monitors.
|
ComparisonOperationType |
operator()
Get the operator property: the operator that is used to compare the metric data and the threshold.
|
MetricStatisticType |
statistic()
Get the statistic property: the metric statistic type.
|
double |
threshold()
Get the threshold property: the threshold of the metric that triggers the scale action.
|
TimeAggregationType |
timeAggregation()
Get the timeAggregation property: time aggregation type.
|
Duration |
timeGrain()
Get the timeGrain property: the granularity of metrics the rule monitors.
|
Duration |
timeWindow()
Get the timeWindow property: the range of time in which instance data is collected.
|
void |
validate()
Validates the instance.
|
MetricTrigger |
withDimensions(List<ScaleRuleMetricDimension> dimensions)
Set the dimensions property: List of dimension conditions.
|
MetricTrigger |
withMetricName(String metricName)
Set the metricName property: the name of the metric that defines what the rule monitors.
|
MetricTrigger |
withMetricNamespace(String metricNamespace)
Set the metricNamespace property: the namespace of the metric that defines what the rule monitors.
|
MetricTrigger |
withMetricResourceUri(String metricResourceUri)
Set the metricResourceUri property: the resource identifier of the resource the rule monitors.
|
MetricTrigger |
withOperator(ComparisonOperationType operator)
Set the operator property: the operator that is used to compare the metric data and the threshold.
|
MetricTrigger |
withStatistic(MetricStatisticType statistic)
Set the statistic property: the metric statistic type.
|
MetricTrigger |
withThreshold(double threshold)
Set the threshold property: the threshold of the metric that triggers the scale action.
|
MetricTrigger |
withTimeAggregation(TimeAggregationType timeAggregation)
Set the timeAggregation property: time aggregation type.
|
MetricTrigger |
withTimeGrain(Duration timeGrain)
Set the timeGrain property: the granularity of metrics the rule monitors.
|
MetricTrigger |
withTimeWindow(Duration timeWindow)
Set the timeWindow property: the range of time in which instance data is collected.
|
public String metricName()
public MetricTrigger withMetricName(String metricName)
metricName - the metricName value to set.public String metricNamespace()
public MetricTrigger withMetricNamespace(String metricNamespace)
metricNamespace - the metricNamespace value to set.public String metricResourceUri()
public MetricTrigger withMetricResourceUri(String metricResourceUri)
metricResourceUri - the metricResourceUri value to set.public Duration timeGrain()
public MetricTrigger withTimeGrain(Duration timeGrain)
timeGrain - the timeGrain value to set.public MetricStatisticType statistic()
public MetricTrigger withStatistic(MetricStatisticType statistic)
statistic - the statistic value to set.public Duration timeWindow()
public MetricTrigger withTimeWindow(Duration timeWindow)
timeWindow - the timeWindow value to set.public TimeAggregationType timeAggregation()
public MetricTrigger withTimeAggregation(TimeAggregationType timeAggregation)
timeAggregation - the timeAggregation value to set.public ComparisonOperationType operator()
public MetricTrigger withOperator(ComparisonOperationType operator)
operator - the operator value to set.public double threshold()
public MetricTrigger withThreshold(double threshold)
threshold - the threshold value to set.public List<ScaleRuleMetricDimension> dimensions()
public MetricTrigger withDimensions(List<ScaleRuleMetricDimension> dimensions)
dimensions - the dimensions value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.