/AWS1/IF_PRP=>UPDATESUBSCRIPTION()¶
About UpdateSubscription¶
Changes the plan tier of an existing subscription.
Upgrades take effect immediately. Downgrades are scheduled and the current tier remains unchanged until the end of the billing cycle (calendar month). You cannot update a subscription while a scheduled change is pending. To make a new change, first cancel the pending change using CancelSubscriptionChange.
This operation replaces the plan tier value. If you omit the optional usageLevel field, it is reset to the default.
Method Signature¶
METHODS /AWS1/IF_PRP~UPDATESUBSCRIPTION
IMPORTING
!IV_ARN TYPE /AWS1/PRPSUBSCRIPTIONARN OPTIONAL
!IV_PLANTIER TYPE /AWS1/PRPSTRING OPTIONAL
!IV_USAGELEVEL TYPE /AWS1/PRPSTRING OPTIONAL
!IV_IFMATCH TYPE /AWS1/PRPSTRING OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/PRPIDEMPOTENCYTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_prpupdatesubscroutput
RAISING
/AWS1/CX_PRPACCESSDENIEDEX
/AWS1/CX_PRPCONFLICTEXCEPTION
/AWS1/CX_PRPINTERNALSERVEREX
/AWS1/CX_PRPRESOURCENOTFOUNDEX
/AWS1/CX_PRPSERVICEQUOTAEXCDEX
/AWS1/CX_PRPTHROTTLINGEX
/AWS1/CX_PRPVLDTNEXCEPTION
/AWS1/CX_PRPCLIENTEXC
/AWS1/CX_PRPSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_arn TYPE /AWS1/PRPSUBSCRIPTIONARN /AWS1/PRPSUBSCRIPTIONARN¶
The ARN of the subscription to update.
iv_plantier TYPE /AWS1/PRPSTRING /AWS1/PRPSTRING¶
The new tier level for the subscription.
iv_ifmatch TYPE /AWS1/PRPSTRING /AWS1/PRPSTRING¶
The
ETagvalue from a previousGetSubscriptionorListSubscriptionsresponse. This ensures you are updating the expected version of the subscription.
Optional arguments:¶
iv_usagelevel TYPE /AWS1/PRPSTRING /AWS1/PRPSTRING¶
The usage level within the plan tier. Specify
DEFAULTfor the base configuration. If omitted, the usage level is reset to the default.
iv_clienttoken TYPE /AWS1/PRPIDEMPOTENCYTOKEN /AWS1/PRPIDEMPOTENCYTOKEN¶
A unique, case-sensitive identifier that you provide to ensure the request is handled only once.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_prpupdatesubscroutput /AWS1/CL_PRPUPDATESUBSCROUTPUT¶
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->updatesubscription(
iv_arn = |string|
iv_clienttoken = |string|
iv_ifmatch = |string|
iv_plantier = |string|
iv_usagelevel = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_subscription = lo_result->get_subscription( ).
IF lo_subscription IS NOT INITIAL.
lv_subscriptionarn = lo_subscription->get_arn( ).
lv_string = lo_subscription->get_planfamily( ).
lv_string = lo_subscription->get_plantier( ).
lv_string = lo_subscription->get_usagelevel( ).
lo_scheduledchange = lo_subscription->get_scheduledchange( ).
IF lo_scheduledchange IS NOT INITIAL.
lv_scheduledchangetype = lo_scheduledchange->get_changetype( ).
lv_timestamp = lo_scheduledchange->get_effectivedate( ).
lv_string = lo_scheduledchange->get_plantier( ).
lv_string = lo_scheduledchange->get_usagelevel( ).
ENDIF.
lv_status = lo_subscription->get_status( ).
lv_string = lo_subscription->get_statusreason( ).
LOOP AT lo_subscription->get_resourcearns( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_subscription->get_createdat( ).
lv_timestamp = lo_subscription->get_updatedat( ).
ENDIF.
lv_string = lo_result->get_etag( ).
ENDIF.
Update a subscription plan tier¶
Update a subscription plan tier
DATA(lo_result) = lo_client->updatesubscription(
iv_arn = |arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890|
iv_ifmatch = |1|
iv_plantier = |BUSINESS|
).