/AWS1/IF_BUP=>GETBACKUPPLAN()¶
About GetBackupPlan¶
Returns BackupPlan details for the specified BackupPlanId. The
details are the body of a backup plan in JSON format, in addition to plan metadata.
Method Signature¶
METHODS /AWS1/IF_BUP~GETBACKUPPLAN
IMPORTING
!IV_BACKUPPLANID TYPE /AWS1/BUPSTRING OPTIONAL
!IV_VERSIONID TYPE /AWS1/BUPSTRING OPTIONAL
!IV_MAXSCHEDULEDRUNSPREVIEW TYPE /AWS1/BUPMAXSCHDDRUNSPREVIEW OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bupgetbackupplanout
RAISING
/AWS1/CX_BUPINVPARAMVALUEEX
/AWS1/CX_BUPMISSINGPARAMVALEX
/AWS1/CX_BUPRESOURCENOTFOUNDEX
/AWS1/CX_BUPSERVICEUNAVAILEX
/AWS1/CX_BUPCLIENTEXC
/AWS1/CX_BUPSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_backupplanid TYPE /AWS1/BUPSTRING /AWS1/BUPSTRING¶
Uniquely identifies a backup plan.
Optional arguments:¶
iv_versionid TYPE /AWS1/BUPSTRING /AWS1/BUPSTRING¶
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.
iv_maxscheduledrunspreview TYPE /AWS1/BUPMAXSCHDDRUNSPREVIEW /AWS1/BUPMAXSCHDDRUNSPREVIEW¶
Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bupgetbackupplanout /AWS1/CL_BUPGETBACKUPPLANOUT¶
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->getbackupplan(
iv_backupplanid = |string|
iv_maxscheduledrunspreview = 123
iv_versionid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_backupplan = lo_result->get_backupplan( ).
IF lo_backupplan IS NOT INITIAL.
lv_backupplanname = lo_backupplan->get_backupplanname( ).
LOOP AT lo_backupplan->get_rules( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_backuprulename = lo_row_1->get_rulename( ).
lv_backupvaultname = lo_row_1->get_targetbackupvaultname( ).
lv_arn = lo_row_1->get_tgtlogicallyairgappedb00( ).
lv_cronexpression = lo_row_1->get_scheduleexpression( ).
lv_windowminutes = lo_row_1->get_startwindowminutes( ).
lv_windowminutes = lo_row_1->get_completionwindowminutes( ).
lo_lifecycle = lo_row_1->get_lifecycle( ).
IF lo_lifecycle IS NOT INITIAL.
lv_long = lo_lifecycle->get_movetocoldstrgafterdays( ).
lv_long = lo_lifecycle->get_deleteafterdays( ).
lv_boolean = lo_lifecycle->get_optintoarchiveforsuppe00( ).
lv_lifecycledeleteaftereve = lo_lifecycle->get_deleteafterevent( ).
ENDIF.
LOOP AT lo_row_1->get_recoverypointtags( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_ruleid( ).
LOOP AT lo_row_1->get_copyactions( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lo_lifecycle = lo_row_4->get_lifecycle( ).
IF lo_lifecycle IS NOT INITIAL.
lv_long = lo_lifecycle->get_movetocoldstrgafterdays( ).
lv_long = lo_lifecycle->get_deleteafterdays( ).
lv_boolean = lo_lifecycle->get_optintoarchiveforsuppe00( ).
lv_lifecycledeleteaftereve = lo_lifecycle->get_deleteafterevent( ).
ENDIF.
lv_arn = lo_row_4->get_dstbackupvaultarn( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_row_1->get_enablecontinuousbackup( ).
lv_timezone = lo_row_1->get_schedulexprsntimezone( ).
LOOP AT lo_row_1->get_indexactions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
LOOP AT lo_row_6->get_resourcetypes( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_resourcetype = lo_row_8->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_scanactions( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_malwarescanner = lo_row_10->get_malwarescanner( ).
lv_scanmode = lo_row_10->get_scanmode( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_backupplan->get_advancedbackupsettings( ) into lo_row_11.
lo_row_12 = lo_row_11.
IF lo_row_12 IS NOT INITIAL.
lv_resourcetype = lo_row_12->get_resourcetype( ).
LOOP AT lo_row_12->get_backupoptions( ) into ls_row_13.
lv_key_1 = ls_row_13-key.
lo_value_1 = ls_row_13-value.
IF lo_value_1 IS NOT INITIAL.
lv_backupoptionvalue = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_backupplan->get_scansettings( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_malwarescanner = lo_row_15->get_malwarescanner( ).
LOOP AT lo_row_15->get_resourcetypes( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_resourcetype = lo_row_8->get_value( ).
ENDIF.
ENDLOOP.
lv_iamrolearn = lo_row_15->get_scannerrolearn( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_string = lo_result->get_backupplanid( ).
lv_arn = lo_result->get_backupplanarn( ).
lv_string = lo_result->get_versionid( ).
lv_string = lo_result->get_creatorrequestid( ).
lv_timestamp = lo_result->get_creationdate( ).
lv_timestamp = lo_result->get_deletiondate( ).
lv_timestamp = lo_result->get_lastexecutiondate( ).
LOOP AT lo_result->get_advancedbackupsettings( ) into lo_row_11.
lo_row_12 = lo_row_11.
IF lo_row_12 IS NOT INITIAL.
lv_resourcetype = lo_row_12->get_resourcetype( ).
LOOP AT lo_row_12->get_backupoptions( ) into ls_row_13.
lv_key_1 = ls_row_13-key.
lo_value_1 = ls_row_13-value.
IF lo_value_1 IS NOT INITIAL.
lv_backupoptionvalue = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_scheduledrunspreview( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_timestamp = lo_row_17->get_executiontime( ).
lv_string = lo_row_17->get_ruleid( ).
lv_ruleexecutiontype = lo_row_17->get_ruleexecutiontype( ).
ENDIF.
ENDLOOP.
ENDIF.