Skip to content

/AWS1/CL_RSS=>UPDATESCHEDULEDACTION()

About UpdateScheduledAction

Updates a scheduled action.

Method Signature

IMPORTING

Required arguments:

iv_scheduledactionname TYPE /AWS1/RSSSCHEDULEDACTIONNAME /AWS1/RSSSCHEDULEDACTIONNAME

The name of the scheduled action to update to.

Optional arguments:

io_targetaction TYPE REF TO /AWS1/CL_RSSTARGETACTION /AWS1/CL_RSSTARGETACTION

targetAction

io_schedule TYPE REF TO /AWS1/CL_RSSSCHEDULE /AWS1/CL_RSSSCHEDULE

The schedule for a one-time (at timestamp format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour. Times are in UTC.

  • Format of at timestamp is yyyy-mm-ddThh:mm:ss. For example, 2016-03-04T17:27:00.

  • Format of cron expression is (Minutes Hours Day-of-month Month Day-of-week Year). For example, "(0 10 ? * MON *)". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide.

iv_rolearn TYPE /AWS1/RSSIAMROLEARN /AWS1/RSSIAMROLEARN

The ARN of the IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift Serverless API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler to schedule creating snapshots (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Management Guide

iv_enabled TYPE /AWS1/RSSBOOLEAN /AWS1/RSSBOOLEAN

Specifies whether to enable the scheduled action.

iv_scheduledactiondesc TYPE /AWS1/RSSSTRING /AWS1/RSSSTRING

The descripion of the scheduled action to update to.

iv_starttime TYPE /AWS1/RSSTIMESTAMP /AWS1/RSSTIMESTAMP

The start time in UTC of the scheduled action to update to.

iv_endtime TYPE /AWS1/RSSTIMESTAMP /AWS1/RSSTIMESTAMP

The end time in UTC of the scheduled action to update.

RETURNING

oo_output TYPE REF TO /aws1/cl_rssupdschddactionrsp /AWS1/CL_RSSUPDSCHDDACTIONRSP

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_rss~updatescheduledaction(
  io_schedule = new /aws1/cl_rssschedule(
    iv_at = '20150101000000.0000000'
    iv_cron = |string|
  )
  io_targetaction = new /aws1/cl_rsstargetaction(
    io_createsnapshot00 = new /aws1/cl_rsscresnapschactparms(
      it_tags = VALUE /aws1/cl_rsstag=>tt_taglist(
        (
          new /aws1/cl_rsstag(
            iv_key = |string|
            iv_value = |string|
          )
        )
      )
      iv_namespacename = |string|
      iv_retentionperiod = 123
      iv_snapshotnameprefix = |string|
    )
  )
  iv_enabled = ABAP_TRUE
  iv_endtime = '20150101000000.0000000'
  iv_rolearn = |string|
  iv_scheduledactiondesc = |string|
  iv_scheduledactionname = |string|
  iv_starttime = '20150101000000.0000000'
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_scheduledactionresponse = lo_result->get_scheduledaction( ).
  IF lo_scheduledactionresponse IS NOT INITIAL.
    lv_scheduledactionname = lo_scheduledactionresponse->get_scheduledactionname( ).
    lo_schedule = lo_scheduledactionresponse->get_schedule( ).
    IF lo_schedule IS NOT INITIAL.
      lv_timestamp = lo_schedule->get_at( ).
      lv_string = lo_schedule->get_cron( ).
    ENDIF.
    lv_string = lo_scheduledactionresponse->get_scheduledactiondesc( ).
    LOOP AT lo_scheduledactionresponse->get_nextinvocations( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_timestamp = lo_row_1->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_iamrolearn = lo_scheduledactionresponse->get_rolearn( ).
    lv_state = lo_scheduledactionresponse->get_state( ).
    lv_timestamp = lo_scheduledactionresponse->get_starttime( ).
    lv_timestamp = lo_scheduledactionresponse->get_endtime( ).
    lo_targetaction = lo_scheduledactionresponse->get_targetaction( ).
    IF lo_targetaction IS NOT INITIAL.
      lo_createsnapshotschedulea = lo_targetaction->get_createsnapshot00( ).
      IF lo_createsnapshotschedulea IS NOT INITIAL.
        lv_namespacename = lo_createsnapshotschedulea->get_namespacename( ).
        lv_snapshotnameprefix = lo_createsnapshotschedulea->get_snapshotnameprefix( ).
        lv_integer = lo_createsnapshotschedulea->get_retentionperiod( ).
        LOOP AT lo_createsnapshotschedulea->get_tags( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_tagkey = lo_row_3->get_key( ).
            lv_tagvalue = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
    lv_namespacename = lo_scheduledactionresponse->get_namespacename( ).
    lv_string = lo_scheduledactionresponse->get_scheduledactionuuid( ).
  ENDIF.
ENDIF.