Skip to content

/AWS1/IF_R5A=>STARTPLANEXECUTION()

About StartPlanExecution

Starts the execution of a Region switch plan. You can execute a plan in either PRACTICE or RECOVERY mode.

In PRACTICE mode, the execution simulates the steps without making actual changes to your application's traffic routing. In RECOVERY mode, the execution performs actual changes to shift traffic between Regions.

Method Signature

METHODS /AWS1/IF_R5A~STARTPLANEXECUTION
  IMPORTING
    !IV_PLANARN TYPE /AWS1/R5APLANARN OPTIONAL
    !IV_TARGETREGION TYPE /AWS1/R5ASTRING OPTIONAL
    !IV_ACTION TYPE /AWS1/R5AEXECUTIONACTION OPTIONAL
    !IV_MODE TYPE /AWS1/R5AEXECUTIONMODE OPTIONAL
    !IV_COMMENT TYPE /AWS1/R5AEXECUTIONCOMMENT OPTIONAL
    !IV_LATESTVERSION TYPE /AWS1/R5ASTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r5astartplanexecrsp
  RAISING
    /AWS1/CX_R5AACCESSDENIEDEX
    /AWS1/CX_R5AILLEGALARGUMENTEX
    /AWS1/CX_R5AILLEGALSTATEEX
    /AWS1/CX_R5ARESOURCENOTFOUNDEX
    /AWS1/CX_R5ACLIENTEXC
    /AWS1/CX_R5ASERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_planarn TYPE /AWS1/R5APLANARN /AWS1/R5APLANARN

The Amazon Resource Name (ARN) of the plan to execute.

iv_targetregion TYPE /AWS1/R5ASTRING /AWS1/R5ASTRING

The Amazon Web Services Region to target with this execution. This is the Region that traffic will be shifted to or from, depending on the action.

iv_action TYPE /AWS1/R5AEXECUTIONACTION /AWS1/R5AEXECUTIONACTION

The action to perform. Valid values are ACTIVATE (to shift traffic to the target Region) or DEACTIVATE (to shift traffic away from the target Region).

Optional arguments:

iv_mode TYPE /AWS1/R5AEXECUTIONMODE /AWS1/R5AEXECUTIONMODE

The plan execution mode. Valid values are Practice, for testing without making actual changes, or Recovery, for actual traffic shifting and application recovery.

iv_comment TYPE /AWS1/R5AEXECUTIONCOMMENT /AWS1/R5AEXECUTIONCOMMENT

An optional comment explaining why the plan execution is being started.

iv_latestversion TYPE /AWS1/R5ASTRING /AWS1/R5ASTRING

A boolean value indicating whether to use the latest version of the plan. If set to false, you must specify a specific version.

RETURNING

oo_output TYPE REF TO /aws1/cl_r5astartplanexecrsp /AWS1/CL_R5ASTARTPLANEXECRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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.

DATA(lo_result) = lo_client->startplanexecution(
  iv_action = |string|
  iv_comment = |string|
  iv_latestversion = |string|
  iv_mode = |string|
  iv_planarn = |string|
  iv_targetregion = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_executionid = lo_result->get_executionid( ).
  lv_planarn = lo_result->get_plan( ).
  lv_string = lo_result->get_planversion( ).
  lv_string = lo_result->get_activateregion( ).
  lv_string = lo_result->get_deactivateregion( ).
ENDIF.