/AWS1/IF_ECS=>UPDATECAPACITYPROVIDER()
¶
About UpdateCapacityProvider¶
Modifies the parameters for a capacity provider.
These changes only apply to new Amazon ECS Managed Instances, or EC2 instances, not existing ones.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_name
TYPE /AWS1/ECSSTRING
/AWS1/ECSSTRING
¶
The name of the capacity provider to update.
Optional arguments:¶
iv_cluster
TYPE /AWS1/ECSSTRING
/AWS1/ECSSTRING
¶
The name of the cluster that contains the capacity provider to update. Managed instances capacity providers are cluster-scoped and can only be updated within their associated cluster.
io_autoscalinggroupprovider
TYPE REF TO /AWS1/CL_ECSAUTOSCGROUPPVDRUPD
/AWS1/CL_ECSAUTOSCGROUPPVDRUPD
¶
An object that represent the parameters to update for the Auto Scaling group capacity provider.
io_managedinstancesprovider
TYPE REF TO /AWS1/CL_ECSUPMANAGEDINSPVDR00
/AWS1/CL_ECSUPMANAGEDINSPVDR00
¶
The updated configuration for the Amazon ECS Managed Instances provider. You can modify the infrastructure role, instance launch template, and tag propagation settings. Changes take effect for new instances launched after the update.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_ecsupdatecappvdrrsp
/AWS1/CL_ECSUPDATECAPPVDRRSP
¶
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_autoscalinggroupprovider = new /aws1/cl_ecsautoscgrouppvdrupd(
io_managedscaling = new /aws1/cl_ecsmanagedscaling(
iv_instancewarmupperiod = 123
iv_maximumscalingstepsize = 123
iv_minimumscalingstepsize = 123
iv_status = |string|
iv_targetcapacity = 123
)
iv_manageddraining = |string|
iv_managedterminationprote00 = |string|
)
io_managedinstancesprovider = new /aws1/cl_ecsupmanagedinspvdr00(
io_instancelaunchtemplate = new /aws1/cl_ecsinstlaunchtmplupd(
io_instancerequirements = new /aws1/cl_ecsinstreqsrequest(
io_acceleratorcount = new /aws1/cl_ecsacceleratorcntreq(
iv_max = 123
iv_min = 123
)
io_acceleratortotalmemorymib = new /aws1/cl_ecsacceleratortotal00(
iv_max = 123
iv_min = 123
)
io_baselineebsbandwidthmbps = new /aws1/cl_ecsbaselineebsbandw00(
iv_max = 123
iv_min = 123
)
io_memorygibpervcpu = new /aws1/cl_ecsmemgibpervcpureq(
iv_max = '0.1'
iv_min = '0.1'
)
io_memorymib = new /aws1/cl_ecsmemorymibrequest(
iv_max = 123
iv_min = 123
)
io_networkbandwidthgbps = new /aws1/cl_ecsnetbandwidthgbps00(
iv_max = '0.1'
iv_min = '0.1'
)
io_networkinterfacecount = new /aws1/cl_ecsnetifacecountreq(
iv_max = 123
iv_min = 123
)
io_totallocalstoragegb = new /aws1/cl_ecstotallocalstrggb00(
iv_max = '0.1'
iv_min = '0.1'
)
io_vcpucount = new /aws1/cl_ecsvcpucountrangereq(
iv_max = 123
iv_min = 123
)
it_acceleratormanufacturers = VALUE /aws1/cl_ecsacceleratormanuf00=>tt_acceleratormanufacturerset(
( new /aws1/cl_ecsacceleratormanuf00( |string| ) )
)
it_acceleratornames = VALUE /aws1/cl_ecsacceleratornames00=>tt_acceleratornameset(
( new /aws1/cl_ecsacceleratornames00( |string| ) )
)
it_acceleratortypes = VALUE /aws1/cl_ecsacceleratortypes00=>tt_acceleratortypeset(
( new /aws1/cl_ecsacceleratortypes00( |string| ) )
)
it_allowedinstancetypes = VALUE /aws1/cl_ecsalwdinsttypeset_w=>tt_allowedinstancetypeset(
( new /aws1/cl_ecsalwdinsttypeset_w( |string| ) )
)
it_cpumanufacturers = VALUE /aws1/cl_ecscpumanufacturers00=>tt_cpumanufacturerset(
( new /aws1/cl_ecscpumanufacturers00( |string| ) )
)
it_excludedinstancetypes = VALUE /aws1/cl_ecsexcludedinsttype00=>tt_excludedinstancetypeset(
( new /aws1/cl_ecsexcludedinsttype00( |string| ) )
)
it_instancegenerations = VALUE /aws1/cl_ecsinstgenerationse00=>tt_instancegenerationset(
( new /aws1/cl_ecsinstgenerationse00( |string| ) )
)
it_localstoragetypes = VALUE /aws1/cl_ecslocalstrgtypeset_w=>tt_localstoragetypeset(
( new /aws1/cl_ecslocalstrgtypeset_w( |string| ) )
)
iv_baremetal = |string|
iv_burstableperformance = |string|
iv_localstorage = |string|
iv_maxspotpriceaspercageof00 = 123
iv_ondemmaxpricepercageove00 = 123
iv_requirehibernatesupport = ABAP_TRUE
iv_spotmaxpricepercageover00 = 123
)
io_networkconfiguration = new /aws1/cl_ecsmanagedinsnetconf(
it_securitygroups = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
it_subnets = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
)
io_storageconfiguration = new /aws1/cl_ecsmanagedinsstrgconf( 123 )
iv_ec2instanceprofilearn = |string|
iv_monitoring = |string|
)
iv_infrastructurerolearn = |string|
iv_propagatetags = |string|
)
iv_cluster = |string|
iv_name = |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_string = lo_capacityprovider->get_capacityproviderarn( ).
lv_string = lo_capacityprovider->get_name( ).
lv_string = lo_capacityprovider->get_cluster( ).
lv_capacityproviderstatus = lo_capacityprovider->get_status( ).
lo_autoscalinggroupprovide = lo_capacityprovider->get_autoscalinggroupprovider( ).
IF lo_autoscalinggroupprovide IS NOT INITIAL.
lv_string = lo_autoscalinggroupprovide->get_autoscalinggrouparn( ).
lo_managedscaling = lo_autoscalinggroupprovide->get_managedscaling( ).
IF lo_managedscaling IS NOT INITIAL.
lv_managedscalingstatus = lo_managedscaling->get_status( ).
lv_managedscalingtargetcap = lo_managedscaling->get_targetcapacity( ).
lv_managedscalingstepsize = lo_managedscaling->get_minimumscalingstepsize( ).
lv_managedscalingstepsize = lo_managedscaling->get_maximumscalingstepsize( ).
lv_managedscalinginstancew = lo_managedscaling->get_instancewarmupperiod( ).
ENDIF.
lv_managedterminationprote = lo_autoscalinggroupprovide->get_managedterminationprot00( ).
lv_manageddraining = lo_autoscalinggroupprovide->get_manageddraining( ).
ENDIF.
lo_managedinstancesprovide = lo_capacityprovider->get_managedinstancesprovider( ).
IF lo_managedinstancesprovide IS NOT INITIAL.
lv_string = lo_managedinstancesprovide->get_infrastructurerolearn( ).
lo_instancelaunchtemplate = lo_managedinstancesprovide->get_instancelaunchtemplate( ).
IF lo_instancelaunchtemplate IS NOT INITIAL.
lv_string = lo_instancelaunchtemplate->get_ec2instanceprofilearn( ).
lo_managedinstancesnetwork = lo_instancelaunchtemplate->get_networkconfiguration( ).
IF lo_managedinstancesnetwork IS NOT INITIAL.
LOOP AT lo_managedinstancesnetwork->get_subnets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_managedinstancesnetwork->get_securitygroups( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_managedinstancesstorage = lo_instancelaunchtemplate->get_storageconfiguration( ).
IF lo_managedinstancesstorage IS NOT INITIAL.
lv_taskvolumestoragegib = lo_managedinstancesstorage->get_storagesizegib( ).
ENDIF.
lv_managedinstancesmonitor = lo_instancelaunchtemplate->get_monitoring( ).
lo_instancerequirementsreq = lo_instancelaunchtemplate->get_instancerequirements( ).
IF lo_instancerequirementsreq IS NOT INITIAL.
lo_vcpucountrangerequest = lo_instancerequirementsreq->get_vcpucount( ).
IF lo_vcpucountrangerequest IS NOT INITIAL.
lv_boxedinteger = lo_vcpucountrangerequest->get_min( ).
lv_boxedinteger = lo_vcpucountrangerequest->get_max( ).
ENDIF.
lo_memorymibrequest = lo_instancerequirementsreq->get_memorymib( ).
IF lo_memorymibrequest IS NOT INITIAL.
lv_boxedinteger = lo_memorymibrequest->get_min( ).
lv_boxedinteger = lo_memorymibrequest->get_max( ).
ENDIF.
LOOP AT lo_instancerequirementsreq->get_cpumanufacturers( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_cpumanufacturer = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lo_memorygibpervcpurequest = lo_instancerequirementsreq->get_memorygibpervcpu( ).
IF lo_memorygibpervcpurequest IS NOT INITIAL.
lv_boxeddouble = lo_memorygibpervcpurequest->get_min( ).
lv_boxeddouble = lo_memorygibpervcpurequest->get_max( ).
ENDIF.
LOOP AT lo_instancerequirementsreq->get_excludedinstancetypes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_excludedinstancetype = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirementsreq->get_instancegenerations( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_instancegeneration = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
lv_boxedinteger = lo_instancerequirementsreq->get_spotmaxpricepercageove00( ).
lv_boxedinteger = lo_instancerequirementsreq->get_ondemmaxpricepercageov00( ).
lv_baremetal = lo_instancerequirementsreq->get_baremetal( ).
lv_burstableperformance = lo_instancerequirementsreq->get_burstableperformance( ).
lv_boxedboolean = lo_instancerequirementsreq->get_requirehibernatesupport( ).
lo_networkinterfacecountre = lo_instancerequirementsreq->get_networkinterfacecount( ).
IF lo_networkinterfacecountre IS NOT INITIAL.
lv_boxedinteger = lo_networkinterfacecountre->get_min( ).
lv_boxedinteger = lo_networkinterfacecountre->get_max( ).
ENDIF.
lv_localstorage = lo_instancerequirementsreq->get_localstorage( ).
LOOP AT lo_instancerequirementsreq->get_localstoragetypes( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_localstoragetype = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lo_totallocalstoragegbrequ = lo_instancerequirementsreq->get_totallocalstoragegb( ).
IF lo_totallocalstoragegbrequ IS NOT INITIAL.
lv_boxeddouble = lo_totallocalstoragegbrequ->get_min( ).
lv_boxeddouble = lo_totallocalstoragegbrequ->get_max( ).
ENDIF.
lo_baselineebsbandwidthmbp = lo_instancerequirementsreq->get_baselineebsbandwidthmbps( ).
IF lo_baselineebsbandwidthmbp IS NOT INITIAL.
lv_boxedinteger = lo_baselineebsbandwidthmbp->get_min( ).
lv_boxedinteger = lo_baselineebsbandwidthmbp->get_max( ).
ENDIF.
LOOP AT lo_instancerequirementsreq->get_acceleratortypes( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_acceleratortype = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
lo_acceleratorcountrequest = lo_instancerequirementsreq->get_acceleratorcount( ).
IF lo_acceleratorcountrequest IS NOT INITIAL.
lv_boxedinteger = lo_acceleratorcountrequest->get_min( ).
lv_boxedinteger = lo_acceleratorcountrequest->get_max( ).
ENDIF.
LOOP AT lo_instancerequirementsreq->get_acceleratormanufacturers( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_acceleratormanufacturer = lo_row_13->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirementsreq->get_acceleratornames( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_acceleratorname = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
lo_acceleratortotalmemorym = lo_instancerequirementsreq->get_acceleratortotalmemmib( ).
IF lo_acceleratortotalmemorym IS NOT INITIAL.
lv_boxedinteger = lo_acceleratortotalmemorym->get_min( ).
lv_boxedinteger = lo_acceleratortotalmemorym->get_max( ).
ENDIF.
lo_networkbandwidthgbpsreq = lo_instancerequirementsreq->get_networkbandwidthgbps( ).
IF lo_networkbandwidthgbpsreq IS NOT INITIAL.
lv_boxeddouble = lo_networkbandwidthgbpsreq->get_min( ).
lv_boxeddouble = lo_networkbandwidthgbpsreq->get_max( ).
ENDIF.
LOOP AT lo_instancerequirementsreq->get_allowedinstancetypes( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_allowedinstancetype = lo_row_17->get_value( ).
ENDIF.
ENDLOOP.
lv_boxedinteger = lo_instancerequirementsreq->get_maxspotpriceaspercageo00( ).
ENDIF.
ENDIF.
lv_propagatemitags = lo_managedinstancesprovide->get_propagatetags( ).
ENDIF.
lv_capacityproviderupdates = lo_capacityprovider->get_updatestatus( ).
lv_string = lo_capacityprovider->get_updatestatusreason( ).
LOOP AT lo_capacityprovider->get_tags( ) into lo_row_18.
lo_row_19 = lo_row_18.
IF lo_row_19 IS NOT INITIAL.
lv_tagkey = lo_row_19->get_key( ).
lv_tagvalue = lo_row_19->get_value( ).
ENDIF.
ENDLOOP.
lv_capacityprovidertype = lo_capacityprovider->get_type( ).
ENDIF.
ENDIF.
To update a capacity provider's parameters¶
This example updates the targetCapacity and instanceWarmupPeriod parameters for the capacity provider MyCapacityProvider to 90 and 150 respectively.
DATA(lo_result) = lo_client->updatecapacityprovider(
io_autoscalinggroupprovider = new /aws1/cl_ecsautoscgrouppvdrupd(
io_managedscaling = new /aws1/cl_ecsmanagedscaling(
iv_instancewarmupperiod = 150
iv_status = |ENABLED|
iv_targetcapacity = 90
)
)
iv_name = |MyCapacityProvider|
).