/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Represents a CloudWatch metric of your choosing for a target tracking scaling
* policy to use with Application Auto Scaling. For information about the
* available metrics for a service, see Amazon
* Web Services services that publish CloudWatch metrics in the Amazon
* CloudWatch User Guide. To create your customized metric
* specification: Add values for each required parameter from
* CloudWatch. You can use an existing metric, or a new metric that you create. To
* use your own metric, you must first publish the metric to CloudWatch. For more
* information, see Publish
* custom metrics in the Amazon CloudWatch User Guide. Choose a metric that changes proportionally with capacity. The value of the
* metric should increase or decrease in inverse proportion to the number of
* capacity units. That is, the value of the metric should decrease when capacity
* increases, and increase when capacity decreases. For more
* information about the CloudWatch terminology below, see Amazon
* CloudWatch concepts in the Amazon CloudWatch User Guide.
*
See Also:
AWS
* API Reference
The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline CustomizedMetricSpecification& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline CustomizedMetricSpecification& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *The name of the metric. To get the exact metric name, namespace, and * dimensions, inspect the Metric * object that's returned by a call to ListMetrics.
*/ inline CustomizedMetricSpecification& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *The namespace of the metric.
*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *The namespace of the metric.
*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *The namespace of the metric.
*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *The namespace of the metric.
*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *The namespace of the metric.
*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *The namespace of the metric.
*/ inline CustomizedMetricSpecification& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *The namespace of the metric.
*/ inline CustomizedMetricSpecification& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *The namespace of the metric.
*/ inline CustomizedMetricSpecification& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *The dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline const Aws::VectorThe dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } /** *The dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline void SetDimensions(const Aws::VectorThe dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline void SetDimensions(Aws::VectorThe dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline CustomizedMetricSpecification& WithDimensions(const Aws::VectorThe dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline CustomizedMetricSpecification& WithDimensions(Aws::VectorThe dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline CustomizedMetricSpecification& AddDimensions(const MetricDimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; } /** *The dimensions of the metric.
Conditional: If you published your * metric with dimensions, you must specify the same dimensions in your scaling * policy.
*/ inline CustomizedMetricSpecification& AddDimensions(MetricDimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; } /** *The statistic of the metric.
*/ inline const MetricStatistic& GetStatistic() const{ return m_statistic; } /** *The statistic of the metric.
*/ inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; } /** *The statistic of the metric.
*/ inline void SetStatistic(const MetricStatistic& value) { m_statisticHasBeenSet = true; m_statistic = value; } /** *The statistic of the metric.
*/ inline void SetStatistic(MetricStatistic&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); } /** *The statistic of the metric.
*/ inline CustomizedMetricSpecification& WithStatistic(const MetricStatistic& value) { SetStatistic(value); return *this;} /** *The statistic of the metric.
*/ inline CustomizedMetricSpecification& WithStatistic(MetricStatistic&& value) { SetStatistic(std::move(value)); return *this;} /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline const Aws::String& GetUnit() const{ return m_unit; } /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline void SetUnit(const Aws::String& value) { m_unitHasBeenSet = true; m_unit = value; } /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline void SetUnit(Aws::String&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline void SetUnit(const char* value) { m_unitHasBeenSet = true; m_unit.assign(value); } /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline CustomizedMetricSpecification& WithUnit(const Aws::String& value) { SetUnit(value); return *this;} /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline CustomizedMetricSpecification& WithUnit(Aws::String&& value) { SetUnit(std::move(value)); return *this;} /** *The unit of the metric. For a complete list of the units that CloudWatch * supports, see the MetricDatum * data type in the Amazon CloudWatch API Reference.
*/ inline CustomizedMetricSpecification& WithUnit(const char* value) { SetUnit(value); return *this;} /** *The metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline const Aws::VectorThe metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *The metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline void SetMetrics(const Aws::VectorThe metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline void SetMetrics(Aws::VectorThe metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline CustomizedMetricSpecification& WithMetrics(const Aws::VectorThe metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline CustomizedMetricSpecification& WithMetrics(Aws::VectorThe metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline CustomizedMetricSpecification& AddMetrics(const TargetTrackingMetricDataQuery& value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; } /** *The metrics to include in the target tracking scaling policy, as a metric * data query. This can include both raw metric and metric math expressions.
*/ inline CustomizedMetricSpecification& AddMetrics(TargetTrackingMetricDataQuery&& value) { m_metricsHasBeenSet = true; m_metrics.push_back(std::move(value)); return *this; } private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::Vector