Skip to content

/AWS1/IF_EC2=>CREATECAPRESVDATECHANGEQUOTE()

About CreateCapacityReservationDateChangeQuote

Generates a quote for changing the start date of a future-dated Capacity Reservation that has not yet been delivered. The quote includes the new start date, the resulting commitment end date, and a quote ID. Pass the quote ID to ModifyCapacityReservation to apply the change.

The cumulative pushout across all changes is limited to 30 days from the Capacity Reservation's original start date. Quotes are valid for 24 hours, and always expire at least one hour before the start date.

Method Signature

METHODS /AWS1/IF_EC2~CREATECAPRESVDATECHANGEQUOTE
  IMPORTING
    !IV_CAPACITYRESERVATIONID TYPE /AWS1/EC2CAPACITYRESERVATIONID OPTIONAL
    !IV_NEWSTARTDATE TYPE /AWS1/EC2MILLISECONDDATETIME OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
    !IT_TAGSPECIFICATIONS TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2crecaprsvdatchqt01
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_capacityreservationid TYPE /AWS1/EC2CAPACITYRESERVATIONID /AWS1/EC2CAPACITYRESERVATIONID

The ID of the Capacity Reservation.

iv_newstartdate TYPE /AWS1/EC2MILLISECONDDATETIME /AWS1/EC2MILLISECONDDATETIME

The requested new start date for the Capacity Reservation, in the ISO8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). The new start date must be later than the current start date and within the cumulative 30-day pushout limit.

Optional arguments:

iv_clienttoken TYPE /AWS1/EC2STRING /AWS1/EC2STRING

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.

it_tagspecifications TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST TT_TAGSPECIFICATIONLIST

The tags to apply to the date change quote.

iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2crecaprsvdatchqt01 /AWS1/CL_EC2CRECAPRSVDATCHQT01

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->createcapresvdatechangequote(
  it_tagspecifications = VALUE /aws1/cl_ec2tagspecification=>tt_tagspecificationlist(
    (
      new /aws1/cl_ec2tagspecification(
        it_tags = VALUE /aws1/cl_ec2tag=>tt_taglist(
          (
            new /aws1/cl_ec2tag(
              iv_key = |string|
              iv_value = |string|
            )
          )
        )
        iv_resourcetype = |string|
      )
    )
  )
  iv_capacityreservationid = |string|
  iv_clienttoken = |string|
  iv_dryrun = ABAP_TRUE
  iv_newstartdate = '20150101000000.0000000'
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_capacityreservationmodi = lo_result->get_capacityresvmodquote( ).
  IF lo_capacityreservationmodi IS NOT INITIAL.
    lv_capacityreservationmodi_1 = lo_capacityreservationmodi->get_capacityresvmodquoteid( ).
    lv_capacityreservationid = lo_capacityreservationmodi->get_capacityreservationid( ).
    lv_milliseconddatetime = lo_capacityreservationmodi->get_createtime( ).
    lv_milliseconddatetime = lo_capacityreservationmodi->get_expirationtime( ).
    lv_capacityreservationmodi_2 = lo_capacityreservationmodi->get_quotestate( ).
    lo_modificationquotecurren = lo_capacityreservationmodi->get_currentconfiguration( ).
    IF lo_modificationquotecurren IS NOT INITIAL.
      lv_integer = lo_modificationquotecurren->get_instancecount( ).
      lv_string = lo_modificationquotecurren->get_reservationstate( ).
      lv_milliseconddatetime = lo_modificationquotecurren->get_startdate( ).
      lv_milliseconddatetime = lo_modificationquotecurren->get_originalstartdate( ).
    ENDIF.
    lo_modificationterms = lo_capacityreservationmodi->get_modificationterms( ).
    IF lo_modificationterms IS NOT INITIAL.
      lo_modificationreservation = lo_modificationterms->get_reservationupdate( ).
      IF lo_modificationreservation IS NOT INITIAL.
        lv_milliseconddatetime = lo_modificationreservation->get_newcommitmentenddate( ).
        lv_milliseconddatetime = lo_modificationreservation->get_newstartdate( ).
        lv_boxedinteger = lo_modificationreservation->get_newcommitmentduration( ).
      ENDIF.
    ENDIF.
    LOOP AT lo_capacityreservationmodi->get_tags( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_string = lo_row_1->get_key( ).
        lv_string = lo_row_1->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.