Class: Aws::GameLiftStreams::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::GameLiftStreams::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb
Overview
An API client for GameLiftStreams. To construct a client, you need to configure a :region and :credentials.
client = Aws::GameLiftStreams::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
API Operations collapse
-
#add_stream_group_locations(params = {}) ⇒ Types::AddStreamGroupLocationsOutput
Add locations that can host stream sessions.
-
#associate_applications(params = {}) ⇒ Types::AssociateApplicationsOutput
When you associate, or link, an application with a stream group, then Amazon GameLift Streams can launch the application using the stream group's allocated compute resources.
-
#create_application(params = {}) ⇒ Types::CreateApplicationOutput
Creates an application resource in Amazon GameLift Streams, which specifies the application content you want to stream, such as a game build or other software, and configures the settings to run it.
-
#create_stream_group(params = {}) ⇒ Types::CreateStreamGroupOutput
Stream groups manage how Amazon GameLift Streams allocates resources and handles concurrent streams, allowing you to effectively manage capacity and costs.
-
#create_stream_session_admin_shell(params = {}) ⇒ Types::CreateStreamSessionAdminShellOutput
Creates an administrative terminal session with full access to the live runtime environment of the Amazon GameLift Streams stream session.
-
#create_stream_session_connection(params = {}) ⇒ Types::CreateStreamSessionConnectionOutput
Enables clients to reconnect to a stream session while preserving all session state and data in the disconnected session.
-
#create_stream_url(params = {}) ⇒ Types::CreateStreamUrlOutput
Creates a stream URL that grants temporary access to a stream session in a web browser without requiring an Amazon Web Services account or client integration.
-
#delete_application(params = {}) ⇒ Struct
Permanently deletes an Amazon GameLift Streams application resource.
-
#delete_stream_group(params = {}) ⇒ Struct
Permanently deletes all compute resources and information related to a stream group.
-
#disassociate_applications(params = {}) ⇒ Types::DisassociateApplicationsOutput
When you disassociate, or unlink, an application from a stream group, you can no longer stream this application by using that stream group's allocated compute resources.
-
#export_stream_session_files(params = {}) ⇒ Struct
Export the files that your application modifies or generates in a stream session, which can help you debug or verify your application.
-
#get_application(params = {}) ⇒ Types::GetApplicationOutput
Retrieves properties for an Amazon GameLift Streams application resource.
-
#get_stream_group(params = {}) ⇒ Types::GetStreamGroupOutput
Retrieves properties for a Amazon GameLift Streams stream group resource.
-
#get_stream_session(params = {}) ⇒ Types::GetStreamSessionOutput
Retrieves properties for a Amazon GameLift Streams stream session resource.
-
#get_stream_url(params = {}) ⇒ Types::GetStreamUrlOutput
Retrieves properties for a stream URL, including its current status, usage, and the stream sessions started through it.
-
#list_application_shader_caches(params = {}) ⇒ Types::ListApplicationShaderCachesOutput
Lists the shader caches associated with an Amazon GameLift Streams application.
-
#list_applications(params = {}) ⇒ Types::ListApplicationsOutput
Retrieves a list of all Amazon GameLift Streams applications that are associated with the Amazon Web Services account in use.
-
#list_stream_groups(params = {}) ⇒ Types::ListStreamGroupsOutput
Retrieves a list of all Amazon GameLift Streams stream groups that are associated with the Amazon Web Services account in use.
-
#list_stream_sessions(params = {}) ⇒ Types::ListStreamSessionsOutput
Retrieves a list of Amazon GameLift Streams stream sessions that a stream group is hosting.
-
#list_stream_sessions_by_account(params = {}) ⇒ Types::ListStreamSessionsByAccountOutput
Retrieves a list of Amazon GameLift Streams stream sessions that this user account has access to.
-
#list_stream_urls(params = {}) ⇒ Types::ListStreamUrlsOutput
Retrieves a list of the stream URLs in the current Amazon Web Services Region for your Amazon Web Services account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Retrieves all tags assigned to a Amazon GameLift Streams resource.
-
#remove_stream_group_locations(params = {}) ⇒ Struct
Removes a set of remote locations from this stream group.
-
#revoke_stream_url(params = {}) ⇒ Struct
Revokes a stream URL so that it can no longer start new stream sessions.
-
#start_stream_session(params = {}) ⇒ Types::StartStreamSessionOutput
This action initiates a new stream session and outputs connection information that clients can use to access the stream.
-
#tag_resource(params = {}) ⇒ Struct
Assigns one or more tags to a Amazon GameLift Streams resource.
-
#terminate_stream_session(params = {}) ⇒ Struct
Permanently terminates an active stream session.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a Amazon GameLift Streams resource.
-
#update_application(params = {}) ⇒ Types::UpdateApplicationOutput
Updates the mutable configuration settings for a Amazon GameLift Streams application resource.
-
#update_stream_group(params = {}) ⇒ Types::UpdateStreamGroupOutput
Updates the configuration settings for an Amazon GameLift Streams stream group resource.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
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.
471 472 473 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 471 def initialize(*args) super end |
Instance Method Details
#add_stream_group_locations(params = {}) ⇒ Types::AddStreamGroupLocationsOutput
Add locations that can host stream sessions. To add a location, the
stream group must be in ACTIVE status. You configure locations and
their corresponding capacity for each stream group. Creating a stream
group in a location that's nearest to your end users can help
minimize latency and improve quality.
This operation provisions stream capacity at the specified locations. By default, all locations have 1 or 2 capacity, depending on the stream class option: 2 for 'High' and 1 for 'Ultra' and 'Win2022'. This operation also copies the content files of all associated applications to an internal S3 bucket at each location. This allows Amazon GameLift Streams to host performant stream sessions.
555 556 557 558 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 555 def add_stream_group_locations(params = {}, = {}) req = build_request(:add_stream_group_locations, params) req.send_request() end |
#associate_applications(params = {}) ⇒ Types::AssociateApplicationsOutput
When you associate, or link, an application with a stream group, then
Amazon GameLift Streams can launch the application using the stream
group's allocated compute resources. The stream group must be in
ACTIVE status. You can reverse this action by using
DisassociateApplications.
If a stream group does not already have a linked application, Amazon
GameLift Streams will automatically assign the first application
provided in ApplicationIdentifiers as the default.
620 621 622 623 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 620 def associate_applications(params = {}, = {}) req = build_request(:associate_applications, params) req.send_request() end |
#create_application(params = {}) ⇒ Types::CreateApplicationOutput
Creates an application resource in Amazon GameLift Streams, which specifies the application content you want to stream, such as a game build or other software, and configures the settings to run it.
Before you create an application, upload your application content files to an Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Getting Started in the Amazon GameLift Streams Developer Guide.
Make sure that your files in the Amazon S3 bucket are the correct version you want to use. If you change the files at a later time, you will need to create a new Amazon GameLift Streams application.
READY
status, you can delete the original files from your Amazon S3 bucket
without affecting the application.
If the request is successful, Amazon GameLift Streams begins to create
an application and sets the status to INITIALIZED. When an
application reaches READY status, you can use the application to set
up stream groups and start streams. To track application status, call
GetApplication.
837 838 839 840 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 837 def create_application(params = {}, = {}) req = build_request(:create_application, params) req.send_request() end |
#create_stream_group(params = {}) ⇒ Types::CreateStreamGroupOutput
Stream groups manage how Amazon GameLift Streams allocates resources and handles concurrent streams, allowing you to effectively manage capacity and costs. Within a stream group, you specify an application to stream, streaming locations and their capacity, and the stream class you want to use when streaming applications to your end-users. A stream class defines the hardware configuration of the compute resources that Amazon GameLift Streams will use when streaming, such as the CPU, GPU, and memory.
Stream capacity represents the number of concurrent streams that can be active at a time. You set stream capacity per location, per stream group. The following capacity settings are available:
Always-on capacity: This setting, if non-zero, indicates minimum streaming capacity which is allocated to you and is never released back to the service. You pay for this base level of capacity at all times, whether used or idle.
Maximum capacity: This indicates the maximum capacity that the service can allocate for you. Newly created streams may take a few minutes to start. Capacity is released back to the service when idle. You pay for capacity that is allocated to you until it is released.
Target-idle capacity: This indicates idle capacity which the service pre-allocates and holds for you in anticipation of future activity. This helps to insulate your users from capacity-allocation delays. You pay for capacity which is held in this intentional idle state.
Values for capacity must be whole number multiples of the tenancy value of the stream group's stream class.
To adjust the capacity of any ACTIVE stream group, call
UpdateStreamGroup.
If the CreateStreamGroup request is successful, Amazon GameLift
Streams assigns a unique ID to the stream group resource and sets the
status to ACTIVATING. It can take a few minutes for Amazon GameLift
Streams to finish creating the stream group while it searches for
unallocated compute resources and provisions them. When complete, the
stream group status will be ACTIVE and you can start stream sessions
by using StartStreamSession. To check the stream group's status,
call GetStreamGroup.
Stream groups should be recreated every 3-4 weeks to pick up important
service updates and fixes. Stream groups that are older than 180 days
can no longer be updated with new application associations. Stream
groups expire when they are 365 days old, at which point they can no
longer stream sessions. The exact expiration date is indicated by the
date value in the ExpiresAt field.
1242 1243 1244 1245 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1242 def create_stream_group(params = {}, = {}) req = build_request(:create_stream_group, params) req.send_request() end |
#create_stream_session_admin_shell(params = {}) ⇒ Types::CreateStreamSessionAdminShellOutput
Creates an administrative terminal session with full access to the
live runtime environment of the Amazon GameLift Streams stream
session. Use the returned credentials (SessionId, StreamUrl and
TokenValue) with the Amazon Web Services Systems Manager Session
Manager plugin for the CLI to access the terminal session.
The stream session must be in one of the following statuses: ACTIVE,
CONNECTED, PENDING_CLIENT_RECONNECTION, or RECONNECTING.
The StreamUrl is valid for 60 seconds. After it expires, call this
operation again to get a new URL.
The returned credentials grant full access to the live runtime environment of the Amazon GameLift Streams stream session. The operator who connects to the terminal session has the same level of access that your Amazon GameLift Streams applications have, including potentially user input, screen images, and application data files. Grant permissions to call this operation only to trusted IAM identities that require live runtime environment access.
1316 1317 1318 1319 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1316 def create_stream_session_admin_shell(params = {}, = {}) req = build_request(:create_stream_session_admin_shell, params) req.send_request() end |
#create_stream_session_connection(params = {}) ⇒ Types::CreateStreamSessionConnectionOutput
Enables clients to reconnect to a stream session while preserving all
session state and data in the disconnected session. This reconnection
process can be initiated when a stream session is in either
PENDING_CLIENT_RECONNECTION or ACTIVE status. The process works as
follows:
Initial disconnect:
- When a client disconnects or loses connection, the stream
session transitions from
CONNECTEDtoPENDING_CLIENT_RECONNECTION
^
- When a client disconnects or loses connection, the stream
session transitions from
Reconnection time window:
Clients have
ConnectionTimeoutSeconds(defined in StartStreamSession) to reconnect before session terminationYour backend server must call CreateStreamSessionConnection to initiate reconnection
Session transitions to
RECONNECTINGstatus
Reconnection completion:
On successful CreateStreamSessionConnection, session status changes to
ACTIVEProvide the new connection information to the requesting client
Client must establish connection within
ConnectionTimeoutSecondsSession terminates automatically if client fails to connect in time
For more information about the stream session lifecycle, see Stream sessions in the Amazon GameLift Streams Developer Guide.
To begin re-connecting to an existing stream session, specify the stream group ID and stream session ID that you want to reconnect to, and the signal request to use with the stream.
1430 1431 1432 1433 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1430 def create_stream_session_connection(params = {}, = {}) req = build_request(:create_stream_session_connection, params) req.send_request() end |
#create_stream_url(params = {}) ⇒ Types::CreateStreamUrlOutput
Creates a stream URL that grants temporary access to a stream session in a web browser without requiring an Amazon Web Services account or client integration.
You can use the stream URL to start a stream session up to the number
of times set by UsageLimit, until it expires after
UrlExpiresAfterMinutes. Each successful use starts a new stream
session.
To make the request idempotent, provide a ClientToken.
1645 1646 1647 1648 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1645 def create_stream_url(params = {}, = {}) req = build_request(:create_stream_url, params) req.send_request() end |
#delete_application(params = {}) ⇒ Struct
Permanently deletes an Amazon GameLift Streams application resource. This also deletes the application content files stored with Amazon GameLift Streams. However, this does not delete the original files that you uploaded to your Amazon S3 bucket; you can delete these any time after Amazon GameLift Streams creates an application, which is the only time Amazon GameLift Streams accesses your Amazon S3 bucket.
You can only delete an application that meets the following conditions:
The application is in
READYorERRORstatus. You cannot delete an application that's inPROCESSINGorINITIALIZEDstatus.The application is not the default application of any stream groups. You must first delete the stream group by using DeleteStreamGroup.
The application is not linked to any stream groups. You must first unlink the stream group by using DisassociateApplications.
An application is not streaming in any ongoing stream session. You must wait until the client ends the stream session or call TerminateStreamSession to end the stream.
If any active stream groups exist for this application, this request
returns a ValidationException.
1705 1706 1707 1708 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1705 def delete_application(params = {}, = {}) req = build_request(:delete_application, params) req.send_request() end |
#delete_stream_group(params = {}) ⇒ Struct
Permanently deletes all compute resources and information related to a
stream group. To delete a stream group, specify the unique stream
group identifier. During the deletion process, the stream group's
status is DELETING. This operation stops streams in progress and
prevents new streams from starting. As a best practice, before
deleting the stream group, call ListStreamSessions to check for
streams in progress and take action to stop them. When you delete a
stream group, any application associations referring to that stream
group are automatically removed.
1746 1747 1748 1749 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1746 def delete_stream_group(params = {}, = {}) req = build_request(:delete_stream_group, params) req.send_request() end |
#disassociate_applications(params = {}) ⇒ Types::DisassociateApplicationsOutput
When you disassociate, or unlink, an application from a stream group,
you can no longer stream this application by using that stream
group's allocated compute resources. Any streams in process will
continue until they terminate, which helps avoid interrupting an
end-user's stream. Amazon GameLift Streams will not initiate new
streams in the stream group using the disassociated application. The
disassociate action does not affect the stream capacity of a stream
group. To disassociate an application, the stream group must be in
ACTIVE status.
If you disassociate the default application, Amazon GameLift Streams
will automatically choose a new default application from the remaining
associated applications. To change which application is the default
application, call UpdateStreamGroup and specify a new
DefaultApplicationIdentifier.
1818 1819 1820 1821 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1818 def disassociate_applications(params = {}, = {}) req = build_request(:disassociate_applications, params) req.send_request() end |
#export_stream_session_files(params = {}) ⇒ Struct
Export the files that your application modifies or generates in a stream session, which can help you debug or verify your application. When your application runs, it generates output files such as logs, diagnostic information, crash dumps, save files, user data, screenshots, and so on. The files can be defined by the engine or frameworks that your application uses, or information that you've programmed your application to output.
You can only call this action on a stream session that is in progress,
specifically in one of the following statuses ACTIVE, CONNECTED,
PENDING_CLIENT_RECONNECTION, and RECONNECTING. You must provide an
Amazon Simple Storage Service (Amazon S3) bucket to store the files
in. When the session ends, Amazon GameLift Streams produces a
compressed folder that contains all of the files and directories that
were modified or created by the application during the stream session.
AWS uses your security credentials to authenticate and authorize
access to your Amazon S3 bucket.
Amazon GameLift Streams collects the following generated and modified
files. Find them in the corresponding folders in the .zip archive.
application/: The folder where your application or game is stored.
^ ^
profile/: The user profile folder.temp/: The system temp folder.
To verify the status of the exported files, use GetStreamSession.
To delete the files, delete the object in the S3 bucket.
1910 1911 1912 1913 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1910 def export_stream_session_files(params = {}, = {}) req = build_request(:export_stream_session_files, params) req.send_request() end |
#get_application(params = {}) ⇒ Types::GetApplicationOutput
Retrieves properties for an Amazon GameLift Streams application resource. Specify the ID of the application that you want to retrieve. If the operation is successful, it returns properties for the requested application.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- application_deleted
- application_ready
1985 1986 1987 1988 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 1985 def get_application(params = {}, = {}) req = build_request(:get_application, params) req.send_request() end |
#get_stream_group(params = {}) ⇒ Types::GetStreamGroupOutput
Retrieves properties for a Amazon GameLift Streams stream group resource. Specify the ID of the stream group that you want to retrieve. If the operation is successful, it returns properties for the requested stream group.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- stream_group_active
- stream_group_deleted
2068 2069 2070 2071 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2068 def get_stream_group(params = {}, = {}) req = build_request(:get_stream_group, params) req.send_request() end |
#get_stream_session(params = {}) ⇒ Types::GetStreamSessionOutput
Retrieves properties for a Amazon GameLift Streams stream session resource. Specify the Amazon Resource Name (ARN) of the stream session that you want to retrieve and its stream group ARN. If the operation is successful, it returns properties for the requested resource.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- stream_session_active
2173 2174 2175 2176 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2173 def get_stream_session(params = {}, = {}) req = build_request(:get_stream_session, params) req.send_request() end |
#get_stream_url(params = {}) ⇒ Types::GetStreamUrlOutput
Retrieves properties for a stream URL, including its current status, usage, and the stream sessions started through it.
If you delete the stream group or application that backs the stream
URL, this operation updates the status of the stream URL to REVOKED.
2276 2277 2278 2279 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2276 def get_stream_url(params = {}, = {}) req = build_request(:get_stream_url, params) req.send_request() end |
#list_application_shader_caches(params = {}) ⇒ Types::ListApplicationShaderCachesOutput
Lists the shader caches associated with an Amazon GameLift Streams application. Each shader cache entry includes its status, associated stream groups, and size in bytes.
Returns shader caches associated with the specified Amazon GameLift Streams application in all statuses.
2323 2324 2325 2326 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2323 def list_application_shader_caches(params = {}, = {}) req = build_request(:list_application_shader_caches, params) req.send_request() end |
#list_applications(params = {}) ⇒ Types::ListApplicationsOutput
Retrieves a list of all Amazon GameLift Streams applications that are associated with the Amazon Web Services account in use. This operation returns applications in all statuses, in no particular order. You can paginate the results as needed.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2374 2375 2376 2377 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2374 def list_applications(params = {}, = {}) req = build_request(:list_applications, params) req.send_request() end |
#list_stream_groups(params = {}) ⇒ Types::ListStreamGroupsOutput
Retrieves a list of all Amazon GameLift Streams stream groups that are associated with the Amazon Web Services account in use. This operation returns stream groups in all statuses, in no particular order. You can paginate the results as needed.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2427 2428 2429 2430 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2427 def list_stream_groups(params = {}, = {}) req = build_request(:list_stream_groups, params) req.send_request() end |
#list_stream_sessions(params = {}) ⇒ Types::ListStreamSessionsOutput
Retrieves a list of Amazon GameLift Streams stream sessions that a stream group is hosting.
To retrieve stream sessions, specify the stream group, and optionally filter by stream session status. You can paginate the results as needed.
This operation returns the requested stream sessions in no particular order.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2521 2522 2523 2524 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2521 def list_stream_sessions(params = {}, = {}) req = build_request(:list_stream_sessions, params) req.send_request() end |
#list_stream_sessions_by_account(params = {}) ⇒ Types::ListStreamSessionsByAccountOutput
Retrieves a list of Amazon GameLift Streams stream sessions that this user account has access to.
In the returned list of stream sessions, the ExportFilesMetadata
property only shows the Status value. To get the OutpurUri and
StatusReason values, use GetStreamSession.
We don't recommend using this operation to regularly check stream session statuses because it's costly. Instead, to check status updates for a specific stream session, use GetStreamSession.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2599 2600 2601 2602 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2599 def list_stream_sessions_by_account(params = {}, = {}) req = build_request(:list_stream_sessions_by_account, params) req.send_request() end |
#list_stream_urls(params = {}) ⇒ Types::ListStreamUrlsOutput
Retrieves a list of the stream URLs in the current Amazon Web Services
Region for your Amazon Web Services account. You can filter the
results by status or by stream group. Use the pagination parameters to
retrieve results as a set of sequential pages. If you delete the
stream group or application that backs a stream URL, this operation
updates that stream URL's status to REVOKED.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2686 2687 2688 2689 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2686 def list_stream_urls(params = {}, = {}) req = build_request(:list_stream_urls, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Retrieves all tags assigned to a Amazon GameLift Streams resource. To list tags for a resource, specify the ARN value for the resource.
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
2734 2735 2736 2737 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2734 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#remove_stream_group_locations(params = {}) ⇒ Struct
Removes a set of remote locations from this stream group. To remove a
location, the stream group must be in ACTIVE status. When you remove
a location, Amazon GameLift Streams releases allocated compute
resources in that location. Stream sessions can no longer start from
removed locations in a stream group. Amazon GameLift Streams also
deletes the content files of all associated applications that were in
Amazon GameLift Streams's internal Amazon S3 bucket at this location.
You cannot remove the Amazon Web Services Region location where you initially created this stream group, known as the primary location. However, you can set the stream capacity to zero to avoid incurring costs for allocated compute resources in that location.
2789 2790 2791 2792 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2789 def remove_stream_group_locations(params = {}, = {}) req = build_request(:remove_stream_group_locations, params) req.send_request() end |
#revoke_stream_url(params = {}) ⇒ Struct
Revokes a stream URL so that it can no longer start new stream
sessions. By default, stream sessions that are already running
continue until they end on their own. To also end running sessions,
set RevocationMode to REVOKE_AND_TERMINATE_SESSIONS.
Revoking a stream URL is permanent. The status of the stream URL
changes to REVOKED.
2845 2846 2847 2848 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 2845 def revoke_stream_url(params = {}, = {}) req = build_request(:revoke_stream_url, params) req.send_request() end |
#start_stream_session(params = {}) ⇒ Types::StartStreamSessionOutput
This action initiates a new stream session and outputs connection information that clients can use to access the stream. A stream session refers to an instance of a stream that Amazon GameLift Streams transmits from the server to the end-user. A stream session runs on a compute resource that a stream group has allocated. The start stream session process works as follows:
Prerequisites:
You must have a stream group in
ACTIVEstatusYou must have idle or on-demand capacity in a stream group in the location you want to stream from
You must have at least one application associated to the stream group (use AssociateApplications if needed)
Start stream request:
Your backend server calls StartStreamSession to initiate connection
Amazon GameLift Streams creates the stream session resource, assigns an Amazon Resource Name (ARN) value, and begins searching for available stream capacity to run the stream
Session transitions to
ACTIVATINGstatus
Placement completion:
If Amazon GameLift Streams is successful in finding capacity for the stream, the stream session status changes to
ACTIVEstatus and StartStreamSession returns stream connection informationIf Amazon GameLift Streams was not successful in finding capacity within the placement timeout period (defined according to the capacity type and platform type), the stream session status changes to
ERRORstatus and StartStreamSession returns aStatusReasonofplacementTimeout
Connection completion:
Provide the new connection information to the requesting client
Client must establish connection within
ConnectionTimeoutSeconds(specified in StartStreamSession parameters)Session terminates automatically if client fails to connect in time
For more information about the stream session lifecycle, see Stream sessions in the Amazon GameLift Streams Developer Guide.
Timeouts to be aware of that affect a stream session:
Placement timeout: The amount of time that Amazon GameLift Streams has to find capacity for a stream request. Placement timeout varies based on the capacity type used to fulfill your stream request:
Always-on capacity: 75 seconds
On-demand capacity:
Linux/Proton runtimes: 90 seconds
Windows runtime: 10 minutes
Connection timeout: The amount of time that Amazon GameLift Streams waits for a client to connect to a stream session in
ACTIVEstatus, or reconnect to a stream session inPENDING_CLIENT_RECONNECTIONstatus, the latter of which occurs when a client disconnects or loses connection from a stream session. If no client connects before the timeout, Amazon GameLift Streams terminates the stream session. This value is specified byConnectionTimeoutSecondsin theStartStreamSessionparameters.Maximum session length: A stream session will be terminated after this amount of time has elapsed since it started, regardless of any existing client connections. This value is specified by
SessionLengthSecondsin theStartStreamSessionparameters.
To start a new stream session, specify a stream group ID and application ID, along with the transport protocol and signal request to use with the stream session.
For stream groups that have multiple locations, provide a set of
locations ordered by priority using a Locations parameter. Amazon
GameLift Streams will start a single stream session in the next
available location. An application must be finished replicating to a
remote location before the remote location can host a stream.
To reconnect to a stream session after a client disconnects or loses connection, use CreateStreamSessionConnection.
3174 3175 3176 3177 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3174 def start_stream_session(params = {}, = {}) req = build_request(:start_stream_session, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Assigns one or more tags to a Amazon GameLift Streams resource. Use tags to organize Amazon Web Services resources for a range of purposes. You can assign tags to the following Amazon GameLift Streams resource types:
Application
StreamGroup
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
3227 3228 3229 3230 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3227 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#terminate_stream_session(params = {}) ⇒ Struct
Permanently terminates an active stream session. When called, the
stream session status changes to TERMINATING. You can terminate a
stream session in any status except ACTIVATING. If the stream
session is in ACTIVATING status, an exception is thrown.
3272 3273 3274 3275 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3272 def terminate_stream_session(params = {}, = {}) req = build_request(:terminate_stream_session, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a Amazon GameLift Streams resource. To remove tags, specify the Amazon GameLift Streams resource and a list of one or more tags to remove.
3306 3307 3308 3309 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3306 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_application(params = {}) ⇒ Types::UpdateApplicationOutput
Updates the mutable configuration settings for a Amazon GameLift
Streams application resource. You can change the Description,
ApplicationLogOutputUri, and ApplicationLogPaths.
To update application settings, specify the application ID and provide the new values. If the operation is successful, it returns the complete updated set of settings for the application.
3427 3428 3429 3430 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3427 def update_application(params = {}, = {}) req = build_request(:update_application, params) req.send_request() end |
#update_stream_group(params = {}) ⇒ Types::UpdateStreamGroupOutput
Updates the configuration settings for an Amazon GameLift Streams
stream group resource. To update a stream group, it must be in
ACTIVE status. You can change the description, the set of locations,
and the requested capacity of a stream group per location. If you want
to change the stream class, create a new stream group.
Stream capacity represents the number of concurrent streams that can be active at a time. You set stream capacity per location, per stream group. The following capacity settings are available:
Always-on capacity: This setting, if non-zero, indicates minimum streaming capacity which is allocated to you and is never released back to the service. You pay for this base level of capacity at all times, whether used or idle.
Maximum capacity: This indicates the maximum capacity that the service can allocate for you. Newly created streams may take a few minutes to start. Capacity is released back to the service when idle. You pay for capacity that is allocated to you until it is released.
Target-idle capacity: This indicates idle capacity which the service pre-allocates and holds for you in anticipation of future activity. This helps to insulate your users from capacity-allocation delays. You pay for capacity which is held in this intentional idle state.
Values for capacity must be whole number multiples of the tenancy value of the stream group's stream class.
To update a stream group, specify the stream group's Amazon Resource Name (ARN) and provide the new values. If the request is successful, Amazon GameLift Streams returns the complete updated metadata for the stream group. Expired stream groups cannot be updated.
3581 3582 3583 3584 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3581 def update_stream_group(params = {}, = {}) req = build_request(:update_stream_group, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| application_deleted | #get_application | 2 | 60 |
| application_ready | #get_application | 2 | 60 |
| stream_group_active | #get_stream_group | 30 | 120 |
| stream_group_deleted | #get_stream_group | 30 | 60 |
| stream_session_active | #get_stream_session | 2 | 60 |
3700 3701 3702 3703 3704 |
# File 'gems/aws-sdk-gameliftstreams/lib/aws-sdk-gameliftstreams/client.rb', line 3700 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |