Skip to content

/AWS1/CL_R5A=>UPDATEPLAN()

About UpdatePlan

Updates an existing Region switch plan. You can modify the plan's description, workflows, execution role, recovery time objective, associated alarms, and triggers.

Method Signature

IMPORTING

Required arguments:

iv_arn TYPE /AWS1/R5APLANARN /AWS1/R5APLANARN

The Amazon Resource Name (ARN) of the plan.

it_workflows TYPE /AWS1/CL_R5AWORKFLOW=>TT_WORKFLOWLIST TT_WORKFLOWLIST

The updated workflows for the Region switch plan.

iv_executionrole TYPE /AWS1/R5AIAMROLEARN /AWS1/R5AIAMROLEARN

The updated IAM role ARN that grants Region switch the permissions needed to execute the plan steps.

Optional arguments:

iv_description TYPE /AWS1/R5ASTRING /AWS1/R5ASTRING

The updated description for the Region switch plan.

iv_rectimeobjectiveminutes TYPE /AWS1/R5AINTEGER /AWS1/R5AINTEGER

The updated target recovery time objective (RTO) in minutes for the plan.

it_associatedalarms TYPE /AWS1/CL_R5AASSOCIATEDALARM=>TT_ASSOCIATEDALARMMAP TT_ASSOCIATEDALARMMAP

The updated CloudWatch alarms associated with the plan.

it_triggers TYPE /AWS1/CL_R5ATRIGGER=>TT_TRIGGERLIST TT_TRIGGERLIST

The updated conditions that can automatically trigger the execution of the plan.

RETURNING

oo_output TYPE REF TO /aws1/cl_r5aupdateplanresponse /AWS1/CL_R5AUPDATEPLANRESPONSE

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->/aws1/if_r5a~updateplan(
  it_associatedalarms = VALUE /aws1/cl_r5aassociatedalarm=>tt_associatedalarmmap(
    (
      VALUE /aws1/cl_r5aassociatedalarm=>ts_associatedalarmmap_maprow(
        key = |string|
        value = new /aws1/cl_r5aassociatedalarm(
          iv_alarmtype = |string|
          iv_crossaccountrole = |string|
          iv_externalid = |string|
          iv_resourceidentifier = |string|
        )
      )
    )
  )
  it_triggers = VALUE /aws1/cl_r5atrigger=>tt_triggerlist(
    (
      new /aws1/cl_r5atrigger(
        it_conditions = VALUE /aws1/cl_r5atriggercondition=>tt_triggerconditionlist(
          (
            new /aws1/cl_r5atriggercondition(
              iv_associatedalarmname = |string|
              iv_condition = |string|
            )
          )
        )
        iv_action = |string|
        iv_description = |string|
        iv_mindelayminsbetweenexecs = 123
        iv_targetregion = |string|
      )
    )
  )
  it_workflows = VALUE /aws1/cl_r5aworkflow=>tt_workflowlist(
    (
      new /aws1/cl_r5aworkflow(
        it_steps = VALUE /aws1/cl_r5astep=>tt_steps(
          (
            new /aws1/cl_r5astep(
              io_executionblockconf = new /aws1/cl_r5aexecutionblockconf(
                io_arcroutingcontrolconfig = new /aws1/cl_r5aarcroutingctlconf(
                  it_regionandroutingcontrols = VALUE /aws1/cl_r5aarcroutingctlstate=>tt_regionandroutingcontrols(
                    (
                      VALUE /aws1/cl_r5aarcroutingctlstate=>ts_regionandroutingctls_maprow(
                        key = |string|
                        value = VALUE /aws1/cl_r5aarcroutingctlstate=>tt_arcroutingcontrolstates(
                          (
                            new /aws1/cl_r5aarcroutingctlstate(
                              iv_routingcontrolarn = |string|
                              iv_state = |string|
                            )
                          )
                        )
                      )
                    )
                  )
                  iv_crossaccountrole = |string|
                  iv_externalid = |string|
                  iv_timeoutminutes = 123
                )
                io_customactionlambdaconfig = new /aws1/cl_r5acustactlambdaconf(
                  io_ungraceful = new /aws1/cl_r5alambdaungraceful( |string| )
                  it_lambdas = VALUE /aws1/cl_r5alambdas=>tt_lambdalist(
                    (
                      new /aws1/cl_r5alambdas(
                        iv_arn = |string|
                        iv_crossaccountrole = |string|
                        iv_externalid = |string|
                      )
                    )
                  )
                  iv_regiontorun = |string|
                  iv_retryintervalminutes = '0.1'
                  iv_timeoutminutes = 123
                )
                io_ec2asgcapincreaseconfig = new /aws1/cl_r5aec2asgcapincconf(
                  io_ungraceful = new /aws1/cl_r5aec2ungraceful( 123 )
                  it_asgs = VALUE /aws1/cl_r5aasg=>tt_asglist(
                    (
                      new /aws1/cl_r5aasg(
                        iv_arn = |string|
                        iv_crossaccountrole = |string|
                        iv_externalid = |string|
                      )
                    )
                  )
                  iv_capacitymonapproach = |string|
                  iv_targetpercent = 123
                  iv_timeoutminutes = 123
                )
                io_ecscapacityincreaseconfig = new /aws1/cl_r5aecscapincreaseconf(
                  io_ungraceful = new /aws1/cl_r5aecsungraceful( 123 )
                  it_services = VALUE /aws1/cl_r5aservice=>tt_servicelist(
                    (
                      new /aws1/cl_r5aservice(
                        iv_clusterarn = |string|
                        iv_crossaccountrole = |string|
                        iv_externalid = |string|
                        iv_servicearn = |string|
                      )
                    )
                  )
                  iv_capacitymonapproach = |string|
                  iv_targetpercent = 123
                  iv_timeoutminutes = 123
                )
                io_eksresourcescalingconfig = new /aws1/cl_r5aeksresscalingconf(
                  io_kubernetesresourcetype = new /aws1/cl_r5ak8sresourcetype(
                    iv_apiversion = |string|
                    iv_kind = |string|
                  )
                  io_ungraceful = new /aws1/cl_r5aeksresscaungrcful( 123 )
                  it_eksclusters = VALUE /aws1/cl_r5aekscluster=>tt_eksclusters(
                    (
                      new /aws1/cl_r5aekscluster(
                        iv_clusterarn = |string|
                        iv_crossaccountrole = |string|
                        iv_externalid = |string|
                      )
                    )
                  )
                  it_scalingresources = VALUE /aws1/cl_r5ak8sscalingresource=>tt_kubernetesscalingapps(
                    (
                      VALUE /aws1/cl_r5ak8sscalingresource=>tt_kubernetesscalingapp(
                        (
                          VALUE /aws1/cl_r5ak8sscalingresource=>ts_kubernetesscalingapp_maprow(
                            key = |string|
                            value = VALUE /aws1/cl_r5ak8sscalingresource=>tt_regionalscalingresource(
                              (
                                VALUE /aws1/cl_r5ak8sscalingresource=>ts_regionalscalingres_maprow(
                                  key = |string|
                                  value = new /aws1/cl_r5ak8sscalingresource(
                                    iv_hpaname = |string|
                                    iv_name = |string|
                                    iv_namespace = |string|
                                  )
                                )
                              )
                            )
                          )
                        )
                      )
                    )
                  )
                  iv_capacitymonapproach = |string|
                  iv_targetpercent = 123
                  iv_timeoutminutes = 123
                )
                io_executionapprovalconfig = new /aws1/cl_r5aexecapprovalconf(
                  iv_approvalrole = |string|
                  iv_timeoutminutes = 123
                )
                io_globalauroraconfig = new /aws1/cl_r5aglobalauroraconf(
                  io_ungraceful = new /aws1/cl_r5aglbauroraungrcful( |string| )
                  it_databaseclusterarns = VALUE /aws1/cl_r5aauroraclustarns_w=>tt_auroraclusterarns(
                    ( new /aws1/cl_r5aauroraclustarns_w( |string| ) )
                  )
                  iv_behavior = |string|
                  iv_crossaccountrole = |string|
                  iv_externalid = |string|
                  iv_globalclusteridentifier = |string|
                  iv_timeoutminutes = 123
                )
                io_parallelconfig = new /aws1/cl_r5aparallelexeblkconf(
                  it_steps = VALUE /aws1/cl_r5astep=>tt_steps(
                  )
                )
                io_regionswitchplanconfig = new /aws1/cl_r5argnswitchplanconf(
                  iv_arn = |string|
                  iv_crossaccountrole = |string|
                  iv_externalid = |string|
                )
                io_route53healthcheckconfig = new /aws1/cl_r5aroute53hlthcheck00(
                  it_recordsets = VALUE /aws1/cl_r5aroute53resrecset=>tt_route53resrecordsetlist(
                    (
                      new /aws1/cl_r5aroute53resrecset(
                        iv_recordsetidentifier = |string|
                        iv_region = |string|
                      )
                    )
                  )
                  iv_crossaccountrole = |string|
                  iv_externalid = |string|
                  iv_hostedzoneid = |string|
                  iv_recordname = |string|
                  iv_timeoutminutes = 123
                )
              )
              iv_description = |string|
              iv_executionblocktype = |string|
              iv_name = |string|
            )
          )
        )
        iv_workflowdescription = |string|
        iv_workflowtargetaction = |string|
        iv_workflowtargetregion = |string|
      )
    )
  )
  iv_arn = |string|
  iv_description = |string|
  iv_executionrole = |string|
  iv_rectimeobjectiveminutes = 123
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_plan = lo_result->get_plan( ).
  IF lo_plan IS NOT INITIAL.
    lv_planarn = lo_plan->get_arn( ).
    lv_string = lo_plan->get_description( ).
    LOOP AT lo_plan->get_workflows( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        LOOP AT lo_row_1->get_steps( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_stepname = lo_row_3->get_name( ).
            lv_string = lo_row_3->get_description( ).
            lo_executionblockconfigura = lo_row_3->get_executionblockconf( ).
            IF lo_executionblockconfigura IS NOT INITIAL.
              lo_customactionlambdaconfi = lo_executionblockconfigura->get_customactionlambdaconfig( ).
              IF lo_customactionlambdaconfi IS NOT INITIAL.
                lv_integer = lo_customactionlambdaconfi->get_timeoutminutes( ).
                LOOP AT lo_customactionlambdaconfi->get_lambdas( ) into lo_row_4.
                  lo_row_5 = lo_row_4.
                  IF lo_row_5 IS NOT INITIAL.
                    lv_iamrolearn = lo_row_5->get_crossaccountrole( ).
                    lv_string = lo_row_5->get_externalid( ).
                    lv_lambdaarn = lo_row_5->get_arn( ).
                  ENDIF.
                ENDLOOP.
                lv_float = lo_customactionlambdaconfi->get_retryintervalminutes( ).
                lv_regiontorunin = lo_customactionlambdaconfi->get_regiontorun( ).
                lo_lambdaungraceful = lo_customactionlambdaconfi->get_ungraceful( ).
                IF lo_lambdaungraceful IS NOT INITIAL.
                  lv_lambdaungracefulbehavio = lo_lambdaungraceful->get_behavior( ).
                ENDIF.
              ENDIF.
              lo_ec2asgcapacityincreasec = lo_executionblockconfigura->get_ec2asgcapincreaseconfig( ).
              IF lo_ec2asgcapacityincreasec IS NOT INITIAL.
                lv_integer = lo_ec2asgcapacityincreasec->get_timeoutminutes( ).
                LOOP AT lo_ec2asgcapacityincreasec->get_asgs( ) into lo_row_6.
                  lo_row_7 = lo_row_6.
                  IF lo_row_7 IS NOT INITIAL.
                    lv_iamrolearn = lo_row_7->get_crossaccountrole( ).
                    lv_string = lo_row_7->get_externalid( ).
                    lv_asgarn = lo_row_7->get_arn( ).
                  ENDIF.
                ENDLOOP.
                lo_ec2ungraceful = lo_ec2asgcapacityincreasec->get_ungraceful( ).
                IF lo_ec2ungraceful IS NOT INITIAL.
                  lv_integer = lo_ec2ungraceful->get_minimumsuccesspercentage( ).
                ENDIF.
                lv_integer = lo_ec2asgcapacityincreasec->get_targetpercent( ).
                lv_ec2asgcapacitymonitorin = lo_ec2asgcapacityincreasec->get_capacitymonapproach( ).
              ENDIF.
              lo_executionapprovalconfig = lo_executionblockconfigura->get_executionapprovalconfig( ).
              IF lo_executionapprovalconfig IS NOT INITIAL.
                lv_integer = lo_executionapprovalconfig->get_timeoutminutes( ).
                lv_rolearn = lo_executionapprovalconfig->get_approvalrole( ).
              ENDIF.
              lo_arcroutingcontrolconfig = lo_executionblockconfigura->get_arcroutingcontrolconfig( ).
              IF lo_arcroutingcontrolconfig IS NOT INITIAL.
                lv_integer = lo_arcroutingcontrolconfig->get_timeoutminutes( ).
                lv_iamrolearn = lo_arcroutingcontrolconfig->get_crossaccountrole( ).
                lv_string = lo_arcroutingcontrolconfig->get_externalid( ).
                LOOP AT lo_arcroutingcontrolconfig->get_regionandroutingcontrols( ) into ls_row_8.
                  lv_key = ls_row_8-key.
                  LOOP AT ls_row_8-value into lo_row_9.
                    lo_row_10 = lo_row_9.
                    IF lo_row_10 IS NOT INITIAL.
                      lv_routingcontrolarn = lo_row_10->get_routingcontrolarn( ).
                      lv_routingcontrolstatechan = lo_row_10->get_state( ).
                    ENDIF.
                  ENDLOOP.
                ENDLOOP.
              ENDIF.
              lo_globalauroraconfigurati = lo_executionblockconfigura->get_globalauroraconfig( ).
              IF lo_globalauroraconfigurati IS NOT INITIAL.
                lv_integer = lo_globalauroraconfigurati->get_timeoutminutes( ).
                lv_iamrolearn = lo_globalauroraconfigurati->get_crossaccountrole( ).
                lv_string = lo_globalauroraconfigurati->get_externalid( ).
                lv_globalauroradefaultbeha = lo_globalauroraconfigurati->get_behavior( ).
                lo_globalauroraungraceful = lo_globalauroraconfigurati->get_ungraceful( ).
                IF lo_globalauroraungraceful IS NOT INITIAL.
                  lv_globalauroraungracefulb = lo_globalauroraungraceful->get_ungraceful( ).
                ENDIF.
                lv_globalclusteridentifier = lo_globalauroraconfigurati->get_globalclusteridentifier( ).
                LOOP AT lo_globalauroraconfigurati->get_databaseclusterarns( ) into lo_row_11.
                  lo_row_12 = lo_row_11.
                  IF lo_row_12 IS NOT INITIAL.
                    lv_auroraclusterarn = lo_row_12->get_value( ).
                  ENDIF.
                ENDLOOP.
              ENDIF.
              lo_parallelexecutionblockc = lo_executionblockconfigura->get_parallelconfig( ).
              IF lo_parallelexecutionblockc IS NOT INITIAL.
                LOOP AT lo_parallelexecutionblockc->get_steps( ) into lo_row_13.
                  lo_row_14 = lo_row_13.
                  IF lo_row_14 IS NOT INITIAL.
                    lv_stepname = lo_row_14->get_name( ).
                    lv_string = lo_row_14->get_description( ).
                    " Skipping lo_row_13 to avoid recursion
                    lv_executionblocktype = lo_row_14->get_executionblocktype( ).
                  ENDIF.
                ENDLOOP.
              ENDIF.
              lo_regionswitchplanconfigu = lo_executionblockconfigura->get_regionswitchplanconfig( ).
              IF lo_regionswitchplanconfigu IS NOT INITIAL.
                lv_iamrolearn = lo_regionswitchplanconfigu->get_crossaccountrole( ).
                lv_string = lo_regionswitchplanconfigu->get_externalid( ).
                lv_planarn = lo_regionswitchplanconfigu->get_arn( ).
              ENDIF.
              lo_ecscapacityincreaseconf = lo_executionblockconfigura->get_ecscapincreaseconfig( ).
              IF lo_ecscapacityincreaseconf IS NOT INITIAL.
                lv_integer = lo_ecscapacityincreaseconf->get_timeoutminutes( ).
                LOOP AT lo_ecscapacityincreaseconf->get_services( ) into lo_row_15.
                  lo_row_16 = lo_row_15.
                  IF lo_row_16 IS NOT INITIAL.
                    lv_iamrolearn = lo_row_16->get_crossaccountrole( ).
                    lv_string = lo_row_16->get_externalid( ).
                    lv_ecsclusterarn = lo_row_16->get_clusterarn( ).
                    lv_ecsservicearn = lo_row_16->get_servicearn( ).
                  ENDIF.
                ENDLOOP.
                lo_ecsungraceful = lo_ecscapacityincreaseconf->get_ungraceful( ).
                IF lo_ecsungraceful IS NOT INITIAL.
                  lv_integer = lo_ecsungraceful->get_minimumsuccesspercentage( ).
                ENDIF.
                lv_integer = lo_ecscapacityincreaseconf->get_targetpercent( ).
                lv_ecscapacitymonitoringap = lo_ecscapacityincreaseconf->get_capacitymonapproach( ).
              ENDIF.
              lo_eksresourcescalingconfi = lo_executionblockconfigura->get_eksresourcescalingconfig( ).
              IF lo_eksresourcescalingconfi IS NOT INITIAL.
                lv_integer = lo_eksresourcescalingconfi->get_timeoutminutes( ).
                lo_kubernetesresourcetype = lo_eksresourcescalingconfi->get_kubernetesresourcetype( ).
                IF lo_kubernetesresourcetype IS NOT INITIAL.
                  lv_string = lo_kubernetesresourcetype->get_apiversion( ).
                  lv_string = lo_kubernetesresourcetype->get_kind( ).
                ENDIF.
                LOOP AT lo_eksresourcescalingconfi->get_scalingresources( ) into lt_row_17.
                  LOOP AT lt_row_17 into ls_row_18.
                    lv_key = ls_row_18-key.
                    LOOP AT ls_row_18-value into ls_row_19.
                      lv_key_1 = ls_row_19-key.
                      lo_value = ls_row_19-value.
                      IF lo_value IS NOT INITIAL.
                        lv_kubernetesnamespace = lo_value->get_namespace( ).
                        lv_string = lo_value->get_name( ).
                        lv_string = lo_value->get_hpaname( ).
                      ENDIF.
                    ENDLOOP.
                  ENDLOOP.
                ENDLOOP.
                LOOP AT lo_eksresourcescalingconfi->get_eksclusters( ) into lo_row_20.
                  lo_row_21 = lo_row_20.
                  IF lo_row_21 IS NOT INITIAL.
                    lv_iamrolearn = lo_row_21->get_crossaccountrole( ).
                    lv_string = lo_row_21->get_externalid( ).
                    lv_eksclusterarn = lo_row_21->get_clusterarn( ).
                  ENDIF.
                ENDLOOP.
                lo_eksresourcescalingungra = lo_eksresourcescalingconfi->get_ungraceful( ).
                IF lo_eksresourcescalingungra IS NOT INITIAL.
                  lv_integer = lo_eksresourcescalingungra->get_minimumsuccesspercentage( ).
                ENDIF.
                lv_integer = lo_eksresourcescalingconfi->get_targetpercent( ).
                lv_ekscapacitymonitoringap = lo_eksresourcescalingconfi->get_capacitymonapproach( ).
              ENDIF.
              lo_route53healthcheckconfi = lo_executionblockconfigura->get_route53healthcheckconfig( ).
              IF lo_route53healthcheckconfi IS NOT INITIAL.
                lv_integer = lo_route53healthcheckconfi->get_timeoutminutes( ).
                lv_iamrolearn = lo_route53healthcheckconfi->get_crossaccountrole( ).
                lv_string = lo_route53healthcheckconfi->get_externalid( ).
                lv_route53hostedzoneid = lo_route53healthcheckconfi->get_hostedzoneid( ).
                lv_route53recordname = lo_route53healthcheckconfi->get_recordname( ).
                LOOP AT lo_route53healthcheckconfi->get_recordsets( ) into lo_row_22.
                  lo_row_23 = lo_row_22.
                  IF lo_row_23 IS NOT INITIAL.
                    lv_route53resourcerecordse = lo_row_23->get_recordsetidentifier( ).
                    lv_region = lo_row_23->get_region( ).
                  ENDIF.
                ENDLOOP.
              ENDIF.
            ENDIF.
            lv_executionblocktype = lo_row_3->get_executionblocktype( ).
          ENDIF.
        ENDLOOP.
        lv_workflowtargetaction = lo_row_1->get_workflowtargetaction( ).
        lv_region = lo_row_1->get_workflowtargetregion( ).
        lv_string = lo_row_1->get_workflowdescription( ).
      ENDIF.
    ENDLOOP.
    lv_iamrolearn = lo_plan->get_executionrole( ).
    lv_integer = lo_plan->get_rectimeobjectiveminutes( ).
    LOOP AT lo_plan->get_associatedalarms( ) into ls_row_24.
      lv_key = ls_row_24-key.
      lo_value_1 = ls_row_24-value.
      IF lo_value_1 IS NOT INITIAL.
        lv_iamrolearn = lo_value_1->get_crossaccountrole( ).
        lv_string = lo_value_1->get_externalid( ).
        lv_string = lo_value_1->get_resourceidentifier( ).
        lv_alarmtype = lo_value_1->get_alarmtype( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_plan->get_triggers( ) into lo_row_25.
      lo_row_26 = lo_row_25.
      IF lo_row_26 IS NOT INITIAL.
        lv_string = lo_row_26->get_description( ).
        lv_region = lo_row_26->get_targetregion( ).
        lv_workflowtargetaction = lo_row_26->get_action( ).
        LOOP AT lo_row_26->get_conditions( ) into lo_row_27.
          lo_row_28 = lo_row_27.
          IF lo_row_28 IS NOT INITIAL.
            lv_string = lo_row_28->get_associatedalarmname( ).
            lv_alarmcondition = lo_row_28->get_condition( ).
          ENDIF.
        ENDLOOP.
        lv_integer = lo_row_26->get_mindelayminsbetweenexecs( ).
      ENDIF.
    ENDLOOP.
    lv_planname = lo_plan->get_name( ).
    LOOP AT lo_plan->get_regions( ) into lo_row_29.
      lo_row_30 = lo_row_29.
      IF lo_row_30 IS NOT INITIAL.
        lv_region = lo_row_30->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_recoveryapproach = lo_plan->get_recoveryapproach( ).
    lv_region = lo_plan->get_primaryregion( ).
    lv_accountid = lo_plan->get_owner( ).
    lv_string = lo_plan->get_version( ).
    lv_timestamp = lo_plan->get_updatedat( ).
  ENDIF.
ENDIF.