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.
Parameters:
-
identifier
(Identifier)
–
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
(Optional[LocationConfigurations], default:
None
)
–
A set of one or more locations and the streaming capacity for each location.
-
description
(Optional[Description], default:
None
)
–
A descriptive label for the stream group.
-
default_application_identifier
(Optional[Identifier], default:
None
)
–
The unique identifier of the Amazon GameLift Streams application that you want to set as the default application in a stream group. The application that you specify must be in READY status. The default application is pre-cached on always-on compute resources, reducing stream startup times. Other applications are automatically cached as needed.
Note that this parameter only sets the default application in a stream group. To associate a new application to an existing stream group, you must use AssociateApplications.
When you switch default applications in a stream group, it can take up to a few hours for the new default application to be pre-cached.
This value is an Amazon Resource Name (ARN) or ID that uniquely identifies the application resource. Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6. Example ID: a-9ZY8X7Wv6.
Raises:
-
AccessDeniedException
–
You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.
-
ConflictException
–
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
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 update_stream_group(
self,
identifier: "capo_gameliftstreams.types.identifier.Identifier",
*,
config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
location_configurations: Optional[
"capo_gameliftstreams.types.location_configurations.LocationConfigurations"
] = None,
description: Optional[
"capo_gameliftstreams.types.description.Description"
] = None,
default_application_identifier: Optional[
"capo_gameliftstreams.types.identifier.Identifier"
] = None,
) -> (
"capo_gameliftstreams.types.update_stream_group_output.UpdateStreamGroupOutput"
):
"""<p> Updates the configuration settings for an Amazon GameLift Streams stream group resource. To update a stream group, it must be in <code>ACTIVE</code> 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. </p> <p> 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: </p> <ul> <li> <p> <b>Always-on capacity</b>: 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. </p> </li> <li> <p> <b>Maximum capacity</b>: 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. </p> </li> <li> <p> <b>Target-idle capacity</b>: 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. </p> </li> </ul> <p>Values for capacity must be whole number multiples of the tenancy value of the stream group's stream class.</p> <p>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.</p>
Args:
identifier: <p>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>
description: <p>A descriptive label for the stream group.</p>
default_application_identifier: <p>The unique identifier of the Amazon GameLift Streams application that you want to set as the default application in a stream group. The application that you specify must be in <code>READY</code> status. The default application is pre-cached on always-on compute resources, reducing stream startup times. Other applications are automatically cached as needed.</p> <p>Note that this parameter only sets the default application in a stream group. To associate a new application to an existing stream group, you must use <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_AssociateApplications.html">AssociateApplications</a>.</p> <p>When you switch default applications in a stream group, it can take up to a few hours for the new default application to be pre-cached.</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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>. </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.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.</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.update_stream_group_input.UpdateStreamGroupInput]",
) -> AsyncOperationResponse[
"capo_gameliftstreams.types.update_stream_group_output.UpdateStreamGroupOutput"
]:
import capo_gameliftstreams._operations.game_lift_streams.update_stream_group
(
output,
http_response,
) = await capo_gameliftstreams._operations.game_lift_streams.update_stream_group.async_update_stream_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateStreamGroup")
)
input_: capo_gameliftstreams.types.update_stream_group_input.UpdateStreamGroupInput = {
"identifier": identifier
}
if location_configurations is not None:
input_["location_configurations"] = location_configurations
if description is not None:
input_["description"] = description
if default_application_identifier is not None:
input_["default_application_identifier"] = default_application_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|