You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.GameSparks

Inherits:
AWS.Service show all
Identifier:
gamesparks
API Version:
2021-08-17
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Sending a Request Using GameSparks

var gamesparks = new AWS.GameSparks();
gamesparks.createGame(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the GameSparks object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var gamesparks = new AWS.GameSparks({apiVersion: '2021-08-17'});

You can also set the API version globally in AWS.config.apiVersions using the gamesparks service identifier:

AWS.config.apiVersions = {
  gamesparks: '2021-08-17',
  // other service API versions
};

var gamesparks = new AWS.GameSparks();

Version:

  • 2021-08-17

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.GameSparks(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a GameSparks object

var gamesparks = new AWS.GameSparks({apiVersion: '2021-08-17'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.GameSparks.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.GameSparks.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.GameSparks.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createGame(params = {}, callback) ⇒ AWS.Request

Creates a new game with an empty configuration. After creating your game, you can update the configuration using UpdateGameConfiguration or ImportGameConfiguration.

Service Reference:

Examples:

Calling the createGame operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
gamesparks.createGame(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      A client-defined token. With an active client token in the request, this action is idempotent.

    • Description — (String)

      The description of the game.

    • GameName — (String)

      The name of the game.

    • Tags — (map<String>)

      The list of tags to apply to the game.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Game — (map)

        Details about the game that was created.

        • Arn — (String)

          The Amazon Resource Name (ARN) of this game.

        • Created — (Date)

          The date when the game was created.

        • Description — (String)

          The description of the game.

        • EnableTerminationProtection — (Boolean)

          Determines if the game can be deleted.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Name — (String)

          The name of the game.

        • State — (String)

          The state of the game.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the game.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSnapshot(params = {}, callback) ⇒ AWS.Request

Creates a snapshot of the game configuration.

Service Reference:

Examples:

Calling the createSnapshot operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
gamesparks.createSnapshot(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      The description of the snapshot.

    • GameName — (String)

      The name of the game.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Snapshot — (map)

        Properties that provide details of the created snapshot.

        • Created — (Date)

          The timestamp of when the snapshot was created.

        • Description — (String)

          The description of the snapshot.

        • Id — (String)

          The identifier of the snapshot.

        • LastUpdated — (Date)

          The timestamp of when the snapshot was last updated.

        • Sections — (map<map>)

          The sections in the snapshot.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createStage(params = {}, callback) ⇒ AWS.Request

Creates a new stage for stage-by-stage game development and deployment.

Service Reference:

Examples:

Calling the createStage operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Role: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
gamesparks.createStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      A client-defined token. With an active client token in the request, this action is idempotent.

    • Description — (String)

      The description of the stage.

    • GameName — (String)

      The name of the game.

    • Role — (String)

      The Amazon Resource Name (ARN) of the role to run the game with. This role can be a game-defined role or the default role that GameSparks created.

    • StageName — (String)

      The name of the stage.

    • Tags — (map<String>)

      The list of tags to apply to the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Stage — (map)

        Properties that describe the stage.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the stage.

        • Created — (Date)

          The timestamp of when the stage was created.

        • Description — (String)

          The description of the stage.

        • GameKey — (String)

          The game key associated with the stage.

          The game key is a unique identifier that the game client uses to connect to the GameSparks backend.

        • LastUpdated — (Date)

          The timestamp of when the stage was last updated.

        • LogGroup — (String)

          The Amazon CloudWatch log group for game runtimes deployed to the stage.

        • Name — (String)

          The name of the stage.

        • Role — (String)

          The Amazon Resource Name (ARN) of the role used to run the game runtimes deployed to the stage.

        • State — (String)

          The state of the stage.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGame(params = {}, callback) ⇒ AWS.Request

Deletes a game.

Service Reference:

Examples:

Calling the deleteGame operation

var params = {
  GameName: 'STRING_VALUE' /* required */
};
gamesparks.deleteGame(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteStage(params = {}, callback) ⇒ AWS.Request

Deletes a stage from a game, along with the associated game runtime.

Service Reference:

Examples:

Calling the deleteStage operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
gamesparks.deleteStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • StageName — (String)

      The name of the stage to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disconnectPlayer(params = {}, callback) ⇒ AWS.Request

Disconnects a player from the game runtime.

If a player has multiple connections, this operation attempts to close all of them.

Service Reference:

Examples:

Calling the disconnectPlayer operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  PlayerId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
gamesparks.disconnectPlayer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • PlayerId — (String)

      The unique identifier representing a player.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DisconnectFailures — (Array<String>)

        The list of the connection ids that could not be disconnected.

      • DisconnectSuccesses — (Array<String>)

        The list of the connection ids that were disconnected.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

exportSnapshot(params = {}, callback) ⇒ AWS.Request

Exports a game configuration snapshot.

Service Reference:

Examples:

Calling the exportSnapshot operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE' /* required */
};
gamesparks.exportSnapshot(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • SnapshotId — (String)

      The identifier of the snapshot to export.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • S3Url — (String)

        The presigned URL for the snapshot data.

        This URL will be available for 10 minutes, and can be used to download the snapshot content. If the URL expires, a new one can be requested using the same operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getExtension(params = {}, callback) ⇒ AWS.Request

Gets details about a specified extension.

Service Reference:

Examples:

Calling the getExtension operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Namespace: 'STRING_VALUE' /* required */
};
gamesparks.getExtension(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the extension.

    • Namespace — (String)

      The namespace (qualifier) of the extension.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Extension — (map)

        Details about the extension.

        • Description — (String)

          The description of the extension.

        • Name — (String)

          The name of the extension.

        • Namespace — (String)

          The namespace (qualifier) of the extension.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getExtensionVersion(params = {}, callback) ⇒ AWS.Request

Gets details about a specified extension version.

Service Reference:

Examples:

Calling the getExtensionVersion operation

var params = {
  ExtensionVersion: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Namespace: 'STRING_VALUE' /* required */
};
gamesparks.getExtensionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ExtensionVersion — (String)

      The version of the extension.

    • Name — (String)

      The name of the extension.

    • Namespace — (String)

      The namespace (qualifier) of the extension.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ExtensionVersion — (map)

        The version of the extension.

        • Name — (String)

          The name of the extension.

        • Namespace — (String)

          The namespace (qualifier) of the extension.

        • Schema — (String)

          The model that defines the interface for this extension version.

        • Version — (String)

          The version of the extension.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGame(params = {}, callback) ⇒ AWS.Request

Gets details about a game.

Service Reference:

Examples:

Calling the getGame operation

var params = {
  GameName: 'STRING_VALUE' /* required */
};
gamesparks.getGame(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Game — (map)

        The details of the game.

        • Arn — (String)

          The Amazon Resource Name (ARN) of this game.

        • Created — (Date)

          The date when the game was created.

        • Description — (String)

          The description of the game.

        • EnableTerminationProtection — (Boolean)

          Determines if the game can be deleted.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Name — (String)

          The name of the game.

        • State — (String)

          The state of the game.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the game.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGameConfiguration(params = {}, callback) ⇒ AWS.Request

Gets the configuration of the game.

Service Reference:

Examples:

Calling the getGameConfiguration operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Sections: [
    'STRING_VALUE',
    /* more items */
  ]
};
gamesparks.getGameConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • Sections — (Array<String>)

      The list of sections to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GameConfiguration — (map)

        Details about the game configuration.

        • Created — (Date)

          The date when the game was created.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Sections — (map<map>)

          Configuration data, organized by section name.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGeneratedCodeJob(params = {}, callback) ⇒ AWS.Request

Gets details about a job that is generating code for a snapshot.

Service Reference:

Examples:

Calling the getGeneratedCodeJob operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  JobId: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE' /* required */
};
gamesparks.getGeneratedCodeJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • JobId — (String)

      The identifier of the code generation job.

    • SnapshotId — (String)

      The identifier of the snapshot for the code generation job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GeneratedCodeJob — (map)

        Details about the generated code job.

        • Description — (String)

          The description of the generated code job.

        • ExpirationTime — (Date)

          The expiration date and time for the download URL.

          The download URL us guaranteed to be available until at least this time.

        • GeneratedCodeJobId — (String)

          The identifier for the generated code job.

        • S3Url — (String)

          A presigned URL that can be used to download the generated code.

        • Status — (String)

          The status of the generated code job

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
          • "PENDING"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPlayerConnectionStatus(params = {}, callback) ⇒ AWS.Request

Gets the status of a player's connection to the game runtime.

It's possible for a single player to have multiple connections to the game runtime. If a player is not connected, this operation returns an empty list.

Service Reference:

Examples:

Calling the getPlayerConnectionStatus operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  PlayerId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
gamesparks.getPlayerConnectionStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • PlayerId — (String)

      The unique identifier representing a player.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Connections — (Array<map>)

        The list of connection ids, one for each connection in use by the player.

        • Created — (Date)

          The date and time when the connection was created.

        • Id — (String)

          The identifier used to indicate a specific WebSocket connection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSnapshot(params = {}, callback) ⇒ AWS.Request

Gets a copy of the game configuration in a snapshot.

Service Reference:

Examples:

Calling the getSnapshot operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  Sections: [
    'STRING_VALUE',
    /* more items */
  ]
};
gamesparks.getSnapshot(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • Sections — (Array<String>)

      The list of game configuration sections to be described.

    • SnapshotId — (String)

      The identifier of the snapshot.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Snapshot — (map)

        Properties that provide details of the snapshot.

        • Created — (Date)

          The timestamp of when the snapshot was created.

        • Description — (String)

          The description of the snapshot.

        • Id — (String)

          The identifier of the snapshot.

        • LastUpdated — (Date)

          The timestamp of when the snapshot was last updated.

        • Sections — (map<map>)

          The sections in the snapshot.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStage(params = {}, callback) ⇒ AWS.Request

Gets information about a stage.

Service Reference:

Examples:

Calling the getStage operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
gamesparks.getStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Stage — (map)

        Properties that provide details of the stage.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the stage.

        • Created — (Date)

          The timestamp of when the stage was created.

        • Description — (String)

          The description of the stage.

        • GameKey — (String)

          The game key associated with the stage.

          The game key is a unique identifier that the game client uses to connect to the GameSparks backend.

        • LastUpdated — (Date)

          The timestamp of when the stage was last updated.

        • LogGroup — (String)

          The Amazon CloudWatch log group for game runtimes deployed to the stage.

        • Name — (String)

          The name of the stage.

        • Role — (String)

          The Amazon Resource Name (ARN) of the role used to run the game runtimes deployed to the stage.

        • State — (String)

          The state of the stage.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStageDeployment(params = {}, callback) ⇒ AWS.Request

Gets information about a stage deployment.

Service Reference:

Examples:

Calling the getStageDeployment operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  DeploymentId: 'STRING_VALUE'
};
gamesparks.getStageDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeploymentId — (String)

      The identifier of the stage deployment. StartStageDeployment returns the identifier that you use here.

    • GameName — (String)

      The name of the game.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StageDeployment — (map)

        Properties that provide details of the stage deployment.

        • Created — (Date)

          The timestamp of when the stage deployment was created.

        • DeploymentAction — (String)

          The type of action of the stage deployment.

          Possible values include:
          • "DEPLOY"
          • "UNDEPLOY"
        • DeploymentId — (String)

          The identifier of the deployment.

        • DeploymentResult — (map)

          The result of the deployment.

          • Message — (String)

            Details about the deployment result.

          • ResultCode — (String)

            The type of deployment result.

            Possible values include:
            • "SUCCESS"
            • "INVALID_ROLE_FAILURE"
            • "UNSPECIFIED_FAILURE"
        • DeploymentState — (String)

          The state of the deployment.

          Possible values include:
          • "PENDING"
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
        • LastUpdated — (Date)

          The timestamp of when the deployment was last updated.

        • SnapshotId — (String)

          The identifier of the snapshot associated with the stage deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

importGameConfiguration(params = {}, callback) ⇒ AWS.Request

Imports a game configuration.

This operation replaces the current configuration of the game with the provided input. This is not a reversible operation. If you want to preserve the previous configuration, use CreateSnapshot to make a new snapshot before importing.

Service Reference:

Examples:

Calling the importGameConfiguration operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  ImportSource: { /* required */
    File: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */ /* required */
  }
};
gamesparks.importGameConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • ImportSource — (map)

      The source used to import configuration sections.

      • Filerequired — (Buffer, Typed Array, Blob, String)

        The JSON string containing the configuration sections.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GameConfiguration — (map)

        Details about the game configuration.

        • Created — (Date)

          The date when the game was created.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Sections — (map<map>)

          Configuration data, organized by section name.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listExtensions(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of available extensions.

Extensions provide features that games can use from scripts.

Service Reference:

Examples:

Calling the listExtensions operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listExtensions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Extensions — (Array<map>)

        The list of extensions.

        • Description — (String)

          The description of the extension.

        • Name — (String)

          The name of the extension.

        • Namespace — (String)

          The namespace (qualifier) of the extension.

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listExtensionVersions(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of available versions for the extension.

Each time an API change is made to an extension, the version is incremented. The list retrieved by this operation shows the versions that are currently available.

Service Reference:

Examples:

Calling the listExtensionVersions operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Namespace: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listExtensionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • Name — (String)

      The name of the extension.

    • Namespace — (String)

      The namespace (qualifier) of the extension.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ExtensionVersions — (Array<map>)

        The list of extension versions.

        • Name — (String)

          The name of the extension.

        • Namespace — (String)

          The namespace (qualifier) of the extension.

        • Schema — (String)

          The model that defines the interface for this extension version.

        • Version — (String)

          The version of the extension.

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGames(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of games.

Service Reference:

Examples:

Calling the listGames operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listGames(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Games — (Array<map>)

        The list of games.

        • Description — (String)

          The description of the game.

        • Name — (String)

          The name of the game.

        • State — (String)

          The state of the game.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the game.

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGeneratedCodeJobs(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of code generation jobs for a snapshot.

Service Reference:

Examples:

Calling the listGeneratedCodeJobs operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listGeneratedCodeJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

    • SnapshotId — (String)

      The identifier of the snapshot.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GeneratedCodeJobs — (Array<map>)

        The list of generated code jobs.

        • Description — (String)

          The description of the generated code job.

        • ExpirationTime — (Date)

          The expiration date and time for the download URL.

          The download URL us guaranteed to be available until at least this time.

        • GeneratedCodeJobId — (String)

          The identifier for the generated code job.

        • S3Url — (String)

          A presigned URL that can be used to download the generated code.

        • Status — (String)

          The status of the generated code job

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
          • "PENDING"
      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSnapshots(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of snapshot summaries from the game.

Service Reference:

Examples:

Calling the listSnapshots operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listSnapshots(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

      • Snapshots — (Array<map>)

        A list of snapshot summaries. You can use the returned snapshot IDs in the UpdateSnapshot and GetSnapshot operations.

        • Created — (Date)

          The timestamp of when the snapshot was created.

        • Description — (String)

          The description of the snapshot.

        • Id — (String)

          The identifier of the snapshot.

        • LastUpdated — (Date)

          Then timestamp of when the snapshot was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listStageDeployments(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of stage deployment summaries from the game.

Service Reference:

Examples:

Calling the listStageDeployments operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listStageDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

      • StageDeployments — (Array<map>)

        A list of stage deployment summaries. You can use the deployment IDs in the UpdateStageDeployment and GetStageDeployment actions.

        • DeploymentAction — (String)

          The type of action of the deployment.

          Possible values include:
          • "DEPLOY"
          • "UNDEPLOY"
        • DeploymentId — (String)

          The identifier of the deployment.

        • DeploymentResult — (map)

          The result of the deployment.

          • Message — (String)

            Details about the deployment result.

          • ResultCode — (String)

            The type of deployment result.

            Possible values include:
            • "SUCCESS"
            • "INVALID_ROLE_FAILURE"
            • "UNSPECIFIED_FAILURE"
        • DeploymentState — (String)

          The state of the deployment.

          Possible values include:
          • "PENDING"
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
        • LastUpdated — (Date)

          The timestamp of when the deployment was last updated.

        • SnapshotId — (String)

          The identifier of the snapshot associated with the stage deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listStages(params = {}, callback) ⇒ AWS.Request

Gets a paginated list of stage summaries from the game.

Service Reference:

Examples:

Calling the listStages operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
gamesparks.listStages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • MaxResults — (Integer)

      The maximum number of results to return.

      Use this parameter with NextToken to get results as a set of sequential pages.

    • NextToken — (String)

      The token that indicates the start of the next sequential page of results.

      Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        The token that indicates the start of the next sequential page of results.

        Use this value when making the next call to this operation to continue where the last one finished.

      • Stages — (Array<map>)

        A list of stage summaries. You can use the stage names in the UpdateStage and GetStage actions.

        • Description — (String)

          The description of the stage.

        • GameKey — (String)

          The game key associated with the stage.

          The game key is a unique identifier that the game client uses to connect to the GameSparks backend.

        • Name — (String)

          The name of the stage.

        • State — (String)

          The state of the stage.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists the tags associated with a GameSparks resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
gamesparks.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the GameSparks resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (map<String>)

        The tags associated with the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startGeneratedCodeJob(params = {}, callback) ⇒ AWS.Request

Starts an asynchronous process that generates client code for system-defined and custom messages. The resulting code is collected as a .zip file and uploaded to a pre-signed Amazon S3 URL.

Service Reference:

Examples:

Calling the startGeneratedCodeJob operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Generator: { /* required */
    GameSdkVersion: 'STRING_VALUE',
    Language: 'STRING_VALUE',
    TargetPlatform: 'STRING_VALUE'
  },
  SnapshotId: 'STRING_VALUE' /* required */
};
gamesparks.startGeneratedCodeJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • Generator — (map)

      Properties of the generator to use for the job.

      • GameSdkVersion — (String)

        The target version of the GameSparks Game SDK.

      • Language — (String)

        The programming language for the generated code.

        Not all languages are supported for each platform. For cases where multiple languages are supported, this parameter specifies the language to be used. If this value is omitted, the default language for the target platform will be used.

      • TargetPlatform — (String)

        The platform that will be used to run the generated code.

    • SnapshotId — (String)

      The identifier of the snapshot for which to generate code.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GeneratedCodeJobId — (String)

        The identifier of the code generation job. You can use this identifier in the GetGeneratedCodeJob operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startStageDeployment(params = {}, callback) ⇒ AWS.Request

Deploys a snapshot to the stage and creates a new game runtime.

After you call this operation, you can check the deployment status by using GetStageDeployment.

If there are any players connected to the previous game runtime, then both runtimes persist. Existing connections to the previous runtime are maintained. When players disconnect and reconnect, they connect to the new runtime. After there are no connections to the previous game runtime, it is deleted.

Service Reference:

Examples:

Calling the startStageDeployment operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE'
};
gamesparks.startStageDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      A client-defined token. With an active client token in the request, this action is idempotent.

    • GameName — (String)

      The name of the game.

    • SnapshotId — (String)

      The identifier of the snapshot to deploy.

    • StageName — (String)

      The name of the stage to deploy the snapshot onto.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StageDeployment — (map)

        Properties that describe the stage deployment.

        • Created — (Date)

          The timestamp of when the stage deployment was created.

        • DeploymentAction — (String)

          The type of action of the stage deployment.

          Possible values include:
          • "DEPLOY"
          • "UNDEPLOY"
        • DeploymentId — (String)

          The identifier of the deployment.

        • DeploymentResult — (map)

          The result of the deployment.

          • Message — (String)

            Details about the deployment result.

          • ResultCode — (String)

            The type of deployment result.

            Possible values include:
            • "SUCCESS"
            • "INVALID_ROLE_FAILURE"
            • "UNSPECIFIED_FAILURE"
        • DeploymentState — (String)

          The state of the deployment.

          Possible values include:
          • "PENDING"
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
        • LastUpdated — (Date)

          The timestamp of when the deployment was last updated.

        • SnapshotId — (String)

          The identifier of the snapshot associated with the stage deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds tags to a GameSparks resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
gamesparks.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the resource to add the tags to.

    • tags — (map<String>)

      The tags to add to the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes tags from a GameSparks resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
gamesparks.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the resource to remove the tags from.

    • tagKeys — (Array<String>)

      The keys of the tags to remove.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGame(params = {}, callback) ⇒ AWS.Request

Updates details of the game.

Service Reference:

Examples:

Calling the updateGame operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
gamesparks.updateGame(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      The description of the game.

    • GameName — (String)

      The name of the game.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Game — (map)

        The details of the game.

        • Arn — (String)

          The Amazon Resource Name (ARN) of this game.

        • Created — (Date)

          The date when the game was created.

        • Description — (String)

          The description of the game.

        • EnableTerminationProtection — (Boolean)

          Determines if the game can be deleted.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Name — (String)

          The name of the game.

        • State — (String)

          The state of the game.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the game.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGameConfiguration(params = {}, callback) ⇒ AWS.Request

Updates one or more sections of the game configuration.

Service Reference:

Examples:

Calling the updateGameConfiguration operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  Modifications: [ /* required */
    {
      Operation: ADD | REMOVE | REPLACE, /* required */
      Path: 'STRING_VALUE', /* required */
      Section: 'STRING_VALUE', /* required */
      Value: {
      }
    },
    /* more items */
  ]
};
gamesparks.updateGameConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GameName — (String)

      The name of the game.

    • Modifications — (Array<map>)

      The list of modifications to make.

      • Operationrequired — (String)

        The operation to be performed on a configuration section.

        Content can be added, deleted, or replaced within a section.

        Possible values include:
        • "ADD"
        • "REMOVE"
        • "REPLACE"
      • Pathrequired — (String)

        The path within the section content to be modified.

      • Sectionrequired — (String)

        The name of the section to be modified.

      • Value — (map)

        For add and replace operations, this is the value that will be used.

        This field should be omitted for delete operations.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GameConfiguration — (map)

        Details about the game configuration.

        • Created — (Date)

          The date when the game was created.

        • LastUpdated — (Date)

          The date when the game was last modified.

        • Sections — (map<map>)

          Configuration data, organized by section name.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSnapshot(params = {}, callback) ⇒ AWS.Request

Updates the metadata of a GameSparks snapshot.

Service Reference:

Examples:

Calling the updateSnapshot operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
gamesparks.updateSnapshot(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      The description of the snapshot.

    • GameName — (String)

      The name of the game.

    • SnapshotId — (String)

      The identifier of the snapshot.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Snapshot — (map)

        Properties that provide details of the updated snapshot.

        • Created — (Date)

          The timestamp of when the snapshot was created.

        • Description — (String)

          The description of the snapshot.

        • Id — (String)

          The identifier of the snapshot.

        • LastUpdated — (Date)

          The timestamp of when the snapshot was last updated.

        • Sections — (map<map>)

          The sections in the snapshot.

          • Attributes — (map)

            The content of a configuration section.

          • Name — (String)

            The name of the section.

          • Size — (Integer)

            The size, in bytes, of the section contents.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateStage(params = {}, callback) ⇒ AWS.Request

Updates the metadata of a stage.

Service Reference:

Examples:

Calling the updateStage operation

var params = {
  GameName: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  Role: 'STRING_VALUE'
};
gamesparks.updateStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      The description of the stage.

    • GameName — (String)

      The name of the game.

    • Role — (String)

      The Amazon Resource Name (ARN) of the role to use for the game snapshots deployed to this stage.

    • StageName — (String)

      The name of the stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Stage — (map)

        Properties that provide details of the updated stage.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the stage.

        • Created — (Date)

          The timestamp of when the stage was created.

        • Description — (String)

          The description of the stage.

        • GameKey — (String)

          The game key associated with the stage.

          The game key is a unique identifier that the game client uses to connect to the GameSparks backend.

        • LastUpdated — (Date)

          The timestamp of when the stage was last updated.

        • LogGroup — (String)

          The Amazon CloudWatch log group for game runtimes deployed to the stage.

        • Name — (String)

          The name of the stage.

        • Role — (String)

          The Amazon Resource Name (ARN) of the role used to run the game runtimes deployed to the stage.

        • State — (String)

          The state of the stage.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
        • Tags — (map<String>)

          The tags associated with the stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.