deleteFleet method

Future<void> deleteFleet({
  1. required String fleetId,
})

This API works with the following fleet types: EC2, Anywhere, Container

Deletes all resources and information related to a fleet and shuts down any currently running fleet instances, including those in remote locations. To delete a fleet, specify the fleet ID to be terminated. During the deletion process, the fleet status is changed to DELETING. When completed, the status switches to TERMINATED and the fleet event FLEET_DELETED is emitted.

Learn more

Setting up Amazon GameLift Servers Fleets

May throw InternalServiceException. May throw InvalidFleetStatusException. May throw InvalidRequestException. May throw NotFoundException. May throw TaggingFailedException. May throw UnauthorizedException.

Parameter fleetId : A unique identifier for the fleet to be deleted. You can use either the fleet ID or ARN value.

Implementation

Future<void> deleteFleet({
  required String fleetId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DeleteFleet'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FleetId': fleetId,
    },
  );
}