/AWS1/IF_GML=>LISTFLEETS()¶
About ListFleets¶
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves a collection of fleet resources in an Amazon Web Services Region. You can filter the result set to find only those fleets that are deployed with a specific build or script. For fleets that have multiple locations, this operation retrieves fleets based on their home Region only.
You can use operation in the following ways:
-
To get a list of all fleets in a Region, don't provide a build or script identifier.
-
To get a list of all fleets where a specific game build is deployed, provide the build ID.
-
To get a list of all Amazon GameLift Servers Realtime fleets with a specific configuration script, provide the script ID.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, this operation returns a list of fleet IDs that match the request parameters. A NextToken value is also returned if there are more result pages to retrieve.
Fleet IDs are returned in no particular order.
Method Signature¶
METHODS /AWS1/IF_GML~LISTFLEETS
IMPORTING
!IV_BUILDID TYPE /AWS1/GMLBUILDIDORARN OPTIONAL
!IV_SCRIPTID TYPE /AWS1/GMLSCRIPTIDORARN OPTIONAL
!IV_LIMIT TYPE /AWS1/GMLPOSITIVEINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/GMLNONZEROANDMAXSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmllistfleetsoutput
RAISING
/AWS1/CX_GMLINTERNALSERVICEEX
/AWS1/CX_GMLINVALIDREQUESTEX
/AWS1/CX_GMLNOTFOUNDEXCEPTION
/AWS1/CX_GMLUNAUTHORIZEDEX
/AWS1/CX_GMLCLIENTEXC
/AWS1/CX_GMLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_buildid TYPE /AWS1/GMLBUILDIDORARN /AWS1/GMLBUILDIDORARN¶
A unique identifier for the build to request fleets for. Use this parameter to return only fleets using a specified build. Use either the build ID or ARN value.
iv_scriptid TYPE /AWS1/GMLSCRIPTIDORARN /AWS1/GMLSCRIPTIDORARN¶
A unique identifier for the Realtime script to request fleets for. Use this parameter to return only fleets using a specified script. Use either the script ID or ARN value.
iv_limit TYPE /AWS1/GMLPOSITIVEINTEGER /AWS1/GMLPOSITIVEINTEGER¶
The maximum number of results to return. Use this parameter with
NextTokento get results as a set of sequential pages.
iv_nexttoken TYPE /AWS1/GMLNONZEROANDMAXSTRING /AWS1/GMLNONZEROANDMAXSTRING¶
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gmllistfleetsoutput /AWS1/CL_GMLLISTFLEETSOUTPUT¶
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->listfleets(
iv_buildid = |string|
iv_limit = 123
iv_nexttoken = |string|
iv_scriptid = |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_fleetids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_fleetid = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_nonzeroandmaxstring = lo_result->get_nexttoken( ).
ENDIF.