@Generated(value="software.amazon.awssdk:codegen") public final class CustomizedLoadMetricSpecification extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CustomizedLoadMetricSpecification.Builder,CustomizedLoadMetricSpecification>
Represents a CloudWatch metric of your choosing that can be used for predictive scaling.
For predictive scaling to work with a customized load metric specification, AWS Auto Scaling needs access to the
Sum
and Average
statistics that CloudWatch computes from metric data. Statistics are
calculations used to aggregate data over specified time periods. For more information, see the Amazon CloudWatch User
Guide.
When you choose a load metric, make sure that the required Sum
and Average
statistics for
your metric are available in CloudWatch and that they provide relevant data for predictive scaling. The
Sum
statistic must represent the total load on the resource, and the Average
statistic must
represent the average load per capacity unit of the resource. For example, there is a metric that counts the number
of requests processed by your Auto Scaling group. If the Sum
statistic represents the total request
count processed by the group, then the Average
statistic for the specified metric must represent the
average request count processed by each instance of the group.
For information about terminology, see Amazon CloudWatch Concepts.
Modifier and Type | Class and Description |
---|---|
static interface |
CustomizedLoadMetricSpecification.Builder |
Modifier and Type | Method and Description |
---|---|
static CustomizedLoadMetricSpecification.Builder |
builder() |
List<MetricDimension> |
dimensions()
The dimensions of the metric.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
String |
metricName()
The name of the metric.
|
String |
namespace()
The namespace of the metric.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CustomizedLoadMetricSpecification.Builder> |
serializableBuilderClass() |
MetricStatistic |
statistic()
The statistic of the metric.
|
String |
statisticAsString()
The statistic of the metric.
|
CustomizedLoadMetricSpecification.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
String |
unit()
The unit of the metric.
|
copy
public String metricName()
The name of the metric.
public String namespace()
The namespace of the metric.
public List<MetricDimension> dimensions()
The dimensions of the metric.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public MetricStatistic statistic()
The statistic of the metric. Currently, the value must always be Sum
.
If the service returns an enum value that is not available in the current SDK version, statistic
will
return MetricStatistic.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statisticAsString()
.
Sum
.MetricStatistic
public String statisticAsString()
The statistic of the metric. Currently, the value must always be Sum
.
If the service returns an enum value that is not available in the current SDK version, statistic
will
return MetricStatistic.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statisticAsString()
.
Sum
.MetricStatistic
public String unit()
The unit of the metric.
public CustomizedLoadMetricSpecification.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<CustomizedLoadMetricSpecification.Builder,CustomizedLoadMetricSpecification>
public static CustomizedLoadMetricSpecification.Builder builder()
public static Class<? extends CustomizedLoadMetricSpecification.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.