deleteScript method
Deletes a Realtime script. This operation permanently deletes the script record. If script files were uploaded, they are also deleted (files stored in an S3 bucket are not deleted).
To delete a script, specify the script ID. Before deleting a script, be sure to terminate all fleets that are deployed with the script being deleted. Fleet instances periodically check for script updates, and if the script record no longer exists, the instance will go into an error state and be unable to host game sessions.
Learn more
Amazon GameLift Realtime Servers
Related operations
May throw InvalidRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw TaggingFailedException. May throw InternalServiceException.
Parameter scriptId
:
A unique identifier for a Realtime script to delete. You can use either
the script ID or ARN value.
Implementation
Future<void> deleteScript({
required String scriptId,
}) async {
ArgumentError.checkNotNull(scriptId, 'scriptId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DeleteScript'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ScriptId': scriptId,
},
);
}