Class: Aws::GameSparks::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb

Overview

An API client for GameSparks. To construct a client, you need to configure a :region and :credentials.

client = Aws::GameSparks::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



348
349
350
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 348

def initialize(*args)
  super
end

Instance Method Details

#create_game(params = {}) ⇒ Types::CreateGameResult

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

Examples:

Request syntax with placeholder values


resp = client.create_game({
  client_token: "ClientToken",
  description: "GameDescription",
  game_name: "GameName", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.game.arn #=> String
resp.game.created #=> Time
resp.game.description #=> String
resp.game.enable_termination_protection #=> Boolean
resp.game.last_updated #=> Time
resp.game.name #=> String
resp.game.state #=> String, one of "ACTIVE", "DELETING"
resp.game.tags #=> Hash
resp.game.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

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

  • :description (String)

    The description of the game.

  • :game_name (required, String)

    The name of the game.

  • :tags (Hash<String,String>)

    The list of tags to apply to the game.

Returns:

See Also:



402
403
404
405
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 402

def create_game(params = {}, options = {})
  req = build_request(:create_game, params)
  req.send_request(options)
end

#create_snapshot(params = {}) ⇒ Types::CreateSnapshotResult

Creates a snapshot of the game configuration.

Examples:

Request syntax with placeholder values


resp = client.create_snapshot({
  description: "SnapshotDescription",
  game_name: "GameName", # required
})

Response structure


resp.snapshot.created #=> Time
resp.snapshot.description #=> String
resp.snapshot.id #=> String
resp.snapshot.last_updated #=> Time
resp.snapshot.sections #=> Hash
resp.snapshot.sections["SectionName"].name #=> String
resp.snapshot.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    The description of the snapshot.

  • :game_name (required, String)

    The name of the game.

Returns:

See Also:



440
441
442
443
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 440

def create_snapshot(params = {}, options = {})
  req = build_request(:create_snapshot, params)
  req.send_request(options)
end

#create_stage(params = {}) ⇒ Types::CreateStageResult

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

Examples:

Request syntax with placeholder values


resp = client.create_stage({
  client_token: "ClientToken",
  description: "StageDescription",
  game_name: "GameName", # required
  role: "RoleARN", # required
  stage_name: "StageName", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.stage.arn #=> String
resp.stage.created #=> Time
resp.stage.description #=> String
resp.stage.game_key #=> String
resp.stage.last_updated #=> Time
resp.stage.log_group #=> String
resp.stage.name #=> String
resp.stage.role #=> String
resp.stage.state #=> String, one of "ACTIVE", "DELETING"
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

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

  • :description (String)

    The description of the stage.

  • :game_name (required, String)

    The name of the game.

  • :role (required, String)

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

  • :stage_name (required, String)

    The name of the stage.

  • :tags (Hash<String,String>)

    The list of tags to apply to the stage.

Returns:

See Also:



504
505
506
507
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 504

def create_stage(params = {}, options = {})
  req = build_request(:create_stage, params)
  req.send_request(options)
end

#delete_game(params = {}) ⇒ Struct

Deletes a game.

Examples:

Request syntax with placeholder values


resp = client.delete_game({
  game_name: "GameName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



526
527
528
529
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 526

def delete_game(params = {}, options = {})
  req = build_request(:delete_game, params)
  req.send_request(options)
end

#delete_stage(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.delete_stage({
  game_name: "GameName", # required
  stage_name: "StageName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :stage_name (required, String)

    The name of the stage to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



552
553
554
555
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 552

def delete_stage(params = {}, options = {})
  req = build_request(:delete_stage, params)
  req.send_request(options)
end

#disconnect_player(params = {}) ⇒ Types::DisconnectPlayerResult

Disconnects a player from the game runtime.

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

Examples:

Request syntax with placeholder values


resp = client.disconnect_player({
  game_name: "GameName", # required
  player_id: "PlayerId", # required
  stage_name: "StageName", # required
})

Response structure


resp.disconnect_failures #=> Array
resp.disconnect_failures[0] #=> String
resp.disconnect_successes #=> Array
resp.disconnect_successes[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :player_id (required, String)

    The unique identifier representing a player.

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



595
596
597
598
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 595

def disconnect_player(params = {}, options = {})
  req = build_request(:disconnect_player, params)
  req.send_request(options)
end

#export_snapshot(params = {}) ⇒ Types::ExportSnapshotResult

Exports a game configuration snapshot.

Examples:

Request syntax with placeholder values


resp = client.export_snapshot({
  game_name: "GameName", # required
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.s3_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :snapshot_id (required, String)

    The identifier of the snapshot to export.

Returns:

See Also:



627
628
629
630
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 627

def export_snapshot(params = {}, options = {})
  req = build_request(:export_snapshot, params)
  req.send_request(options)
end

#get_extension(params = {}) ⇒ Types::GetExtensionResult

Gets details about a specified extension.

Examples:

Request syntax with placeholder values


resp = client.get_extension({
  name: "ExtensionName", # required
  namespace: "ExtensionNamespace", # required
})

Response structure


resp.extension.description #=> String
resp.extension.name #=> String
resp.extension.namespace #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the extension.

  • :namespace (required, String)

    The namespace (qualifier) of the extension.

Returns:

See Also:



661
662
663
664
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 661

def get_extension(params = {}, options = {})
  req = build_request(:get_extension, params)
  req.send_request(options)
end

#get_extension_version(params = {}) ⇒ Types::GetExtensionVersionResult

Gets details about a specified extension version.

Examples:

Request syntax with placeholder values


resp = client.get_extension_version({
  extension_version: "ExtensionVersion", # required
  name: "ExtensionName", # required
  namespace: "ExtensionNamespace", # required
})

Response structure


resp.extension_version.name #=> String
resp.extension_version.namespace #=> String
resp.extension_version.schema #=> String
resp.extension_version.version #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :extension_version (required, String)

    The version of the extension.

  • :name (required, String)

    The name of the extension.

  • :namespace (required, String)

    The namespace (qualifier) of the extension.

Returns:

See Also:



700
701
702
703
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 700

def get_extension_version(params = {}, options = {})
  req = build_request(:get_extension_version, params)
  req.send_request(options)
end

#get_game(params = {}) ⇒ Types::GetGameResult

Gets details about a game.

Examples:

Request syntax with placeholder values


resp = client.get_game({
  game_name: "GameName", # required
})

Response structure


resp.game.arn #=> String
resp.game.created #=> Time
resp.game.description #=> String
resp.game.enable_termination_protection #=> Boolean
resp.game.last_updated #=> Time
resp.game.name #=> String
resp.game.state #=> String, one of "ACTIVE", "DELETING"
resp.game.tags #=> Hash
resp.game.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

Returns:

See Also:



736
737
738
739
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 736

def get_game(params = {}, options = {})
  req = build_request(:get_game, params)
  req.send_request(options)
end

#get_game_configuration(params = {}) ⇒ Types::GetGameConfigurationResult

Gets the configuration of the game.

Examples:

Request syntax with placeholder values


resp = client.get_game_configuration({
  game_name: "GameName", # required
  sections: ["SectionName"],
})

Response structure


resp.game_configuration.created #=> Time
resp.game_configuration.last_updated #=> Time
resp.game_configuration.sections #=> Hash
resp.game_configuration.sections["SectionName"].name #=> String
resp.game_configuration.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :sections (Array<String>)

    The list of sections to return.

Returns:

See Also:



772
773
774
775
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 772

def get_game_configuration(params = {}, options = {})
  req = build_request(:get_game_configuration, params)
  req.send_request(options)
end

#get_generated_code_job(params = {}) ⇒ Types::GetGeneratedCodeJobResult

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

Examples:

Request syntax with placeholder values


resp = client.get_generated_code_job({
  game_name: "GameName", # required
  job_id: "GeneratedCodeJobId", # required
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.generated_code_job.description #=> String
resp.generated_code_job.expiration_time #=> Time
resp.generated_code_job.generated_code_job_id #=> String
resp.generated_code_job.s3_url #=> String
resp.generated_code_job.status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "PENDING"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :job_id (required, String)

    The identifier of the code generation job.

  • :snapshot_id (required, String)

    The identifier of the snapshot for the code generation job.

Returns:

See Also:



812
813
814
815
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 812

def get_generated_code_job(params = {}, options = {})
  req = build_request(:get_generated_code_job, params)
  req.send_request(options)
end

#get_player_connection_status(params = {}) ⇒ Types::GetPlayerConnectionStatusResult

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.

Examples:

Request syntax with placeholder values


resp = client.get_player_connection_status({
  game_name: "GameName", # required
  player_id: "PlayerId", # required
  stage_name: "StageName", # required
})

Response structure


resp.connections #=> Array
resp.connections[0].created #=> Time
resp.connections[0].id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :player_id (required, String)

    The unique identifier representing a player.

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



854
855
856
857
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 854

def get_player_connection_status(params = {}, options = {})
  req = build_request(:get_player_connection_status, params)
  req.send_request(options)
end

#get_snapshot(params = {}) ⇒ Types::GetSnapshotResult

Gets a copy of the game configuration in a snapshot.

Examples:

Request syntax with placeholder values


resp = client.get_snapshot({
  game_name: "GameName", # required
  sections: ["SectionName"],
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.snapshot.created #=> Time
resp.snapshot.description #=> String
resp.snapshot.id #=> String
resp.snapshot.last_updated #=> Time
resp.snapshot.sections #=> Hash
resp.snapshot.sections["SectionName"].name #=> String
resp.snapshot.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :sections (Array<String>)

    The list of game configuration sections to be described.

  • :snapshot_id (required, String)

    The identifier of the snapshot.

Returns:

See Also:



896
897
898
899
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 896

def get_snapshot(params = {}, options = {})
  req = build_request(:get_snapshot, params)
  req.send_request(options)
end

#get_stage(params = {}) ⇒ Types::GetStageResult

Gets information about a stage.

Examples:

Request syntax with placeholder values


resp = client.get_stage({
  game_name: "GameName", # required
  stage_name: "StageName", # required
})

Response structure


resp.stage.arn #=> String
resp.stage.created #=> Time
resp.stage.description #=> String
resp.stage.game_key #=> String
resp.stage.last_updated #=> Time
resp.stage.log_group #=> String
resp.stage.name #=> String
resp.stage.role #=> String
resp.stage.state #=> String, one of "ACTIVE", "DELETING"
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



938
939
940
941
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 938

def get_stage(params = {}, options = {})
  req = build_request(:get_stage, params)
  req.send_request(options)
end

#get_stage_deployment(params = {}) ⇒ Types::GetStageDeploymentResult

Gets information about a stage deployment.

Examples:

Request syntax with placeholder values


resp = client.get_stage_deployment({
  deployment_id: "DeploymentId",
  game_name: "GameName", # required
  stage_name: "StageName", # required
})

Response structure


resp.stage_deployment.created #=> Time
resp.stage_deployment.deployment_action #=> String, one of "DEPLOY", "UNDEPLOY"
resp.stage_deployment.deployment_id #=> String
resp.stage_deployment.deployment_result.message #=> String
resp.stage_deployment.deployment_result.result_code #=> String, one of "SUCCESS", "INVALID_ROLE_FAILURE", "UNSPECIFIED_FAILURE"
resp.stage_deployment.deployment_state #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"
resp.stage_deployment.last_updated #=> Time
resp.stage_deployment.snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :deployment_id (String)

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

  • :game_name (required, String)

    The name of the game.

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



982
983
984
985
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 982

def get_stage_deployment(params = {}, options = {})
  req = build_request(:get_stage_deployment, params)
  req.send_request(options)
end

#import_game_configuration(params = {}) ⇒ Types::ImportGameConfigurationResult

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.

Examples:

Request syntax with placeholder values


resp = client.import_game_configuration({
  game_name: "GameName", # required
  import_source: { # required
    file: "data", # required
  },
})

Response structure


resp.game_configuration.created #=> Time
resp.game_configuration.last_updated #=> Time
resp.game_configuration.sections #=> Hash
resp.game_configuration.sections["SectionName"].name #=> String
resp.game_configuration.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1025
1026
1027
1028
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1025

def import_game_configuration(params = {}, options = {})
  req = build_request(:import_game_configuration, params)
  req.send_request(options)
end

#list_extension_versions(params = {}) ⇒ Types::ListExtensionVersionsResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_extension_versions({
  max_results: 1,
  name: "ExtensionName", # required
  namespace: "ExtensionNamespace", # required
  next_token: "NextToken",
})

Response structure


resp.extension_versions #=> Array
resp.extension_versions[0].name #=> String
resp.extension_versions[0].namespace #=> String
resp.extension_versions[0].schema #=> String
resp.extension_versions[0].version #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :name (required, String)

    The name of the extension.

  • :namespace (required, String)

    The namespace (qualifier) of the extension.

  • :next_token (String)

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

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

Returns:

See Also:



1084
1085
1086
1087
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1084

def list_extension_versions(params = {}, options = {})
  req = build_request(:list_extension_versions, params)
  req.send_request(options)
end

#list_extensions(params = {}) ⇒ Types::ListExtensionsResult

Gets a paginated list of available extensions.

Extensions provide features that games can use from scripts.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_extensions({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.extensions #=> Array
resp.extensions[0].description #=> String
resp.extensions[0].name #=> String
resp.extensions[0].namespace #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

Returns:

See Also:



1132
1133
1134
1135
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1132

def list_extensions(params = {}, options = {})
  req = build_request(:list_extensions, params)
  req.send_request(options)
end

#list_games(params = {}) ⇒ Types::ListGamesResult

Gets a paginated list of games.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_games({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.games #=> Array
resp.games[0].description #=> String
resp.games[0].name #=> String
resp.games[0].state #=> String, one of "ACTIVE", "DELETING"
resp.games[0].tags #=> Hash
resp.games[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

Returns:

See Also:



1180
1181
1182
1183
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1180

def list_games(params = {}, options = {})
  req = build_request(:list_games, params)
  req.send_request(options)
end

#list_generated_code_jobs(params = {}) ⇒ Types::ListGeneratedCodeJobsResult

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_generated_code_jobs({
  game_name: "GameName", # required
  max_results: 1,
  next_token: "NextToken",
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.generated_code_jobs #=> Array
resp.generated_code_jobs[0].description #=> String
resp.generated_code_jobs[0].expiration_time #=> Time
resp.generated_code_jobs[0].generated_code_job_id #=> String
resp.generated_code_jobs[0].s3_url #=> String
resp.generated_code_jobs[0].status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "PENDING"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

  • :snapshot_id (required, String)

    The identifier of the snapshot.

Returns:

See Also:



1236
1237
1238
1239
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1236

def list_generated_code_jobs(params = {}, options = {})
  req = build_request(:list_generated_code_jobs, params)
  req.send_request(options)
end

#list_snapshots(params = {}) ⇒ Types::ListSnapshotsResult

Gets a paginated list of snapshot summaries from the game.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_snapshots({
  game_name: "GameName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.snapshots #=> Array
resp.snapshots[0].created #=> Time
resp.snapshots[0].description #=> String
resp.snapshots[0].id #=> String
resp.snapshots[0].last_updated #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

Returns:

See Also:



1287
1288
1289
1290
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1287

def list_snapshots(params = {}, options = {})
  req = build_request(:list_snapshots, params)
  req.send_request(options)
end

#list_stage_deployments(params = {}) ⇒ Types::ListStageDeploymentsResult

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_stage_deployments({
  game_name: "GameName", # required
  max_results: 1,
  next_token: "NextToken",
  stage_name: "StageName", # required
})

Response structure


resp.next_token #=> String
resp.stage_deployments #=> Array
resp.stage_deployments[0].deployment_action #=> String, one of "DEPLOY", "UNDEPLOY"
resp.stage_deployments[0].deployment_id #=> String
resp.stage_deployments[0].deployment_result.message #=> String
resp.stage_deployments[0].deployment_result.result_code #=> String, one of "SUCCESS", "INVALID_ROLE_FAILURE", "UNSPECIFIED_FAILURE"
resp.stage_deployments[0].deployment_state #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"
resp.stage_deployments[0].last_updated #=> Time
resp.stage_deployments[0].snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



1345
1346
1347
1348
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1345

def list_stage_deployments(params = {}, options = {})
  req = build_request(:list_stage_deployments, params)
  req.send_request(options)
end

#list_stages(params = {}) ⇒ Types::ListStagesResult

Gets a paginated list of stage summaries from the game.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_stages({
  game_name: "GameName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.stages #=> Array
resp.stages[0].description #=> String
resp.stages[0].game_key #=> String
resp.stages[0].name #=> String
resp.stages[0].state #=> String, one of "ACTIVE", "DELETING"
resp.stages[0].tags #=> Hash
resp.stages[0].tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :max_results (Integer)

    The maximum number of results to return.

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

  • :next_token (String)

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

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

Returns:

See Also:



1398
1399
1400
1401
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1398

def list_stages(params = {}, options = {})
  req = build_request(:list_stages, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

Lists the tags associated with a GameSparks resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

Returns:

See Also:



1427
1428
1429
1430
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1427

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#start_generated_code_job(params = {}) ⇒ Types::StartGeneratedCodeJobResult

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.

Examples:

Request syntax with placeholder values


resp = client.start_generated_code_job({
  game_name: "GameName", # required
  generator: { # required
    game_sdk_version: "GameSdkVersion",
    language: "Language",
    target_platform: "TargetPlatform",
  },
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.generated_code_job_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :generator (required, Types::Generator)

    Properties of the generator to use for the job.

  • :snapshot_id (required, String)

    The identifier of the snapshot for which to generate code.

Returns:

See Also:



1469
1470
1471
1472
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1469

def start_generated_code_job(params = {}, options = {})
  req = build_request(:start_generated_code_job, params)
  req.send_request(options)
end

#start_stage_deployment(params = {}) ⇒ Types::StartStageDeploymentResult

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.

Examples:

Request syntax with placeholder values


resp = client.start_stage_deployment({
  client_token: "ClientToken",
  game_name: "GameName", # required
  snapshot_id: "SnapshotId", # required
  stage_name: "StageName", # required
})

Response structure


resp.stage_deployment.created #=> Time
resp.stage_deployment.deployment_action #=> String, one of "DEPLOY", "UNDEPLOY"
resp.stage_deployment.deployment_id #=> String
resp.stage_deployment.deployment_result.message #=> String
resp.stage_deployment.deployment_result.result_code #=> String, one of "SUCCESS", "INVALID_ROLE_FAILURE", "UNSPECIFIED_FAILURE"
resp.stage_deployment.deployment_state #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"
resp.stage_deployment.last_updated #=> Time
resp.stage_deployment.snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

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

  • :game_name (required, String)

    The name of the game.

  • :snapshot_id (required, String)

    The identifier of the snapshot to deploy.

  • :stage_name (required, String)

    The name of the stage to deploy the snapshot onto.

Returns:

See Also:



1526
1527
1528
1529
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1526

def start_stage_deployment(params = {}, options = {})
  req = build_request(:start_stage_deployment, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds tags to a GameSparks resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tags (required, Hash<String,String>)

    The tags to add to the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1554
1555
1556
1557
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1554

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes tags from a GameSparks resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tag_keys (required, Array<String>)

    The keys of the tags to remove.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1581
1582
1583
1584
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1581

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_game(params = {}) ⇒ Types::UpdateGameResult

Updates details of the game.

Examples:

Request syntax with placeholder values


resp = client.update_game({
  description: "GameDescription",
  game_name: "GameName", # required
})

Response structure


resp.game.arn #=> String
resp.game.created #=> Time
resp.game.description #=> String
resp.game.enable_termination_protection #=> Boolean
resp.game.last_updated #=> Time
resp.game.name #=> String
resp.game.state #=> String, one of "ACTIVE", "DELETING"
resp.game.tags #=> Hash
resp.game.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    The description of the game.

  • :game_name (required, String)

    The name of the game.

Returns:

See Also:



1621
1622
1623
1624
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1621

def update_game(params = {}, options = {})
  req = build_request(:update_game, params)
  req.send_request(options)
end

#update_game_configuration(params = {}) ⇒ Types::UpdateGameConfigurationResult

Updates one or more sections of the game configuration.

Examples:

Request syntax with placeholder values


resp = client.update_game_configuration({
  game_name: "GameName", # required
  modifications: [ # required
    {
      operation: "ADD", # required, accepts ADD, REMOVE, REPLACE
      path: "Path", # required
      section: "SectionName", # required
      value: {
      },
    },
  ],
})

Response structure


resp.game_configuration.created #=> Time
resp.game_configuration.last_updated #=> Time
resp.game_configuration.sections #=> Hash
resp.game_configuration.sections["SectionName"].name #=> String
resp.game_configuration.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :game_name (required, String)

    The name of the game.

  • :modifications (required, Array<Types::SectionModification>)

    The list of modifications to make.

Returns:

See Also:



1665
1666
1667
1668
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1665

def update_game_configuration(params = {}, options = {})
  req = build_request(:update_game_configuration, params)
  req.send_request(options)
end

#update_snapshot(params = {}) ⇒ Types::UpdateSnapshotResult

Updates the metadata of a GameSparks snapshot.

Examples:

Request syntax with placeholder values


resp = client.update_snapshot({
  description: "SnapshotDescription",
  game_name: "GameName", # required
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.snapshot.created #=> Time
resp.snapshot.description #=> String
resp.snapshot.id #=> String
resp.snapshot.last_updated #=> Time
resp.snapshot.sections #=> Hash
resp.snapshot.sections["SectionName"].name #=> String
resp.snapshot.sections["SectionName"].size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    The description of the snapshot.

  • :game_name (required, String)

    The name of the game.

  • :snapshot_id (required, String)

    The identifier of the snapshot.

Returns:

See Also:



1707
1708
1709
1710
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1707

def update_snapshot(params = {}, options = {})
  req = build_request(:update_snapshot, params)
  req.send_request(options)
end

#update_stage(params = {}) ⇒ Types::UpdateStageResult

Updates the metadata of a stage.

Examples:

Request syntax with placeholder values


resp = client.update_stage({
  description: "StageDescription",
  game_name: "GameName", # required
  role: "RoleARN",
  stage_name: "StageName", # required
})

Response structure


resp.stage.arn #=> String
resp.stage.created #=> Time
resp.stage.description #=> String
resp.stage.game_key #=> String
resp.stage.last_updated #=> Time
resp.stage.log_group #=> String
resp.stage.name #=> String
resp.stage.role #=> String
resp.stage.state #=> String, one of "ACTIVE", "DELETING"
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    The description of the stage.

  • :game_name (required, String)

    The name of the game.

  • :role (String)

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

  • :stage_name (required, String)

    The name of the stage.

Returns:

See Also:



1758
1759
1760
1761
# File 'gems/aws-sdk-gamesparks/lib/aws-sdk-gamesparks/client.rb', line 1758

def update_stage(params = {}, options = {})
  req = build_request(:update_stage, params)
  req.send_request(options)
end