/AWS1/IF_ECS=>DESCRIBECAPACITYPROVIDERS()¶
About DescribeCapacityProviders¶
Describes one or more of your capacity providers.
Method Signature¶
METHODS /AWS1/IF_ECS~DESCRIBECAPACITYPROVIDERS
IMPORTING
!IT_CAPACITYPROVIDERS TYPE /AWS1/CL_ECSSTRINGLIST_W=>TT_STRINGLIST OPTIONAL
!IV_CLUSTER TYPE /AWS1/ECSSTRING OPTIONAL
!IT_INCLUDE TYPE /AWS1/CL_ECSCAPPVDRFIELDLIST_W=>TT_CAPACITYPROVIDERFIELDLIST OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ECSBOXEDINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ECSSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecsdescrcappvdrsrsp
RAISING
/AWS1/CX_ECSCLIENTEXCEPTION
/AWS1/CX_ECSCLUSTERNOTFOUNDEX
/AWS1/CX_ECSINVALIDPARAMETEREX
/AWS1/CX_ECSSERVEREXCEPTION
/AWS1/CX_ECSUNSUPPEDFEATUREEX
/AWS1/CX_ECSCLIENTEXC
/AWS1/CX_ECSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_capacityproviders TYPE /AWS1/CL_ECSSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST¶
The short name or full Amazon Resource Name (ARN) of one or more capacity providers. Up to
100capacity providers can be described in an action.
iv_cluster TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The name of the cluster to describe capacity providers for. When specified, only capacity providers associated with this cluster are returned, including Amazon ECS Managed Instances capacity providers.
it_include TYPE /AWS1/CL_ECSCAPPVDRFIELDLIST_W=>TT_CAPACITYPROVIDERFIELDLIST TT_CAPACITYPROVIDERFIELDLIST¶
Specifies whether or not you want to see the resource tags for the capacity provider. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.
iv_maxresults TYPE /AWS1/ECSBOXEDINTEGER /AWS1/ECSBOXEDINTEGER¶
The maximum number of account setting results returned by
DescribeCapacityProvidersin paginated output. When this parameter is used,DescribeCapacityProvidersonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeCapacityProvidersrequest with the returnednextTokenvalue. This value can be between 1 and 10. If this parameter is not used, thenDescribeCapacityProvidersreturns up to 10 results and anextTokenvalue if applicable.
iv_nexttoken TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The
nextTokenvalue returned from a previous paginatedDescribeCapacityProvidersrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecsdescrcappvdrsrsp /AWS1/CL_ECSDESCRCAPPVDRSRSP¶
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->describecapacityproviders(
it_capacityproviders = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
it_include = VALUE /aws1/cl_ecscappvdrfieldlist_w=>tt_capacityproviderfieldlist(
( new /aws1/cl_ecscappvdrfieldlist_w( |string| ) )
)
iv_cluster = |string|
iv_maxresults = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_capacityproviders( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_capacityproviderarn( ).
lv_string = lo_row_1->get_name( ).
lv_string = lo_row_1->get_cluster( ).
lv_capacityproviderstatus = lo_row_1->get_status( ).
lo_autoscalinggroupprovide = lo_row_1->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_row_1->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_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_managedinstancesnetwork->get_securitygroups( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->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_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_cpumanufacturer = lo_row_5->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_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_excludedinstancetype = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirementsreq->get_instancegenerations( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_instancegeneration = lo_row_9->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_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_localstoragetype = lo_row_11->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_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_acceleratortype = lo_row_13->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_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_acceleratormanufacturer = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_instancerequirementsreq->get_acceleratornames( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_acceleratorname = lo_row_17->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_18.
lo_row_19 = lo_row_18.
IF lo_row_19 IS NOT INITIAL.
lv_allowedinstancetype = lo_row_19->get_value( ).
ENDIF.
ENDLOOP.
lv_boxedinteger = lo_instancerequirementsreq->get_maxspotpriceaspercageo00( ).
ENDIF.
ENDIF.
lv_propagatemitags = lo_managedinstancesprovide->get_propagatetags( ).
lo_infrastructureoptimizat = lo_managedinstancesprovide->get_infrastructureoptmztn( ).
IF lo_infrastructureoptimizat IS NOT INITIAL.
lv_boxedinteger = lo_infrastructureoptimizat->get_scaleinafter( ).
ENDIF.
ENDIF.
lv_capacityproviderupdates = lo_row_1->get_updatestatus( ).
lv_string = lo_row_1->get_updatestatusreason( ).
LOOP AT lo_row_1->get_tags( ) into lo_row_20.
lo_row_21 = lo_row_20.
IF lo_row_21 IS NOT INITIAL.
lv_tagkey = lo_row_21->get_key( ).
lv_tagvalue = lo_row_21->get_value( ).
ENDIF.
ENDLOOP.
lv_capacityprovidertype = lo_row_1->get_type( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_failures( ) into lo_row_22.
lo_row_23 = lo_row_22.
IF lo_row_23 IS NOT INITIAL.
lv_string = lo_row_23->get_arn( ).
lv_string = lo_row_23->get_reason( ).
lv_string = lo_row_23->get_detail( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.
To describe a specific capacity provider¶
This example retrieves details about the capacity provider MyCapacityProvider
DATA(lo_result) = lo_client->describecapacityproviders(
it_capacityproviders = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |MyCapacityProvider| ) )
)
it_include = VALUE /aws1/cl_ecscappvdrfieldlist_w=>tt_capacityproviderfieldlist(
( new /aws1/cl_ecscappvdrfieldlist_w( |TAGS| ) )
)
).
To describe all capacity providers¶
This example retrieves details about all capacity providers.
DATA(lo_result) = lo_client->describecapacityproviders( ).