GameSparks

2022/03/23 - GameSparks - 33 new api methods

Changes  Released the preview of Amazon GameSparks, a fully managed AWS service that provides a multi-service backend for game developers.

GetExtension (new) Link ¶

Gets details about a specified extension.

See also: AWS API Documentation

Request Syntax

client.get_extension(
    Name='string',
    Namespace='string'
)
type Name

string

param Name

[REQUIRED]

The name of the extension.

type Namespace

string

param Namespace

[REQUIRED]

The namespace (qualifier) of the extension.

rtype

dict

returns

Response Syntax

{
    'Extension': {
        'Description': 'string',
        'Name': 'string',
        'Namespace': 'string'
    }
}

Response Structure

  • (dict) --

    • Extension (dict) --

      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.

ListStages (new) Link ¶

Gets a paginated list of stage summaries from the game.

See also: AWS API Documentation

Request Syntax

client.list_stages(
    GameName='string',
    MaxResults=123,
    NextToken='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'Stages': [
        {
            'Description': 'string',
            'GameKey': 'string',
            'Name': 'string',
            'State': 'ACTIVE'|'DELETING',
            'Tags': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • 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 (list) --

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

      • (dict) --

        The summary of the properties of a stage.

        • 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.

        • Tags (dict) --

          The tags associated with the stage.

          • (string) --

            • (string) --

GetSnapshot (new) Link ¶

Gets a copy of the game configuration in a snapshot.

See also: AWS API Documentation

Request Syntax

client.get_snapshot(
    GameName='string',
    Sections=[
        'string',
    ],
    SnapshotId='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Sections

list

param Sections

The list of game configuration sections to be described.

  • (string) --

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot.

rtype

dict

returns

Response Syntax

{
    'Snapshot': {
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'Id': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • Snapshot (dict) --

      Properties that provide details of the snapshot.

      • Created (datetime) --

        The timestamp of when the snapshot was created.

      • Description (string) --

        The description of the snapshot.

      • Id (string) --

        The identifier of the snapshot.

      • LastUpdated (datetime) --

        The timestamp of when the snapshot was last updated.

      • Sections (dict) --

        The sections in the snapshot.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.

ListExtensions (new) Link ¶

Gets a paginated list of available extensions.

Extensions provide features that games can use from scripts.

See also: AWS API Documentation

Request Syntax

client.list_extensions(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'Extensions': [
        {
            'Description': 'string',
            'Name': 'string',
            'Namespace': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Extensions (list) --

      The list of extensions.

      • (dict) --

        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.

    • 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.

CreateGame (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.create_game(
    ClientToken='string',
    Description='string',
    GameName='string',
    Tags={
        'string': 'string'
    }
)
type ClientToken

string

param ClientToken

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

type Description

string

param Description

The description of the game.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Tags

dict

param Tags

The list of tags to apply to the game.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Game': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'EnableTerminationProtection': True|False,
        'LastUpdated': datetime(2015, 1, 1),
        'Name': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Game (dict) --

      Details about the game that was created.

      • Arn (string) --

        The Amazon Resource Name (ARN) of this game.

      • Created (datetime) --

        The date when the game was created.

      • Description (string) --

        The description of the game.

      • EnableTerminationProtection (boolean) --

        Determines if the game can be deleted.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Name (string) --

        The name of the game.

      • State (string) --

        The state of the game.

      • Tags (dict) --

        The tags associated with the game.

        • (string) --

          • (string) --

TagResource (new) Link ¶

Adds tags to a GameSparks resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    tags={
        'string': 'string'
    }
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

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

type tags

dict

param tags

[REQUIRED]

The tags to add to the resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteGame (new) Link ¶

Deletes a game.

See also: AWS API Documentation

Request Syntax

client.delete_game(
    GameName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetStage (new) Link ¶

Gets information about a stage.

See also: AWS API Documentation

Request Syntax

client.get_stage(
    GameName='string',
    StageName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'Stage': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'GameKey': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'LogGroup': 'string',
        'Name': 'string',
        'Role': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Stage (dict) --

      Properties that provide details of the stage.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the stage.

      • Created (datetime) --

        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 (datetime) --

        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.

      • Tags (dict) --

        The tags associated with the stage.

        • (string) --

          • (string) --

GetGeneratedCodeJob (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_generated_code_job(
    GameName='string',
    JobId='string',
    SnapshotId='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type JobId

string

param JobId

[REQUIRED]

The identifier of the code generation job.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot for the code generation job.

rtype

dict

returns

Response Syntax

{
    'GeneratedCodeJob': {
        'Description': 'string',
        'ExpirationTime': datetime(2015, 1, 1),
        'GeneratedCodeJobId': 'string',
        'S3Url': 'string',
        'Status': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'PENDING'
    }
}

Response Structure

  • (dict) --

    • GeneratedCodeJob (dict) --

      Details about the generated code job.

      • Description (string) --

        The description of the generated code job.

      • ExpirationTime (datetime) --

        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

DisconnectPlayer (new) Link ¶

Disconnects a player from the game runtime.

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

See also: AWS API Documentation

Request Syntax

client.disconnect_player(
    GameName='string',
    PlayerId='string',
    StageName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type PlayerId

string

param PlayerId

[REQUIRED]

The unique identifier representing a player.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'DisconnectFailures': [
        'string',
    ],
    'DisconnectSuccesses': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • DisconnectFailures (list) --

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

      • (string) --

    • DisconnectSuccesses (list) --

      The list of the connection ids that were disconnected.

      • (string) --

ListTagsForResource (new) Link ¶

Lists the tags associated with a GameSparks resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The tags associated with the resource.

      • (string) --

        • (string) --

StartGeneratedCodeJob (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.start_generated_code_job(
    GameName='string',
    Generator={
        'GameSdkVersion': 'string',
        'Language': 'string',
        'TargetPlatform': 'string'
    },
    SnapshotId='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Generator

dict

param Generator

[REQUIRED]

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.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot for which to generate code.

rtype

dict

returns

Response Syntax

{
    'GeneratedCodeJobId': 'string'
}

Response Structure

  • (dict) --

    • GeneratedCodeJobId (string) --

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

UntagResource (new) Link ¶

Removes tags from a GameSparks resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    tagKeys=[
        'string',
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

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

type tagKeys

list

param tagKeys

[REQUIRED]

The keys of the tags to remove.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetStageDeployment (new) Link ¶

Gets information about a stage deployment.

See also: AWS API Documentation

Request Syntax

client.get_stage_deployment(
    DeploymentId='string',
    GameName='string',
    StageName='string'
)
type DeploymentId

string

param DeploymentId

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

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'StageDeployment': {
        'Created': datetime(2015, 1, 1),
        'DeploymentAction': 'DEPLOY'|'UNDEPLOY',
        'DeploymentId': 'string',
        'DeploymentState': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
        'LastUpdated': datetime(2015, 1, 1),
        'SnapshotId': 'string'
    }
}

Response Structure

  • (dict) --

    • StageDeployment (dict) --

      Properties that provide details of the stage deployment.

      • Created (datetime) --

        The timestamp of when the stage deployment was created.

      • DeploymentAction (string) --

        The type of action of the stage deployment.

      • DeploymentId (string) --

        The identifier of the deployment.

      • DeploymentState (string) --

        The state of the deployment.

      • LastUpdated (datetime) --

        The timestamp of when the deployment was last updated.

      • SnapshotId (string) --

        The identifier of the snapshot associated with the stage deployment.

CreateSnapshot (new) Link ¶

Creates a snapshot of the game configuration.

See also: AWS API Documentation

Request Syntax

client.create_snapshot(
    Description='string',
    GameName='string'
)
type Description

string

param Description

The description of the snapshot.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

rtype

dict

returns

Response Syntax

{
    'Snapshot': {
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'Id': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • Snapshot (dict) --

      Properties that provide details of the created snapshot.

      • Created (datetime) --

        The timestamp of when the snapshot was created.

      • Description (string) --

        The description of the snapshot.

      • Id (string) --

        The identifier of the snapshot.

      • LastUpdated (datetime) --

        The timestamp of when the snapshot was last updated.

      • Sections (dict) --

        The sections in the snapshot.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.

ImportGameConfiguration (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.import_game_configuration(
    GameName='string',
    ImportSource={
        'File': b'bytes'
    }
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type ImportSource

dict

param ImportSource

[REQUIRED]

The source used to import configuration sections.

  • File (bytes) -- [REQUIRED]

    The JSON string containing the configuration sections.

rtype

dict

returns

Response Syntax

{
    'GameConfiguration': {
        'Created': datetime(2015, 1, 1),
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • GameConfiguration (dict) --

      Details about the game configuration.

      • Created (datetime) --

        The date when the game was created.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Sections (dict) --

        Configuration data, organized by section name.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.

ListSnapshots (new) Link ¶

Gets a paginated list of snapshot summaries from the game.

See also: AWS API Documentation

Request Syntax

client.list_snapshots(
    GameName='string',
    MaxResults=123,
    NextToken='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'Snapshots': [
        {
            'Created': datetime(2015, 1, 1),
            'Description': 'string',
            'Id': 'string',
            'LastUpdated': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • 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 (list) --

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

      • (dict) --

        The summary of the properties of a snapshot.

        • Created (datetime) --

          The timestamp of when the snapshot was created.

        • Description (string) --

          The description of the snapshot.

        • Id (string) --

          The identifier of the snapshot.

        • LastUpdated (datetime) --

          Then timestamp of when the snapshot was last updated.

ListGames (new) Link ¶

Gets a paginated list of games.

See also: AWS API Documentation

Request Syntax

client.list_games(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'Games': [
        {
            'Description': 'string',
            'Name': 'string',
            'State': 'ACTIVE'|'DELETING',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Games (list) --

      The list of games.

      • (dict) --

        The summary of the properties of a game.

        • Description (string) --

          The description of the game.

        • Name (string) --

          The name of the game.

        • State (string) --

          The state of the game.

        • Tags (dict) --

          The tags associated with the game.

          • (string) --

            • (string) --

    • 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.

ListStageDeployments (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_stage_deployments(
    GameName='string',
    MaxResults=123,
    NextToken='string',
    StageName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'StageDeployments': [
        {
            'DeploymentAction': 'DEPLOY'|'UNDEPLOY',
            'DeploymentId': 'string',
            'DeploymentState': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
            'LastUpdated': datetime(2015, 1, 1),
            'SnapshotId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • 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 (list) --

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

      • (dict) --

        The summary of the properties of a stage deployment.

        • DeploymentAction (string) --

          The type of action of the deployment.

        • DeploymentId (string) --

          The identifier of the deployment.

        • DeploymentState (string) --

          The state of the deployment.

        • LastUpdated (datetime) --

          The timestamp of when the deployment was last updated.

        • SnapshotId (string) --

          The identifier of the snapshot associated with the stage deployment.

GetExtensionVersion (new) Link ¶

Gets details about a specified extension version.

See also: AWS API Documentation

Request Syntax

client.get_extension_version(
    ExtensionVersion='string',
    Name='string',
    Namespace='string'
)
type ExtensionVersion

string

param ExtensionVersion

[REQUIRED]

The version of the extension.

type Name

string

param Name

[REQUIRED]

The name of the extension.

type Namespace

string

param Namespace

[REQUIRED]

The namespace (qualifier) of the extension.

rtype

dict

returns

Response Syntax

{
    'ExtensionVersion': {
        'Name': 'string',
        'Namespace': 'string',
        'Schema': 'string',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    • ExtensionVersion (dict) --

      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.

ListGeneratedCodeJobs (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_generated_code_jobs(
    GameName='string',
    MaxResults=123,
    NextToken='string',
    SnapshotId='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type NextToken

string

param NextToken

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.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot.

rtype

dict

returns

Response Syntax

{
    'GeneratedCodeJobs': [
        {
            'Description': 'string',
            'ExpirationTime': datetime(2015, 1, 1),
            'GeneratedCodeJobId': 'string',
            'S3Url': 'string',
            'Status': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'PENDING'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • GeneratedCodeJobs (list) --

      The list of generated code jobs.

      • (dict) --

        Details about a generated code job.

        • Description (string) --

          The description of the generated code job.

        • ExpirationTime (datetime) --

          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

    • 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.

StartStageDeployment (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.start_stage_deployment(
    ClientToken='string',
    GameName='string',
    SnapshotId='string',
    StageName='string'
)
type ClientToken

string

param ClientToken

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

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot to deploy.

type StageName

string

param StageName

[REQUIRED]

The name of the stage to deploy the snapshot onto.

rtype

dict

returns

Response Syntax

{
    'StageDeployment': {
        'Created': datetime(2015, 1, 1),
        'DeploymentAction': 'DEPLOY'|'UNDEPLOY',
        'DeploymentId': 'string',
        'DeploymentState': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
        'LastUpdated': datetime(2015, 1, 1),
        'SnapshotId': 'string'
    }
}

Response Structure

  • (dict) --

    • StageDeployment (dict) --

      Properties that describe the stage deployment.

      • Created (datetime) --

        The timestamp of when the stage deployment was created.

      • DeploymentAction (string) --

        The type of action of the stage deployment.

      • DeploymentId (string) --

        The identifier of the deployment.

      • DeploymentState (string) --

        The state of the deployment.

      • LastUpdated (datetime) --

        The timestamp of when the deployment was last updated.

      • SnapshotId (string) --

        The identifier of the snapshot associated with the stage deployment.

UpdateGame (new) Link ¶

Updates details of the game.

See also: AWS API Documentation

Request Syntax

client.update_game(
    Description='string',
    GameName='string'
)
type Description

string

param Description

The description of the game.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

rtype

dict

returns

Response Syntax

{
    'Game': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'EnableTerminationProtection': True|False,
        'LastUpdated': datetime(2015, 1, 1),
        'Name': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Game (dict) --

      The details of the game.

      • Arn (string) --

        The Amazon Resource Name (ARN) of this game.

      • Created (datetime) --

        The date when the game was created.

      • Description (string) --

        The description of the game.

      • EnableTerminationProtection (boolean) --

        Determines if the game can be deleted.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Name (string) --

        The name of the game.

      • State (string) --

        The state of the game.

      • Tags (dict) --

        The tags associated with the game.

        • (string) --

          • (string) --

ExportSnapshot (new) Link ¶

Exports a game configuration snapshot.

See also: AWS API Documentation

Request Syntax

client.export_snapshot(
    GameName='string',
    SnapshotId='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot to export.

rtype

dict

returns

Response Syntax

{
    'S3Url': 'string'
}

Response Structure

  • (dict) --

    • 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.

CreateStage (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.create_stage(
    ClientToken='string',
    Description='string',
    GameName='string',
    Role='string',
    StageName='string',
    Tags={
        'string': 'string'
    }
)
type ClientToken

string

param ClientToken

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

type Description

string

param Description

The description of the stage.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Role

string

param Role

[REQUIRED]

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.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

type Tags

dict

param Tags

The list of tags to apply to the stage.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Stage': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'GameKey': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'LogGroup': 'string',
        'Name': 'string',
        'Role': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Stage (dict) --

      Properties that describe the stage.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the stage.

      • Created (datetime) --

        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 (datetime) --

        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.

      • Tags (dict) --

        The tags associated with the stage.

        • (string) --

          • (string) --

UpdateStage (new) Link ¶

Updates the metadata of a stage.

See also: AWS API Documentation

Request Syntax

client.update_stage(
    Description='string',
    GameName='string',
    Role='string',
    StageName='string'
)
type Description

string

param Description

The description of the stage.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Role

string

param Role

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

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'Stage': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'GameKey': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'LogGroup': 'string',
        'Name': 'string',
        'Role': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Stage (dict) --

      Properties that provide details of the updated stage.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the stage.

      • Created (datetime) --

        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 (datetime) --

        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.

      • Tags (dict) --

        The tags associated with the stage.

        • (string) --

          • (string) --

ListExtensionVersions (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.list_extension_versions(
    MaxResults=123,
    Name='string',
    Namespace='string',
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return.

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

type Name

string

param Name

[REQUIRED]

The name of the extension.

type Namespace

string

param Namespace

[REQUIRED]

The namespace (qualifier) of the extension.

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'ExtensionVersions': [
        {
            'Name': 'string',
            'Namespace': 'string',
            'Schema': 'string',
            'Version': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ExtensionVersions (list) --

      The list of extension versions.

      • (dict) --

        Details about the extension version.

        • 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.

DeleteStage (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.delete_stage(
    GameName='string',
    StageName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type StageName

string

param StageName

[REQUIRED]

The name of the stage to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetGame (new) Link ¶

Gets details about a game.

See also: AWS API Documentation

Request Syntax

client.get_game(
    GameName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

rtype

dict

returns

Response Syntax

{
    'Game': {
        'Arn': 'string',
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'EnableTerminationProtection': True|False,
        'LastUpdated': datetime(2015, 1, 1),
        'Name': 'string',
        'State': 'ACTIVE'|'DELETING',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Game (dict) --

      The details of the game.

      • Arn (string) --

        The Amazon Resource Name (ARN) of this game.

      • Created (datetime) --

        The date when the game was created.

      • Description (string) --

        The description of the game.

      • EnableTerminationProtection (boolean) --

        Determines if the game can be deleted.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Name (string) --

        The name of the game.

      • State (string) --

        The state of the game.

      • Tags (dict) --

        The tags associated with the game.

        • (string) --

          • (string) --

GetPlayerConnectionStatus (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.get_player_connection_status(
    GameName='string',
    PlayerId='string',
    StageName='string'
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type PlayerId

string

param PlayerId

[REQUIRED]

The unique identifier representing a player.

type StageName

string

param StageName

[REQUIRED]

The name of the stage.

rtype

dict

returns

Response Syntax

{
    'Connections': [
        {
            'Created': datetime(2015, 1, 1),
            'Id': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Connections (list) --

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

      • (dict) --

        Details about a WebSocket connection.

        • Created (datetime) --

          The date and time when the connection was created.

        • Id (string) --

          The identifier used to indicate a specific WebSocket connection.

UpdateSnapshot (new) Link ¶

Updates the metadata of a GameSparks snapshot.

See also: AWS API Documentation

Request Syntax

client.update_snapshot(
    Description='string',
    GameName='string',
    SnapshotId='string'
)
type Description

string

param Description

The description of the snapshot.

type GameName

string

param GameName

[REQUIRED]

The name of the game.

type SnapshotId

string

param SnapshotId

[REQUIRED]

The identifier of the snapshot.

rtype

dict

returns

Response Syntax

{
    'Snapshot': {
        'Created': datetime(2015, 1, 1),
        'Description': 'string',
        'Id': 'string',
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • Snapshot (dict) --

      Properties that provide details of the updated snapshot.

      • Created (datetime) --

        The timestamp of when the snapshot was created.

      • Description (string) --

        The description of the snapshot.

      • Id (string) --

        The identifier of the snapshot.

      • LastUpdated (datetime) --

        The timestamp of when the snapshot was last updated.

      • Sections (dict) --

        The sections in the snapshot.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.

GetGameConfiguration (new) Link ¶

Gets the configuration of the game.

See also: AWS API Documentation

Request Syntax

client.get_game_configuration(
    GameName='string',
    Sections=[
        'string',
    ]
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Sections

list

param Sections

The list of sections to return.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'GameConfiguration': {
        'Created': datetime(2015, 1, 1),
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • GameConfiguration (dict) --

      Details about the game configuration.

      • Created (datetime) --

        The date when the game was created.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Sections (dict) --

        Configuration data, organized by section name.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.

UpdateGameConfiguration (new) Link ¶

Updates one or more sections of the game configuration.

See also: AWS API Documentation

Request Syntax

client.update_game_configuration(
    GameName='string',
    Modifications=[
        {
            'Operation': 'ADD'|'REMOVE'|'REPLACE',
            'Path': 'string',
            'Section': 'string',
            'Value': {...}|[...]|123|123.4|'string'|True|None
        },
    ]
)
type GameName

string

param GameName

[REQUIRED]

The name of the game.

type Modifications

list

param Modifications

[REQUIRED]

The list of modifications to make.

  • (dict) --

    A single modification to the configuration section.

    • Operation (string) -- [REQUIRED]

      The operation to be performed on a configuration section.

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

    • Path (string) -- [REQUIRED]

      The path within the section content to be modified.

    • Section (string) -- [REQUIRED]

      The name of the section to be modified.

    • Value (:ref:`document<document>`) --

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

      This field should be omitted for delete operations.

rtype

dict

returns

Response Syntax

{
    'GameConfiguration': {
        'Created': datetime(2015, 1, 1),
        'LastUpdated': datetime(2015, 1, 1),
        'Sections': {
            'string': {
                'Attributes': {...}|[...]|123|123.4|'string'|True|None,
                'Name': 'string',
                'Size': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • GameConfiguration (dict) --

      Details about the game configuration.

      • Created (datetime) --

        The date when the game was created.

      • LastUpdated (datetime) --

        The date when the game was last modified.

      • Sections (dict) --

        Configuration data, organized by section name.

        • (string) --

          • (dict) --

            The configuration section.

            • Attributes (:ref:`document<document>`) --

              The content of a configuration section.

            • Name (string) --

              The name of the section.

            • Size (integer) --

              The size, in bytes, of the section contents.