/AWS1/IF_EC2=>CRECAPRESERVATIONBYSPLITTING()¶
About CreateCapacityReservationBySplitting¶
Create a new Capacity Reservation by splitting the capacity of the source Capacity
Reservation. The new Capacity Reservation will have the same attributes as the source
Capacity Reservation except for tags. The source Capacity Reservation must be
active and owned by your Amazon Web Services account.
Method Signature¶
METHODS /AWS1/IF_EC2~CRECAPRESERVATIONBYSPLITTING
IMPORTING
!IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
!IV_SOURCECAPRESERVATIONID TYPE /AWS1/EC2CAPACITYRESERVATIONID OPTIONAL
!IV_INSTANCECOUNT TYPE /AWS1/EC2INTEGER OPTIONAL
!IT_TAGSPECIFICATIONS TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2crecapreservatio05
RAISING
/AWS1/CX_EC2CLIENTEXC
/AWS1/CX_EC2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_sourcecapreservationid TYPE /AWS1/EC2CAPACITYRESERVATIONID /AWS1/EC2CAPACITYRESERVATIONID¶
The ID of the Capacity Reservation from which you want to split the capacity.
iv_instancecount TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER¶
The number of instances to split from the source Capacity Reservation.
Optional arguments:¶
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 isUnauthorizedOperation.
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 new Capacity Reservation.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ec2crecapreservatio05 /AWS1/CL_EC2CRECAPRESERVATIO05¶
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->crecapreservationbysplitting(
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_clienttoken = |string|
iv_dryrun = ABAP_TRUE
iv_instancecount = 123
iv_sourcecapreservationid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_capacityreservation = lo_result->get_sourcecapreservation( ).
IF lo_capacityreservation IS NOT INITIAL.
lv_string = lo_capacityreservation->get_capacityreservationid( ).
lv_string = lo_capacityreservation->get_ownerid( ).
lv_string = lo_capacityreservation->get_capacityreservationarn( ).
lv_string = lo_capacityreservation->get_availabilityzoneid( ).
lv_string = lo_capacityreservation->get_instancetype( ).
lv_capacityreservationinst = lo_capacityreservation->get_instanceplatform( ).
lv_string = lo_capacityreservation->get_availabilityzone( ).
lv_capacityreservationtena = lo_capacityreservation->get_tenancy( ).
lv_integer = lo_capacityreservation->get_totalinstancecount( ).
lv_integer = lo_capacityreservation->get_availableinstancecount( ).
lv_boolean = lo_capacityreservation->get_ebsoptimized( ).
lv_boolean = lo_capacityreservation->get_ephemeralstorage( ).
lv_capacityreservationstat = lo_capacityreservation->get_state( ).
lv_milliseconddatetime = lo_capacityreservation->get_startdate( ).
lv_datetime = lo_capacityreservation->get_enddate( ).
lv_enddatetype = lo_capacityreservation->get_enddatetype( ).
lv_instancematchcriteria = lo_capacityreservation->get_instancematchcriteria( ).
lv_datetime = lo_capacityreservation->get_createdate( ).
LOOP AT lo_capacityreservation->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.
lv_outpostarn = lo_capacityreservation->get_outpostarn( ).
lv_string = lo_capacityreservation->get_capreservationfleetid( ).
lv_placementgrouparn = lo_capacityreservation->get_placementgrouparn( ).
LOOP AT lo_capacityreservation->get_capacityallocations( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_allocationtype = lo_row_3->get_allocationtype( ).
lv_integer = lo_row_3->get_count( ).
ENDIF.
ENDLOOP.
lv_capacityreservationtype = lo_capacityreservation->get_reservationtype( ).
lv_accountid = lo_capacityreservation->get_unusedreservationbllow00( ).
lo_capacityreservationcomm = lo_capacityreservation->get_commitmentinfo( ).
IF lo_capacityreservationcomm IS NOT INITIAL.
lv_integer = lo_capacityreservationcomm->get_committedinstancecount( ).
lv_milliseconddatetime = lo_capacityreservationcomm->get_commitmentenddate( ).
ENDIF.
lv_capacityreservationdeli = lo_capacityreservation->get_deliverypreference( ).
lv_capacityblockid = lo_capacityreservation->get_capacityblockid( ).
ENDIF.
lo_capacityreservation = lo_result->get_dstcapacityreservation( ).
IF lo_capacityreservation IS NOT INITIAL.
lv_string = lo_capacityreservation->get_capacityreservationid( ).
lv_string = lo_capacityreservation->get_ownerid( ).
lv_string = lo_capacityreservation->get_capacityreservationarn( ).
lv_string = lo_capacityreservation->get_availabilityzoneid( ).
lv_string = lo_capacityreservation->get_instancetype( ).
lv_capacityreservationinst = lo_capacityreservation->get_instanceplatform( ).
lv_string = lo_capacityreservation->get_availabilityzone( ).
lv_capacityreservationtena = lo_capacityreservation->get_tenancy( ).
lv_integer = lo_capacityreservation->get_totalinstancecount( ).
lv_integer = lo_capacityreservation->get_availableinstancecount( ).
lv_boolean = lo_capacityreservation->get_ebsoptimized( ).
lv_boolean = lo_capacityreservation->get_ephemeralstorage( ).
lv_capacityreservationstat = lo_capacityreservation->get_state( ).
lv_milliseconddatetime = lo_capacityreservation->get_startdate( ).
lv_datetime = lo_capacityreservation->get_enddate( ).
lv_enddatetype = lo_capacityreservation->get_enddatetype( ).
lv_instancematchcriteria = lo_capacityreservation->get_instancematchcriteria( ).
lv_datetime = lo_capacityreservation->get_createdate( ).
LOOP AT lo_capacityreservation->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.
lv_outpostarn = lo_capacityreservation->get_outpostarn( ).
lv_string = lo_capacityreservation->get_capreservationfleetid( ).
lv_placementgrouparn = lo_capacityreservation->get_placementgrouparn( ).
LOOP AT lo_capacityreservation->get_capacityallocations( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_allocationtype = lo_row_3->get_allocationtype( ).
lv_integer = lo_row_3->get_count( ).
ENDIF.
ENDLOOP.
lv_capacityreservationtype = lo_capacityreservation->get_reservationtype( ).
lv_accountid = lo_capacityreservation->get_unusedreservationbllow00( ).
lo_capacityreservationcomm = lo_capacityreservation->get_commitmentinfo( ).
IF lo_capacityreservationcomm IS NOT INITIAL.
lv_integer = lo_capacityreservationcomm->get_committedinstancecount( ).
lv_milliseconddatetime = lo_capacityreservationcomm->get_commitmentenddate( ).
ENDIF.
lv_capacityreservationdeli = lo_capacityreservation->get_deliverypreference( ).
lv_capacityblockid = lo_capacityreservation->get_capacityblockid( ).
ENDIF.
lv_integer = lo_result->get_instancecount( ).
ENDIF.