resumeGameServerGroup method

Future<ResumeGameServerGroupOutput> resumeGameServerGroup({
  1. required String gameServerGroupName,
  2. required List<GameServerGroupAction> resumeActions,
})

This API works with the following fleet types: EC2 (FleetIQ)

Reinstates activity on a game server group after it has been suspended. A game server group might be suspended by the SuspendGameServerGroup operation, or it might be suspended involuntarily due to a configuration problem. In the second case, you can manually resume activity on the group once the configuration problem has been resolved. Refer to the game server group status and status reason for more information on why group activity is suspended.

To resume activity, specify a game server group ARN and the type of activity to be resumed. If successful, a GameServerGroup object is returned showing that the resumed activity is no longer listed in SuspendedActions.

Learn more

Amazon GameLift Servers FleetIQ Guide

May throw InternalServiceException. May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException.

Parameter gameServerGroupName : A unique identifier for the game server group. Use either the name or ARN value.

Parameter resumeActions : The activity to resume for this game server group.

Implementation

Future<ResumeGameServerGroupOutput> resumeGameServerGroup({
  required String gameServerGroupName,
  required List<GameServerGroupAction> resumeActions,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.ResumeGameServerGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GameServerGroupName': gameServerGroupName,
      'ResumeActions': resumeActions.map((e) => e.value).toList(),
    },
  );

  return ResumeGameServerGroupOutput.fromJson(jsonResponse.body);
}