Table of Contents
A low-level client representing GameSparks
import boto3
client = boto3.client('gamesparks')
These are the available methods:
Check if an operation can be paginated.
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
response = client.create_game(
ClientToken='string',
Description='string',
GameName='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The name of the game.
The list of tags to apply to the game.
dict
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.
Exceptions
Creates a snapshot of the game configuration.
See also: AWS API Documentation
Request Syntax
response = client.create_snapshot(
Description='string',
GameName='string'
)
[REQUIRED]
The name of the game.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
Creates a new stage for stage-by-stage game development and deployment.
See also: AWS API Documentation
Request Syntax
response = client.create_stage(
ClientToken='string',
Description='string',
GameName='string',
Role='string',
StageName='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The name of the game.
[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.
[REQUIRED]
The name of the stage.
The list of tags to apply to the stage.
dict
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.
Exceptions
Deletes a game.
See also: AWS API Documentation
Request Syntax
response = client.delete_game(
GameName='string'
)
[REQUIRED]
The name of the game to delete.
{}
Response Structure
Exceptions
Deletes a stage from a game, along with the associated game runtime.
See also: AWS API Documentation
Request Syntax
response = client.delete_stage(
GameName='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The name of the stage to delete.
dict
Response Syntax
{}
Response Structure
Exceptions
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
response = client.disconnect_player(
GameName='string',
PlayerId='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The unique identifier representing a player.
[REQUIRED]
The name of the stage.
dict
Response Syntax
{
'DisconnectFailures': [
'string',
],
'DisconnectSuccesses': [
'string',
]
}
Response Structure
(dict) --
DisconnectFailures (list) --
The list of the connection ids that could not be disconnected.
DisconnectSuccesses (list) --
The list of the connection ids that were disconnected.
Exceptions
Exports a game configuration snapshot.
See also: AWS API Documentation
Request Syntax
response = client.export_snapshot(
GameName='string',
SnapshotId='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The identifier of the snapshot to export.
dict
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.
Exceptions
Gets details about a specified extension.
See also: AWS API Documentation
Request Syntax
response = client.get_extension(
Name='string',
Namespace='string'
)
[REQUIRED]
The name of the extension.
[REQUIRED]
The namespace (qualifier) of the extension.
dict
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.
Exceptions
Gets details about a specified extension version.
See also: AWS API Documentation
Request Syntax
response = client.get_extension_version(
ExtensionVersion='string',
Name='string',
Namespace='string'
)
[REQUIRED]
The version of the extension.
[REQUIRED]
The name of the extension.
[REQUIRED]
The namespace (qualifier) of the extension.
dict
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.
Exceptions
Gets details about a game.
See also: AWS API Documentation
Request Syntax
response = client.get_game(
GameName='string'
)
[REQUIRED]
The name of the game.
{
'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
The details of the game.
The Amazon Resource Name (ARN) of this game.
The date when the game was created.
The description of the game.
Determines if the game can be deleted.
The date when the game was last modified.
The name of the game.
The state of the game.
The tags associated with the game.
Exceptions
Gets the configuration of the game.
See also: AWS API Documentation
Request Syntax
response = client.get_game_configuration(
GameName='string',
Sections=[
'string',
]
)
[REQUIRED]
The name of the game.
The list of sections to return.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
Gets details about a job that is generating code for a snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_generated_code_job(
GameName='string',
JobId='string',
SnapshotId='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The identifier of the code generation job.
[REQUIRED]
The identifier of the snapshot for the code generation job.
dict
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
Exceptions
Create a paginator for an operation.
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
response = client.get_player_connection_status(
GameName='string',
PlayerId='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The unique identifier representing a player.
[REQUIRED]
The name of the stage.
dict
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.
Exceptions
Gets a copy of the game configuration in a snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_snapshot(
GameName='string',
Sections=[
'string',
],
SnapshotId='string'
)
[REQUIRED]
The name of the game.
The list of game configuration sections to be described.
[REQUIRED]
The identifier of the snapshot.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
Gets information about a stage.
See also: AWS API Documentation
Request Syntax
response = client.get_stage(
GameName='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The name of the stage.
dict
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.
Exceptions
Gets information about a stage deployment.
See also: AWS API Documentation
Request Syntax
response = client.get_stage_deployment(
DeploymentId='string',
GameName='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The name of the stage.
dict
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.
Exceptions
Returns an object that can wait for some condition.
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
response = client.import_game_configuration(
GameName='string',
ImportSource={
'File': b'bytes'
}
)
[REQUIRED]
The name of the game.
[REQUIRED]
The source used to import configuration sections.
The JSON string containing the configuration sections.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
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
response = client.list_extension_versions(
MaxResults=123,
Name='string',
Namespace='string',
NextToken='string'
)
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
[REQUIRED]
The name of the extension.
[REQUIRED]
The namespace (qualifier) of the extension.
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.
dict
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.
Exceptions
Gets a paginated list of available extensions.
Extensions provide features that games can use from scripts.
See also: AWS API Documentation
Request Syntax
response = client.list_extensions(
MaxResults=123,
NextToken='string'
)
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
dict
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.
Exceptions
Gets a paginated list of games.
See also: AWS API Documentation
Request Syntax
response = client.list_games(
MaxResults=123,
NextToken='string'
)
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
dict
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.
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.
Exceptions
Gets a paginated list of code generation jobs for a snapshot.
See also: AWS API Documentation
Request Syntax
response = client.list_generated_code_jobs(
GameName='string',
MaxResults=123,
NextToken='string',
SnapshotId='string'
)
[REQUIRED]
The name of the game.
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
[REQUIRED]
The identifier of the snapshot.
dict
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.
Exceptions
Gets a paginated list of snapshot summaries from the game.
See also: AWS API Documentation
Request Syntax
response = client.list_snapshots(
GameName='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The name of the game.
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
dict
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.
Exceptions
Gets a paginated list of stage deployment summaries from the game.
See also: AWS API Documentation
Request Syntax
response = client.list_stage_deployments(
GameName='string',
MaxResults=123,
NextToken='string',
StageName='string'
)
[REQUIRED]
The name of the game.
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
[REQUIRED]
The name of the stage.
dict
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.
Exceptions
Gets a paginated list of stage summaries from the game.
See also: AWS API Documentation
Request Syntax
response = client.list_stages(
GameName='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The name of the game.
The maximum number of results to return.
Use this parameter with NextToken to get results as a set of sequential pages.
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.
dict
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.
Exceptions
Lists the tags associated with a GameSparks resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the GameSparks resource.
{
'tags': {
'string': 'string'
}
}
Response Structure
The tags associated with the resource.
Exceptions
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
response = client.start_generated_code_job(
GameName='string',
Generator={
'GameSdkVersion': 'string',
'Language': 'string',
'TargetPlatform': 'string'
},
SnapshotId='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
Properties of the generator to use for the job.
The target version of the GameSparks Game SDK.
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.
The platform that will be used to run the generated code.
[REQUIRED]
The identifier of the snapshot for which to generate code.
dict
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.
Exceptions
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
response = client.start_stage_deployment(
ClientToken='string',
GameName='string',
SnapshotId='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The identifier of the snapshot to deploy.
[REQUIRED]
The name of the stage to deploy the snapshot onto.
dict
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.
Exceptions
Adds tags to a GameSparks resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to add the tags to.
[REQUIRED]
The tags to add to the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes tags from a GameSparks resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to remove the tags from.
[REQUIRED]
The keys of the tags to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates details of the game.
See also: AWS API Documentation
Request Syntax
response = client.update_game(
Description='string',
GameName='string'
)
[REQUIRED]
The name of the game.
dict
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.
Exceptions
Updates one or more sections of the game configuration.
See also: AWS API Documentation
Request Syntax
response = client.update_game_configuration(
GameName='string',
Modifications=[
{
'Operation': 'ADD'|'REMOVE'|'REPLACE',
'Path': 'string',
'Section': 'string',
'Value': {...}|[...]|123|123.4|'string'|True|None
},
]
)
[REQUIRED]
The name of the game.
[REQUIRED]
The list of modifications to make.
A single modification to the configuration section.
The operation to be performed on a configuration section.
Content can be added, deleted, or replaced within a section.
The path within the section content to be modified.
The name of the section to be modified.
For add and replace operations, this is the value that will be used.
This field should be omitted for delete operations.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
Updates the metadata of a GameSparks snapshot.
See also: AWS API Documentation
Request Syntax
response = client.update_snapshot(
Description='string',
GameName='string',
SnapshotId='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The identifier of the snapshot.
dict
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 (document) --
The content of a configuration section.
Name (string) --
The name of the section.
Size (integer) --
The size, in bytes, of the section contents.
Exceptions
Updates the metadata of a stage.
See also: AWS API Documentation
Request Syntax
response = client.update_stage(
Description='string',
GameName='string',
Role='string',
StageName='string'
)
[REQUIRED]
The name of the game.
[REQUIRED]
The name of the stage.
dict
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.
Exceptions
The available paginators are:
paginator = client.get_paginator('list_extension_versions')
Creates an iterator that will paginate through responses from GameSparks.Client.list_extension_versions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Name='string',
Namespace='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the extension.
[REQUIRED]
The namespace (qualifier) of the extension.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'ExtensionVersions': [
{
'Name': 'string',
'Namespace': 'string',
'Schema': 'string',
'Version': '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.
paginator = client.get_paginator('list_extensions')
Creates an iterator that will paginate through responses from GameSparks.Client.list_extensions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'Extensions': [
{
'Description': 'string',
'Name': 'string',
'Namespace': 'string'
},
],
}
Response Structure
The list of extensions.
Details about the extension.
The description of the extension.
The name of the extension.
The namespace (qualifier) of the extension.
paginator = client.get_paginator('list_games')
Creates an iterator that will paginate through responses from GameSparks.Client.list_games().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'Games': [
{
'Description': 'string',
'Name': 'string',
'State': 'ACTIVE'|'DELETING',
'Tags': {
'string': 'string'
}
},
],
}
Response Structure
The list of games.
The summary of the properties of a game.
The description of the game.
The name of the game.
The state of the game.
The tags associated with the game.
paginator = client.get_paginator('list_generated_code_jobs')
Creates an iterator that will paginate through responses from GameSparks.Client.list_generated_code_jobs().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
GameName='string',
SnapshotId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the game.
[REQUIRED]
The identifier of the snapshot.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'GeneratedCodeJobs': [
{
'Description': 'string',
'ExpirationTime': datetime(2015, 1, 1),
'GeneratedCodeJobId': 'string',
'S3Url': 'string',
'Status': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'PENDING'
},
],
}
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
paginator = client.get_paginator('list_snapshots')
Creates an iterator that will paginate through responses from GameSparks.Client.list_snapshots().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
GameName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the game.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Snapshots': [
{
'Created': datetime(2015, 1, 1),
'Description': 'string',
'Id': 'string',
'LastUpdated': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
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.
paginator = client.get_paginator('list_stage_deployments')
Creates an iterator that will paginate through responses from GameSparks.Client.list_stage_deployments().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
GameName='string',
StageName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the game.
[REQUIRED]
The name of the stage.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'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) --
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.
paginator = client.get_paginator('list_stages')
Creates an iterator that will paginate through responses from GameSparks.Client.list_stages().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
GameName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the game.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Stages': [
{
'Description': 'string',
'GameKey': 'string',
'Name': 'string',
'State': 'ACTIVE'|'DELETING',
'Tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
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.