Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 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 Realtime Servers
Related actions
CreateScript | ListScripts | DescribeScript | UpdateScript | DeleteScript | All APIs by task
Synopsis
- data UpdateScript = UpdateScript' {}
- newUpdateScript :: Text -> UpdateScript
- updateScript_storageLocation :: Lens' UpdateScript (Maybe S3Location)
- updateScript_zipFile :: Lens' UpdateScript (Maybe ByteString)
- updateScript_name :: Lens' UpdateScript (Maybe Text)
- updateScript_version :: Lens' UpdateScript (Maybe Text)
- updateScript_scriptId :: Lens' UpdateScript Text
- data UpdateScriptResponse = UpdateScriptResponse' {
- script :: Maybe Script
- httpStatus :: Int
- newUpdateScriptResponse :: Int -> UpdateScriptResponse
- updateScriptResponse_script :: Lens' UpdateScriptResponse (Maybe Script)
- updateScriptResponse_httpStatus :: Lens' UpdateScriptResponse Int
Creating a Request
data UpdateScript Source #
See: newUpdateScript
smart constructor.
UpdateScript' | |
|
Instances
Create a value of UpdateScript
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:storageLocation:UpdateScript'
, updateScript_storageLocation
- 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 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 uploads the latest version of the zip file;
if you have S3 object versioning turned on, you can use the
ObjectVersion
parameter to specify an earlier version.
$sel:zipFile:UpdateScript'
, updateScript_zipFile
- 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 AWS 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
.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
$sel:name:UpdateScript'
, updateScript_name
- A descriptive label that is associated with a script. Script names do
not need to be unique.
$sel:version:UpdateScript'
, updateScript_version
- Version information that is associated with a build or script. Version
strings do not need to be unique.
$sel:scriptId:UpdateScript'
, updateScript_scriptId
- A unique identifier for the Realtime script to update. You can use
either the script ID or ARN value.
Request Lenses
updateScript_storageLocation :: Lens' UpdateScript (Maybe S3Location) Source #
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 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 uploads the latest version of the zip file;
if you have S3 object versioning turned on, you can use the
ObjectVersion
parameter to specify an earlier version.
updateScript_zipFile :: Lens' UpdateScript (Maybe ByteString) Source #
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 AWS 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
.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
updateScript_name :: Lens' UpdateScript (Maybe Text) Source #
A descriptive label that is associated with a script. Script names do not need to be unique.
updateScript_version :: Lens' UpdateScript (Maybe Text) Source #
Version information that is associated with a build or script. Version strings do not need to be unique.
updateScript_scriptId :: Lens' UpdateScript Text Source #
A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.
Destructuring the Response
data UpdateScriptResponse Source #
See: newUpdateScriptResponse
smart constructor.
UpdateScriptResponse' | |
|
Instances
newUpdateScriptResponse Source #
Create a value of UpdateScriptResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:script:UpdateScriptResponse'
, updateScriptResponse_script
- The newly created script record with a unique script ID. The new
script's storage location reflects an Amazon S3 location: (1) If the
script was uploaded from an S3 bucket under your account, the storage
location reflects the information that was provided in the
CreateScript request; (2) If the script file was uploaded from a local
zip file, the storage location reflects an S3 location controls by the
Amazon GameLift service.
$sel:httpStatus:UpdateScriptResponse'
, updateScriptResponse_httpStatus
- The response's http status code.
Response Lenses
updateScriptResponse_script :: Lens' UpdateScriptResponse (Maybe Script) Source #
The newly created script record with a unique script ID. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.
updateScriptResponse_httpStatus :: Lens' UpdateScriptResponse Int Source #
The response's http status code.