AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ExecutePolicy operation. Executes the specified policy.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.AutoScaling.AmazonAutoScalingRequest
      Amazon.AutoScaling.Model.ExecutePolicyRequest

Namespace: Amazon.AutoScaling.Model
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z

Syntax

C#
public class ExecutePolicyRequest : AmazonAutoScalingRequest
         IAmazonWebServiceRequest

The ExecutePolicyRequest type exposes the following members

Constructors

NameDescription
Public Method ExecutePolicyRequest()

Properties

NameTypeDescription
Public Property AutoScalingGroupName System.String

Gets and sets the property AutoScalingGroupName.

The name or Amazon Resource Name (ARN) of the Auto Scaling group.

Public Property BreachThreshold System.Double

Gets and sets the property BreachThreshold.

The breach threshold for the alarm.

This parameter is required if the policy type is StepScaling and not supported otherwise.

Public Property HonorCooldown System.Boolean

Gets and sets the property HonorCooldown.

If this parameter is true, Auto Scaling waits for the cooldown period to complete before executing the policy. Otherwise, Auto Scaling executes the policy without waiting for the cooldown period to complete.

This parameter is not supported if the policy type is StepScaling.

For more information, see Auto Scaling Cooldowns in the Auto Scaling User Guide.

Public Property MetricValue System.Double

Gets and sets the property 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.

This parameter is required if the policy type is StepScaling and not supported otherwise.

Public Property PolicyName System.String

Gets and sets the property PolicyName.

The name or ARN of the policy.

Examples

This example executes the specified Auto Scaling policy for the specified Auto Scaling group.

To execute an Auto Scaling policy


var response = client.ExecutePolicy(new ExecutePolicyRequest 
{
    AutoScalingGroupName = "my-auto-scaling-group",
    HonorCooldown = true,
    PolicyName = "ScaleIn"
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms