amazonka-autoscaling-2.0: Amazon Auto Scaling SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.AutoScaling.ExecutePolicy

Description

Executes the specified policy. This can be useful for testing the design of your scaling policy.

Synopsis

Creating a Request

data ExecutePolicy Source #

See: newExecutePolicy smart constructor.

Constructors

ExecutePolicy' 

Fields

  • autoScalingGroupName :: Maybe Text

    The name of the Auto Scaling group.

  • breachThreshold :: Maybe Double

    The breach threshold for the alarm.

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

  • honorCooldown :: Maybe Bool

    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.

  • metricValue :: Maybe Double

    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.

  • policyName :: Text

    The name or ARN of the policy.

Instances

Instances details
ToHeaders ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

ToPath ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

ToQuery ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

AWSRequest ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Associated Types

type AWSResponse ExecutePolicy #

Generic ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Associated Types

type Rep ExecutePolicy :: Type -> Type #

Read ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Show ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

NFData ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Methods

rnf :: ExecutePolicy -> () #

Eq ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Hashable ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

type AWSResponse ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

type Rep ExecutePolicy Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

type Rep ExecutePolicy = D1 ('MetaData "ExecutePolicy" "Amazonka.AutoScaling.ExecutePolicy" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "ExecutePolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "autoScalingGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "breachThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double))) :*: (S1 ('MetaSel ('Just "honorCooldown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "metricValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newExecutePolicy Source #

Create a value of ExecutePolicy with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ExecutePolicy, executePolicy_autoScalingGroupName - The name of the Auto Scaling group.

$sel:breachThreshold:ExecutePolicy', executePolicy_breachThreshold - The breach threshold for the alarm.

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

$sel:honorCooldown:ExecutePolicy', executePolicy_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.

$sel:metricValue:ExecutePolicy', executePolicy_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.

ExecutePolicy, executePolicy_policyName - The name or ARN of the policy.

Request Lenses

executePolicy_autoScalingGroupName :: Lens' ExecutePolicy (Maybe Text) Source #

The name of the Auto Scaling group.

executePolicy_breachThreshold :: Lens' ExecutePolicy (Maybe Double) Source #

The breach threshold for the alarm.

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

executePolicy_honorCooldown :: Lens' ExecutePolicy (Maybe Bool) Source #

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.

executePolicy_metricValue :: Lens' ExecutePolicy (Maybe Double) Source #

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.

executePolicy_policyName :: Lens' ExecutePolicy Text Source #

The name or ARN of the policy.

Destructuring the Response

data ExecutePolicyResponse Source #

See: newExecutePolicyResponse smart constructor.

Instances

Instances details
Generic ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Associated Types

type Rep ExecutePolicyResponse :: Type -> Type #

Read ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Show ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

NFData ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

Methods

rnf :: ExecutePolicyResponse -> () #

Eq ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

type Rep ExecutePolicyResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.ExecutePolicy

type Rep ExecutePolicyResponse = D1 ('MetaData "ExecutePolicyResponse" "Amazonka.AutoScaling.ExecutePolicy" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "ExecutePolicyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newExecutePolicyResponse :: ExecutePolicyResponse Source #

Create a value of ExecutePolicyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.