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=[
        {
            'AlwaysOnCapacity': 123,
            'LocationName': 'string',
            'OnDemandCapacity': 123
        },
    ]
)
Parameters:
  • Identifier (string) –

    [REQUIRED]

    A stream group to add the specified locations to.

    This value is a Amazon Resource Name (ARN) that uniquely identifies the stream group resource. Format example: 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.

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

      • LocationName (string) – [REQUIRED]

        A location’s name. For example, us-east-1. For a complete list of locations that Amazon GameLift Streams supports, see the Regions and quotas section in the Amazon GameLift Streams Developer Guide .

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

Return type:

dict

Returns:

Response Syntax

{
    'Identifier': 'string',
    'Locations': [
        {
            'AllocatedCapacity': 123,
            'AlwaysOnCapacity': 123,
            'IdleCapacity': 123,
            'LocationName': 'string',
            'OnDemandCapacity': 123,
            'RequestedCapacity': 123,
            'Status': 'ACTIVATING'|'ACTIVE'|'ERROR'|'REMOVING'
        },
    ]
}

Response Structure

  • (dict) –

    • Identifier (string) –

      This value is the Amazon Resource Name (ARN) that uniquely identifies the stream group resource. Format example: 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. The StatusReason 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. It releases all provisioned capacity for this location in this stream group.

      • (dict) –

        Represents a location and its corresponding stream capacity and status.

        • AllocatedCapacity (integer) –

          This value is the number of compute resources that a stream group has provisioned and is ready to stream. It includes resources that are currently streaming and resources that are idle and ready to respond to stream requests.

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

        • IdleCapacity (integer) –

          This value is the amount of allocated capacity that is not currently streaming. It represents the stream group’s availability to respond to new stream requests, but not including on-demand capacity.

        • LocationName (string) –

          A location’s name. For example, us-east-1. For a complete list of locations that Amazon GameLift Streams supports, see the Regions and quotas section in the Amazon GameLift Streams Developer Guide .

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

        • RequestedCapacity (integer) –

          This value is the total number of compute resources that you request for a stream group. This includes resources that Amazon GameLift Streams has either already provisioned or is working to provision. You request capacity for each location in a stream group.

        • 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. The StatusReason 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. It releases all provisioned capacity for this location in this stream group.

Exceptions