Skip to content

/AWS1/IF_ASC=>EXECUTEPOLICY()

About ExecutePolicy

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

Method Signature

IMPORTING

Required arguments:

iv_policyname TYPE /AWS1/ASCRESOURCENAME /AWS1/ASCRESOURCENAME

The name or ARN of the policy.

Optional arguments:

iv_autoscalinggroupname TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255

The name of the Auto Scaling group.

iv_honorcooldown TYPE /AWS1/ASCHONORCOOLDOWN /AWS1/ASCHONORCOOLDOWN

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.

iv_metricvalue TYPE /AWS1/RT_DOUBLE_AS_STRING /AWS1/RT_DOUBLE_AS_STRING

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.

iv_breachthreshold TYPE /AWS1/RT_DOUBLE_AS_STRING /AWS1/RT_DOUBLE_AS_STRING

The breach threshold for the alarm.

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

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

lo_client->/aws1/if_asc~executepolicy(
  iv_autoscalinggroupname = |string|
  iv_breachthreshold = |0.1|
  iv_honorcooldown = ABAP_TRUE
  iv_metricvalue = |0.1|
  iv_policyname = |string|
).

To execute a scaling policy

This example executes the specified policy.

lo_client->/aws1/if_asc~executepolicy(
  iv_autoscalinggroupname = |my-auto-scaling-group|
  iv_breachthreshold = |50.0|
  iv_metricvalue = |59.0|
  iv_policyname = |my-step-scale-out-policy|
).