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. This can be useful for testing the design of your scaling 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 of the Auto Scaling group.

Public Property BreachThreshold System.Double

Gets and sets the property BreachThreshold.

The breach threshold for the alarm.

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

Public Property HonorCooldown System.Boolean

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

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.

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 policy.

To execute a scaling policy


var client = new AmazonAutoScalingClient();
var response = client.ExecutePolicy(new ExecutePolicyRequest 
{
    AutoScalingGroupName = "my-auto-scaling-group",
    BreachThreshold = 50,
    MetricValue = 59,
    PolicyName = "my-step-scale-out-policy"
});


            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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