/AWS1/IF_LMD=>UPDATECAPACITYPROVIDER()¶
About UpdateCapacityProvider¶
Updates the configuration of an existing capacity provider.
Method Signature¶
METHODS /AWS1/IF_LMD~UPDATECAPACITYPROVIDER
IMPORTING
!IV_CAPACITYPROVIDERNAME TYPE /AWS1/LMDCAPACITYPROVIDERNAME OPTIONAL
!IO_CAPACITYPVDRSCALINGCONFIG TYPE REF TO /AWS1/CL_LMDCAPPVDRSCACONFIG OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmdupdatecappvdrrsp
RAISING
/AWS1/CX_LMDINVPARAMVALUEEX
/AWS1/CX_LMDRESOURCECONFLICTEX
/AWS1/CX_LMDRESOURCENOTFOUNDEX
/AWS1/CX_LMDSERVICEEXCEPTION
/AWS1/CX_LMDTOOMANYREQUESTSEX
/AWS1/CX_LMDCLIENTEXC
/AWS1/CX_LMDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_capacityprovidername TYPE /AWS1/LMDCAPACITYPROVIDERNAME /AWS1/LMDCAPACITYPROVIDERNAME¶
The name of the capacity provider to update.
Optional arguments:¶
io_capacitypvdrscalingconfig TYPE REF TO /AWS1/CL_LMDCAPPVDRSCACONFIG /AWS1/CL_LMDCAPPVDRSCACONFIG¶
The updated scaling configuration for the capacity provider.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmdupdatecappvdrrsp /AWS1/CL_LMDUPDATECAPPVDRRSP¶
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->updatecapacityprovider(
io_capacitypvdrscalingconfig = new /aws1/cl_lmdcappvdrscaconfig(
it_scalingpolicies = VALUE /aws1/cl_lmdtargettrkscapolicy=>tt_capacitypvdrscalingpollist(
(
new /aws1/cl_lmdtargettrkscapolicy(
iv_predefinedmetrictype = |string|
iv_targetvalue = '0.1'
)
)
)
iv_maxvcpucount = 123
iv_scalingmode = |string|
)
iv_capacityprovidername = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_capacityprovider = lo_result->get_capacityprovider( ).
IF lo_capacityprovider IS NOT INITIAL.
lv_capacityproviderarn = lo_capacityprovider->get_capacityproviderarn( ).
lv_capacityproviderstate = lo_capacityprovider->get_state( ).
lo_capacityprovidervpcconf = lo_capacityprovider->get_vpcconfig( ).
IF lo_capacityprovidervpcconf IS NOT INITIAL.
LOOP AT lo_capacityprovidervpcconf->get_subnetids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_subnetid = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_capacityprovidervpcconf->get_securitygroupids( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_securitygroupid = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_capacityproviderpermiss = lo_capacityprovider->get_permissionsconfig( ).
IF lo_capacityproviderpermiss IS NOT INITIAL.
lv_rolearn = lo_capacityproviderpermiss->get_capacitypvdroprolearn( ).
ENDIF.
lo_instancerequirements = lo_capacityprovider->get_instancerequirements( ).
IF lo_instancerequirements IS NOT INITIAL.
LOOP AT lo_instancerequirements->get_architectures( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_architecture = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirements->get_allowedinstancetypes( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_instancetype = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirements->get_excludedinstancetypes( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_instancetype = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_capacityproviderscaling = lo_capacityprovider->get_cappvdrscalingconfig( ).
IF lo_capacityproviderscaling IS NOT INITIAL.
lv_capacityprovidermaxvcpu = lo_capacityproviderscaling->get_maxvcpucount( ).
lv_capacityproviderscaling_1 = lo_capacityproviderscaling->get_scalingmode( ).
LOOP AT lo_capacityproviderscaling->get_scalingpolicies( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_capacityproviderpredefi = lo_row_9->get_predefinedmetrictype( ).
lv_metrictargetvalue = lo_row_9->get_targetvalue( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_kmskeyarn = lo_capacityprovider->get_kmskeyarn( ).
lv_timestamp = lo_capacityprovider->get_lastmodified( ).
ENDIF.
ENDIF.