update_script
async
¶
update_script(
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
script_id: Optional[ScriptIdOrArn] = None,
name: Optional[NonZeroAndMaxString] = None,
version: Optional[NonZeroAndMaxString] = None,
storage_location: Optional[S3Location] = None,
zip_file: Optional[ZipBlob] = None,
) -> UpdateScriptOutput
This API works with the following fleet types: EC2
Updates Realtime script metadata and content.
To update script metadata, specify the script ID and provide updated name and/or version values.
To update script content, provide an updated zip file by pointing to either a local file or an Amazon S3 bucket location. You can use either method regardless of how the original script was uploaded. Use the Version parameter to track updates to the script.
If the call is successful, the updated metadata is stored in the script record and a revised script is uploaded to the Amazon GameLift Servers service. Once the script is updated and acquired by a fleet instance, the new version is used for all new game sessions.
Learn more
Amazon GameLift Servers Amazon GameLift Servers Realtime
Related actions
Parameters:
-
script_id(Optional[ScriptIdOrArn], default:None) –A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.
-
name(Optional[NonZeroAndMaxString], default:None) –A descriptive label that is associated with a script. Script names do not need to be unique.
-
version(Optional[NonZeroAndMaxString], default:None) –Version information that is associated with a build or script. Version strings do not need to be unique.
-
storage_location(Optional[S3Location], default:None) –The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the
ObjectVersionparameter to specify an earlier version. -
zip_file(Optional[ZipBlob], default:None) –A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.
When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example:
--zip-file fileb://myRealtimeScript.zip.
Raises:
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException–One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
NotFoundException–The requested resource was not found. The resource was either not created yet or deleted.
-
UnauthorizedException–The client failed authentication. Clients should not retry such requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/async_game_lift.py
10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 | |