/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace AutoScaling { namespace Model { /** */ class ExecutePolicyRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API ExecutePolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ExecutePolicy"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the Auto Scaling group.

*/ inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; } /** *

The name of the Auto Scaling group.

*/ inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::move(value); } /** *

The name of the Auto Scaling group.

*/ inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); } /** *

The name of the Auto Scaling group.

*/ inline ExecutePolicyRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group.

*/ inline ExecutePolicyRequest& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;} /** *

The name of the Auto Scaling group.

*/ inline ExecutePolicyRequest& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;} /** *

The name or ARN of the policy.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name or ARN of the policy.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name or ARN of the policy.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name or ARN of the policy.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name or ARN of the policy.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name or ARN of the policy.

*/ inline ExecutePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name or ARN of the policy.

*/ inline ExecutePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name or ARN of the policy.

*/ inline ExecutePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to * complete before executing the policy.

Valid only if the policy type is * SimpleScaling. For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

*/ inline bool GetHonorCooldown() const{ return m_honorCooldown; } /** *

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to * complete before executing the policy.

Valid only if the policy type is * SimpleScaling. For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

*/ inline bool HonorCooldownHasBeenSet() const { return m_honorCooldownHasBeenSet; } /** *

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to * complete before executing the policy.

Valid only if the policy type is * SimpleScaling. For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

*/ inline void SetHonorCooldown(bool value) { m_honorCooldownHasBeenSet = true; m_honorCooldown = value; } /** *

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to * complete before executing the policy.

Valid only if the policy type is * SimpleScaling. For more information, see Scaling * cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User * Guide.

*/ inline ExecutePolicyRequest& WithHonorCooldown(bool value) { SetHonorCooldown(value); return *this;} /** *

The metric value to compare to BreachThreshold. This enables you * to execute a policy of type StepScaling and determine which step * adjustment to use. For example, if the breach threshold is 50 and you want to * use a step adjustment with a lower bound of 0 and an upper bound of 10, you can * set the metric value to 59.

If you specify a metric value that doesn't * correspond to a step adjustment for the policy, the call returns an error.

*

Required if the policy type is StepScaling and not supported * otherwise.

*/ inline double GetMetricValue() const{ return m_metricValue; } /** *

The metric value to compare to BreachThreshold. This enables you * to execute a policy of type StepScaling and determine which step * adjustment to use. For example, if the breach threshold is 50 and you want to * use a step adjustment with a lower bound of 0 and an upper bound of 10, you can * set the metric value to 59.

If you specify a metric value that doesn't * correspond to a step adjustment for the policy, the call returns an error.

*

Required if the policy type is StepScaling and not supported * otherwise.

*/ inline bool MetricValueHasBeenSet() const { return m_metricValueHasBeenSet; } /** *

The metric value to compare to BreachThreshold. This enables you * to execute a policy of type StepScaling and determine which step * adjustment to use. For example, if the breach threshold is 50 and you want to * use a step adjustment with a lower bound of 0 and an upper bound of 10, you can * set the metric value to 59.

If you specify a metric value that doesn't * correspond to a step adjustment for the policy, the call returns an error.

*

Required if the policy type is StepScaling and not supported * otherwise.

*/ inline void SetMetricValue(double value) { m_metricValueHasBeenSet = true; m_metricValue = value; } /** *

The metric value to compare to BreachThreshold. This enables you * to execute a policy of type StepScaling and determine which step * adjustment to use. For example, if the breach threshold is 50 and you want to * use a step adjustment with a lower bound of 0 and an upper bound of 10, you can * set the metric value to 59.

If you specify a metric value that doesn't * correspond to a step adjustment for the policy, the call returns an error.

*

Required if the policy type is StepScaling and not supported * otherwise.

*/ inline ExecutePolicyRequest& WithMetricValue(double value) { SetMetricValue(value); return *this;} /** *

The breach threshold for the alarm.

Required if the policy type is * StepScaling and not supported otherwise.

*/ inline double GetBreachThreshold() const{ return m_breachThreshold; } /** *

The breach threshold for the alarm.

Required if the policy type is * StepScaling and not supported otherwise.

*/ inline bool BreachThresholdHasBeenSet() const { return m_breachThresholdHasBeenSet; } /** *

The breach threshold for the alarm.

Required if the policy type is * StepScaling and not supported otherwise.

*/ inline void SetBreachThreshold(double value) { m_breachThresholdHasBeenSet = true; m_breachThreshold = value; } /** *

The breach threshold for the alarm.

Required if the policy type is * StepScaling and not supported otherwise.

*/ inline ExecutePolicyRequest& WithBreachThreshold(double value) { SetBreachThreshold(value); return *this;} private: Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; bool m_honorCooldown; bool m_honorCooldownHasBeenSet = false; double m_metricValue; bool m_metricValueHasBeenSet = false; double m_breachThreshold; bool m_breachThresholdHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws