Skip to content

add_stream_group_locations async

add_stream_group_locations(
    identifier: Identifier,
    location_configurations: LocationConfigurations,
    *,
    config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
) -> 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.

Parameters:

  • identifier (Identifier) –

    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.

  • location_configurations (LocationConfigurations) –

    A set of one or more locations and the streaming capacity for each location.

Raises:

  • AccessDeniedException –

    You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.

  • InternalServerException –

    The service encountered an internal error and is unable to complete the request.

  • ResourceNotFoundException –

    The resource specified in the request was not found. Correct the request before you try again.

  • ServiceQuotaExceededException –

    The request would cause the resource to exceed an allowed service quota. Resolve the issue before you try again.

  • ThrottlingException –

    The request was denied due to request throttling. Retry the request after the suggested wait time.

  • ValidationException –

    One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gameliftstreams/_services/async_game_lift_streams.py
async def add_stream_group_locations(
    self,
    identifier: "capo_gameliftstreams.types.identifier.Identifier",
    location_configurations: "capo_gameliftstreams.types.location_configurations.LocationConfigurations",
    *,
    config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
) -> "capo_gameliftstreams.types.add_stream_group_locations_output.AddStreamGroupLocationsOutput":
    """<p> Add locations that can host stream sessions. To add a location, the stream group must be in <code>ACTIVE</code> 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. </p> <p> 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. </p>

    Args:
        identifier: <p> A stream group to add the specified locations to. </p> <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>. </p>
        location_configurations: <p> A set of one or more locations and the streaming capacity for each location. </p>

    Raises:
        capo_gameliftstreams.errors.access_denied_exception.AccessDeniedException: <p>You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.</p>
        capo_gameliftstreams.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error and is unable to complete the request.</p>
        capo_gameliftstreams.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request was not found. Correct the request before you try again.</p>
        capo_gameliftstreams.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would cause the resource to exceed an allowed service quota. Resolve the issue before you try again.</p>
        capo_gameliftstreams.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request after the suggested wait time.</p>
        capo_gameliftstreams.errors.validation_exception.ValidationException: <p>One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.</p>
        capo_gameliftstreams.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gameliftstreams.types.add_stream_group_locations_input.AddStreamGroupLocationsInput]",
    ) -> AsyncOperationResponse[
        "capo_gameliftstreams.types.add_stream_group_locations_output.AddStreamGroupLocationsOutput"
    ]:
        import capo_gameliftstreams._operations.game_lift_streams.add_stream_group_locations

        (
            output,
            http_response,
        ) = await capo_gameliftstreams._operations.game_lift_streams.add_stream_group_locations.async_add_stream_group_locations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AddStreamGroupLocations")
    )
    input_: capo_gameliftstreams.types.add_stream_group_locations_input.AddStreamGroupLocationsInput = {
        "identifier": identifier,
        "location_configurations": location_configurations,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output