GameSparks

2022/05/19 - GameSparks - 3 updated api methods

Changes  This release adds an optional DeploymentResult field in the responses of GetStageDeploymentIntegrationTests and ListStageDeploymentIntegrationTests APIs.

GetStageDeployment (updated) Link ¶
Changes (response)
{'StageDeployment': {'DeploymentResult': {'Message': 'string',
                                          'ResultCode': 'SUCCESS | '
                                                        'INVALID_ROLE_FAILURE '
                                                        '| '
                                                        'UNSPECIFIED_FAILURE'}}}

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',
        'DeploymentResult': {
            'Message': 'string',
            'ResultCode': 'SUCCESS'|'INVALID_ROLE_FAILURE'|'UNSPECIFIED_FAILURE'
        },
        '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.

      • DeploymentResult (dict) --

        The result of the deployment.

        • Message (string) --

          Details about the deployment result.

        • ResultCode (string) --

          The type of deployment result.

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

ListStageDeployments (updated) Link ¶
Changes (response)
{'StageDeployments': {'DeploymentResult': {'Message': 'string',
                                           'ResultCode': 'SUCCESS | '
                                                         'INVALID_ROLE_FAILURE '
                                                         '| '
                                                         'UNSPECIFIED_FAILURE'}}}

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',
            'DeploymentResult': {
                'Message': 'string',
                'ResultCode': 'SUCCESS'|'INVALID_ROLE_FAILURE'|'UNSPECIFIED_FAILURE'
            },
            '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.

        • DeploymentResult (dict) --

          The result of the deployment.

          • Message (string) --

            Details about the deployment result.

          • ResultCode (string) --

            The type of deployment result.

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

StartStageDeployment (updated) Link ¶
Changes (response)
{'StageDeployment': {'DeploymentResult': {'Message': 'string',
                                          'ResultCode': 'SUCCESS | '
                                                        'INVALID_ROLE_FAILURE '
                                                        '| '
                                                        'UNSPECIFIED_FAILURE'}}}

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',
        'DeploymentResult': {
            'Message': 'string',
            'ResultCode': 'SUCCESS'|'INVALID_ROLE_FAILURE'|'UNSPECIFIED_FAILURE'
        },
        '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.

      • DeploymentResult (dict) --

        The result of the deployment.

        • Message (string) --

          Details about the deployment result.

        • ResultCode (string) --

          The type of deployment result.

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