/AWS1/IF_GML=>SUSPENDGAMESERVERGROUP()¶
About SuspendGameServerGroup¶
This API works with the following fleet types: EC2 (FleetIQ)
Temporarily stops activity on a game server group without terminating instances or the game server group. You can restart activity by calling ResumeGameServerGroup. You can suspend the following activity:
-
Instance type replacement - This activity evaluates the current game hosting viability of all Spot instance types that are defined for the game server group. It updates the Auto Scaling group to remove nonviable Spot Instance types, which have a higher chance of game server interruptions. It then balances capacity across the remaining viable Spot Instance types. When this activity is suspended, the Auto Scaling group continues with its current balance, regardless of viability. Instance protection, utilization metrics, and capacity scaling activities continue to be active.
To suspend activity, specify a game server group ARN and the type of activity to be
suspended. If successful, a GameServerGroup object is returned showing that
the activity is listed in SuspendedActions.
Learn more
Amazon GameLift Servers FleetIQ Guide
Method Signature¶
METHODS /AWS1/IF_GML~SUSPENDGAMESERVERGROUP
IMPORTING
!IV_GAMESERVERGROUPNAME TYPE /AWS1/GMLGAMESERVERGRNAMEORARN OPTIONAL
!IT_SUSPENDACTIONS TYPE /AWS1/CL_GMLGAMESERVERGRACT_W=>TT_GAMESERVERGROUPACTIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmlsuspendgameserve01
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¶
Required arguments:¶
iv_gameservergroupname TYPE /AWS1/GMLGAMESERVERGRNAMEORARN /AWS1/GMLGAMESERVERGRNAMEORARN¶
A unique identifier for the game server group. Use either the name or ARN value.
it_suspendactions TYPE /AWS1/CL_GMLGAMESERVERGRACT_W=>TT_GAMESERVERGROUPACTIONS TT_GAMESERVERGROUPACTIONS¶
The activity to suspend for this game server group.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gmlsuspendgameserve01 /AWS1/CL_GMLSUSPENDGAMESERVE01¶
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->suspendgameservergroup(
it_suspendactions = VALUE /aws1/cl_gmlgameservergract_w=>tt_gameservergroupactions(
( new /aws1/cl_gmlgameservergract_w( |string| ) )
)
iv_gameservergroupname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_gameservergroup = lo_result->get_gameservergroup( ).
IF lo_gameservergroup IS NOT INITIAL.
lv_gameservergroupname = lo_gameservergroup->get_gameservergroupname( ).
lv_gameservergrouparn = lo_gameservergroup->get_gameservergrouparn( ).
lv_iamrolearn = lo_gameservergroup->get_rolearn( ).
LOOP AT lo_gameservergroup->get_instancedefinitions( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_gameservergroupinstance = lo_row_1->get_instancetype( ).
lv_weightedcapacity = lo_row_1->get_weightedcapacity( ).
ENDIF.
ENDLOOP.
lv_balancingstrategy = lo_gameservergroup->get_balancingstrategy( ).
lv_gameserverprotectionpol = lo_gameservergroup->get_gameserverprotectionply( ).
lv_autoscalinggrouparn = lo_gameservergroup->get_autoscalinggrouparn( ).
lv_gameservergroupstatus = lo_gameservergroup->get_status( ).
lv_nonzeroandmaxstring = lo_gameservergroup->get_statusreason( ).
LOOP AT lo_gameservergroup->get_suspendedactions( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_gameservergroupaction = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_gameservergroup->get_creationtime( ).
lv_timestamp = lo_gameservergroup->get_lastupdatedtime( ).
ENDIF.
ENDIF.