libZSservicesZSamazonka-gameliftZSamazonka-gamelift
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.GameLift.UpdateScript

Description

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

Creating a Request

data UpdateScript Source #

See: newUpdateScript smart constructor.

Constructors

UpdateScript' 

Fields

  • storageLocation :: Maybe S3Location

    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.

  • zipFile :: Maybe Base64

    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.

  • name :: Maybe Text

    A descriptive label that is associated with a script. Script names do not need to be unique.

  • version :: Maybe Text

    Version information that is associated with a build or script. Version strings do not need to be unique.

  • scriptId :: Text

    A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.

Instances

Instances details
Eq UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Read UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Show UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Generic UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Associated Types

type Rep UpdateScript :: Type -> Type #

NFData UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Methods

rnf :: UpdateScript -> () #

Hashable UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

ToJSON UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

AWSRequest UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Associated Types

type AWSResponse UpdateScript #

ToHeaders UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

ToPath UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

ToQuery UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

type Rep UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

type Rep UpdateScript = D1 ('MetaData "UpdateScript" "Amazonka.GameLift.UpdateScript" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "UpdateScript'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "storageLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe S3Location)) :*: S1 ('MetaSel ('Just "zipFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Base64))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "scriptId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse UpdateScript Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

newUpdateScript Source #

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.

Constructors

UpdateScriptResponse' 

Fields

  • script :: Maybe 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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Read UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Show UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Generic UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Associated Types

type Rep UpdateScriptResponse :: Type -> Type #

NFData UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

Methods

rnf :: UpdateScriptResponse -> () #

type Rep UpdateScriptResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateScript

type Rep UpdateScriptResponse = D1 ('MetaData "UpdateScriptResponse" "Amazonka.GameLift.UpdateScript" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "UpdateScriptResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "script") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Script)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.