257 lines
15 KiB
C++
257 lines
15 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#pragma once
|
|
#include <aws/application-autoscaling/ApplicationAutoScaling_EXPORTS.h>
|
|
#include <aws/application-autoscaling/model/MetricType.h>
|
|
#include <aws/core/utils/memory/stl/AWSString.h>
|
|
#include <utility>
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Utils
|
|
{
|
|
namespace Json
|
|
{
|
|
class JsonValue;
|
|
class JsonView;
|
|
} // namespace Json
|
|
} // namespace Utils
|
|
namespace ApplicationAutoScaling
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
/**
|
|
* <p>Represents a predefined metric for a target tracking scaling policy to use
|
|
* with Application Auto Scaling.</p> <p>Only the AWS services that you're using
|
|
* send metrics to Amazon CloudWatch. To determine whether a desired metric already
|
|
* exists by looking up its namespace and dimension using the CloudWatch metrics
|
|
* dashboard in the console, follow the procedure in <a
|
|
* href="https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html">Building
|
|
* Dashboards with CloudWatch</a> in the <i>Application Auto Scaling User
|
|
* Guide</i>.</p><p><h3>See Also:</h3> <a
|
|
* href="http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PredefinedMetricSpecification">AWS
|
|
* API Reference</a></p>
|
|
*/
|
|
class AWS_APPLICATIONAUTOSCALING_API PredefinedMetricSpecification
|
|
{
|
|
public:
|
|
PredefinedMetricSpecification();
|
|
PredefinedMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
|
|
PredefinedMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
|
|
Aws::Utils::Json::JsonValue Jsonize() const;
|
|
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline const MetricType& GetPredefinedMetricType() const{ return m_predefinedMetricType; }
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline bool PredefinedMetricTypeHasBeenSet() const { return m_predefinedMetricTypeHasBeenSet; }
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline void SetPredefinedMetricType(const MetricType& value) { m_predefinedMetricTypeHasBeenSet = true; m_predefinedMetricType = value; }
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline void SetPredefinedMetricType(MetricType&& value) { m_predefinedMetricTypeHasBeenSet = true; m_predefinedMetricType = std::move(value); }
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline PredefinedMetricSpecification& WithPredefinedMetricType(const MetricType& value) { SetPredefinedMetricType(value); return *this;}
|
|
|
|
/**
|
|
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
|
|
* applies only to Spot Fleet requests and ECS services.</p>
|
|
*/
|
|
inline PredefinedMetricSpecification& WithPredefinedMetricType(MetricType&& value) { SetPredefinedMetricType(std::move(value)); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline const Aws::String& GetResourceLabel() const{ return m_resourceLabel; }
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline bool ResourceLabelHasBeenSet() const { return m_resourceLabelHasBeenSet; }
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline void SetResourceLabel(const Aws::String& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = value; }
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline void SetResourceLabel(Aws::String&& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = std::move(value); }
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline void SetResourceLabel(const char* value) { m_resourceLabelHasBeenSet = true; m_resourceLabel.assign(value); }
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline PredefinedMetricSpecification& WithResourceLabel(const Aws::String& value) { SetResourceLabel(value); return *this;}
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline PredefinedMetricSpecification& WithResourceLabel(Aws::String&& value) { SetResourceLabel(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>Identifies the resource associated with the metric type. You can't specify a
|
|
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
|
|
* and there is a target group attached to the Spot Fleet request or ECS
|
|
* service.</p> <p>Elastic Load Balancing sends data about your load balancers to
|
|
* Amazon CloudWatch. CloudWatch collects the data and specifies the format to use
|
|
* to access the data. The format is
|
|
* app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
|
|
* where:</p> <ul> <li> <p>app/<load-balancer-name>/<load-balancer-id>
|
|
* is the final portion of the load balancer ARN</p> </li> <li>
|
|
* <p>targetgroup/<target-group-name>/<target-group-id> is the final
|
|
* portion of the target group ARN.</p> </li> </ul> <p>To find the ARN for an
|
|
* Application Load Balancer, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html">DescribeLoadBalancers</a>
|
|
* API operation. To find the ARN for the target group, use the <a
|
|
* href="https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html">DescribeTargetGroups</a>
|
|
* API operation.</p>
|
|
*/
|
|
inline PredefinedMetricSpecification& WithResourceLabel(const char* value) { SetResourceLabel(value); return *this;}
|
|
|
|
private:
|
|
|
|
MetricType m_predefinedMetricType;
|
|
bool m_predefinedMetricTypeHasBeenSet;
|
|
|
|
Aws::String m_resourceLabel;
|
|
bool m_resourceLabelHasBeenSet;
|
|
};
|
|
|
|
} // namespace Model
|
|
} // namespace ApplicationAutoScaling
|
|
} // namespace Aws
|