GameLiftStreams / Client / add_stream_group_locations
add_stream_group_locations¶
- GameLiftStreams.Client.add_stream_group_locations(**kwargs)¶
Add locations that can host stream sessions. 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.
See also: AWS API Documentation
Request Syntax
response = client.add_stream_group_locations( Identifier='string', LocationConfigurations=[ { 'LocationName': 'string', 'AlwaysOnCapacity': 123, 'OnDemandCapacity': 123 }, ] )
- Parameters:
Identifier (string) –
[REQUIRED]
A stream group to add the specified locations to.
This value is an Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4
. Example ID:sg-1AB2C3De4
.LocationConfigurations (list) –
[REQUIRED]
A set of one or more locations and the streaming capacity for each location.
(dict) –
Configuration settings that define a stream group’s stream capacity for a location. When configuring a location for the first time, you must specify a numeric value for at least one of the two capacity types. To update the capacity for an existing stream group, call UpdateStreamGroup. To add a new location and specify its capacity, call AddStreamGroupLocations.
LocationName (string) – [REQUIRED]
A location’s name. For example,
us-east-1
. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.AlwaysOnCapacity (integer) –
The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it’s in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.
OnDemandCapacity (integer) –
The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.
- Return type:
dict
- Returns:
Response Syntax
{ 'Identifier': 'string', 'Locations': [ { 'LocationName': 'string', 'Status': 'ACTIVATING'|'ACTIVE'|'ERROR'|'REMOVING', 'AlwaysOnCapacity': 123, 'OnDemandCapacity': 123, 'RequestedCapacity': 123, 'AllocatedCapacity': 123, 'IdleCapacity': 123 }, ] }
Response Structure
(dict) –
Identifier (string) –
This value is an Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4
. Example ID:sg-1AB2C3De4
.Locations (list) –
This value is set of locations, including their name, current status, and capacities.
A location can be in one of the following states:
ACTIVATING
: Amazon GameLift Streams is preparing the location. You cannot stream from, scale the capacity of, or remove this location yet.ACTIVE
: The location is provisioned with initial capacity. You can now stream from, scale the capacity of, or remove this location.ERROR
: Amazon GameLift Streams failed to set up this location. TheStatusReason
field describes the error. You can remove this location and try to add it again.REMOVING
: Amazon GameLift Streams is working to remove this location. This will release all provisioned capacity for this location in this stream group.
(dict) –
Represents a location and its corresponding stream capacity and status.
LocationName (string) –
A location’s name. For example,
us-east-1
. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.Status (string) –
This value is set of locations, including their name, current status, and capacities.
A location can be in one of the following states:
ACTIVATING
: Amazon GameLift Streams is preparing the location. You cannot stream from, scale the capacity of, or remove this location yet.ACTIVE
: The location is provisioned with initial capacity. You can now stream from, scale the capacity of, or remove this location.ERROR
: Amazon GameLift Streams failed to set up this location. TheStatusReason
field describes the error. You can remove this location and try to add it again.REMOVING
: Amazon GameLift Streams is working to remove this location. This will release all provisioned capacity for this location in this stream group.
AlwaysOnCapacity (integer) –
The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it’s in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.
OnDemandCapacity (integer) –
The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.
RequestedCapacity (integer) –
This value is the always-on capacity that you most recently requested for a stream group. You request capacity separately for each location in a stream group. In response to an increase in requested capacity, Amazon GameLift Streams attempts to provision compute resources to make the stream group’s allocated capacity meet requested capacity. When always-on capacity is decreased, it can take a few minutes to deprovision allocated capacity to match the requested capacity.
AllocatedCapacity (integer) –
This value is the stream capacity that Amazon GameLift Streams has provisioned in a stream group that can respond immediately to stream requests. It includes resources that are currently streaming and resources that are idle and ready to respond to stream requests. You pay for this capacity whether it’s in use or not. After making changes to capacity, it can take a few minutes for the allocated capacity count to reflect the change while compute resources are allocated or deallocated. Similarly, when allocated on-demand capacity is no longer needed, it can take a few minutes for Amazon GameLift Streams to spin down the allocated capacity.
IdleCapacity (integer) –
This value is the amount of allocated capacity that is not currently streaming. It represents the stream group’s ability to respond immediately to new stream requests with near-instant startup time.
Exceptions
GameLiftStreams.Client.exceptions.AccessDeniedException
GameLiftStreams.Client.exceptions.ResourceNotFoundException
GameLiftStreams.Client.exceptions.ThrottlingException
GameLiftStreams.Client.exceptions.InternalServerException
GameLiftStreams.Client.exceptions.ValidationException
GameLiftStreams.Client.exceptions.ServiceQuotaExceededException