Skip to content

/AWS1/CL_NEP=>APPLYPENDINGMAINTENANCEACT()

About ApplyPendingMaintenanceAction

Applies a pending maintenance action to a resource (for example, to a DB instance).

Method Signature

IMPORTING

Required arguments:

iv_resourceidentifier TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see Constructing an Amazon Resource Name (ARN).

iv_applyaction TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The pending maintenance action to apply to this resource.

Valid values: system-update, db-upgrade

iv_optintype TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type immediate can't be undone.

Valid values:

  • immediate - Apply the maintenance action immediately.

  • next-maintenance - Apply the maintenance action during the next maintenance window for the resource.

  • undo-opt-in - Cancel any existing next-maintenance opt-in requests.

RETURNING

oo_output TYPE REF TO /aws1/cl_nepapplypendingmain01 /AWS1/CL_NEPAPPLYPENDINGMAIN01

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_nep~applypendingmaintenanceact(
  iv_applyaction = |string|
  iv_optintype = |string|
  iv_resourceidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_resourcependingmaintena = lo_result->get_resrcpendingmaintenanc00( ).
  IF lo_resourcependingmaintena IS NOT INITIAL.
    lv_string = lo_resourcependingmaintena->get_resourceidentifier( ).
    LOOP AT lo_resourcependingmaintena->get_pendingmaintenanceactd00( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_string = lo_row_1->get_action( ).
        lv_tstamp = lo_row_1->get_autoappliedafterdate( ).
        lv_tstamp = lo_row_1->get_forcedapplydate( ).
        lv_string = lo_row_1->get_optinstatus( ).
        lv_tstamp = lo_row_1->get_currentapplydate( ).
        lv_string = lo_row_1->get_description( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.