// Creates a new script record for your Realtime Servers script. Realtime scripts
// are JavaScript that provide configuration settings and optional custom game
// logic for your game. The script is deployed when you create a Realtime Servers
// fleet to host your game sessions. Script logic is executed during an active game
// session. To create a new script record, specify a script name and provide the
// script file(s). The script files and all dependencies must be zipped into a
// single file. You can pull the zip file from either of these locations:
//
// * A
// locally available directory. Use the ZipFile parameter for this option.
//
// * An
// Amazon Simple Storage Service (Amazon S3) bucket under your AWS account. Use the
// StorageLocation parameter for this option. You'll need to have an Identity
// Access Management (IAM) role that allows the Amazon GameLift service to access
// your S3 bucket.
//
// If the call is successful, a new script record is created with
// a unique script ID. If the script file is provided as a local file, the file is
// uploaded to an Amazon GameLift-owned S3 bucket and the script record's storage
// location reflects this location. If the script file is provided as an S3 bucket,
// Amazon GameLift accesses the file at this storage location as needed for
// deployment. Learn more Amazon GameLift Realtime Servers
// (https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-intro.html)Set
// Up a Role for Amazon GameLift Access
// (https://docs.aws.amazon.com/gamelift/latest/developerguide/setting-up-role.html)
// Related operations
//
// * CreateScript
//
// * ListScripts
//
// * DescribeScript
//
// *
// UpdateScript
//
// * DeleteScript
Creates a new script record for your Realtime Servers script. Realtime scripts
are JavaScript that provide configuration settings and optional custom game
logic for your game. The script is deployed when you create a Realtime Servers
fleet to host your game sessions. Script logic is executed during an active game
session. To create a new script record, specify a script name and provide the
script file(s). The script files and all dependencies must be zipped into a
single file. You can pull the zip file from either of these locations.

A
locally available directory. Use the ZipFile parameter for this option.

An
Amazon Simple Storage Service (Amazon S3) bucket under your AWS account. Use the
StorageLocation parameter for this option. You'll need to have an Identity
Access Management (IAM) role that allows the Amazon GameLift service to access
your S3 bucket.

If the call is successful, a new script record is created with
a unique script ID. If the script file is provided as a local file, the file is
uploaded to an Amazon GameLift-owned S3 bucket and the script record's storage
location reflects this location. If the script file is provided as an S3 bucket,
Amazon GameLift accesses the file at this storage location as needed for
deployment. Learn more Amazon GameLift Realtime Servers
Set
Up a Role for Amazon GameLift Access

Related operations

CreateScript

ListScripts

DescribeScript

UpdateScript

DeleteScript
// Creates a new script record for your Realtime Servers script . Realtime scripts // are JavaScript that provide configuration settings and optional custom game // logic for your game . The script is deployed when you create a Realtime Servers // fleet to host your game sessions . Script logic is executed during an active game // session . To create a new script record specify a script name and provide the // script file ( s ) . The script files and all dependencies must be zipped into a // single file . You can pull the zip file from either of these locations : // // * A // locally available directory . Use the ZipFile parameter for this option . // // * An // Amazon Simple Storage Service ( Amazon S3 ) bucket under your AWS account . Use the // StorageLocation parameter for this option . You ' ll need to have an Identity // Access Management ( IAM ) role that allows the Amazon GameLift service to access // your S3 bucket . // // If the call is successful a new script record is created with // a unique script ID . If the script file is provided as a local file the file is // uploaded to an Amazon GameLift - owned S3 bucket and the script record ' s storage // location reflects this location . If the script file is provided as an S3 bucket // Amazon GameLift accesses the file at this storage location as needed for // deployment . Learn more Amazon GameLift Realtime Servers // ( https : // docs . aws . amazon . com / gamelift / latest / developerguide / realtime - intro . html ) Set // Up a Role for Amazon GameLift Access // ( https : // docs . aws . amazon . com / gamelift / latest / developerguide / setting - up - role . html ) // Related operations // // * CreateScript // // * ListScripts // // * DescribeScript // // * // UpdateScript // // * DeleteScript
func (c *Client) CreateScript(ctx context.Context, params *CreateScriptInput, optFns ...func(*Options)) (*CreateScriptOutput, error) {
	if params == nil {
		params = &CreateScriptInput{}
	}
	result, metadata, err := c.invokeOperation(ctx, "CreateScript", params, optFns, addOperationCreateScriptMiddlewares)
	if err != nil {
		return nil, err
	}
	out := result.(*CreateScriptOutput)
	out.ResultMetadata = metadata
	return out, nil
}
func ( c * Client ) CreateScript ( ctx context . Context , params * CreateScriptInput , optFns ... func ( * Options ) ) ( * CreateScriptOutput , error ) { if params == nil { params = & CreateScriptInput { } } result , metadata , err := c . invokeOperation ( ctx , " " , params , optFns , addOperationCreateScriptMiddlewares ) if err != nil { return nil , err } out := result . ( * CreateScriptOutput ) out . ResultMetadata = metadata return out , nil }
Creates a new script record for your Realtime Servers script.
Creates a new script record for your Realtime Servers script .