Amazon GameLift Service
API Reference (API Version 2015-10-01)
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

DeleteScript

Deletes a Realtime script. This action 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

Request Syntax

{ "ScriptId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

ScriptId

A unique identifier for a Realtime script to delete.

Type: String

Pattern: ^script-\S+|^arn:.*script-\S+

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

NotFoundException

A service resource associated with the request could not be found. Clients should not retry such requests.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

Example

Delete an existing script

Sample Request

POST /2015-03-31/functions HTTP/1.1 Content-type: application/json { "ScriptId": "script-1111aaaa-22bb-33cc-44dd-5555eeee66ff" } CLI syntax: aws gamelift delete-script --script-id "script-1111aaaa-22bb-33cc-44dd-5555eeee66ff"

Sample Response

HTTP/1.1 200 OK undefined

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: