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.
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.
This is the stream group that owns the stream URL.
-
stream_url_identifier
(Identifier)
–
The unique identifier of the stream URL to revoke. Specify a stream URL ID or Amazon Resource Name (ARN). Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:streamurl/sg-1AB2C3De4/su-1AB2C3De4. Example ID: su-1AB2C3De4.
-
revocation_mode
(Optional[RevocationMode], default:
None
)
–
Controls what happens to running stream sessions when you revoke the stream URL. If you do not specify a value, the default is REVOKE_URL. Possible values include the following:
-
REVOKE_URL: Stops the stream URL from starting new stream sessions. Running sessions continue until they end.
-
REVOKE_AND_TERMINATE_SESSIONS: Stops new stream sessions and ends any running stream sessions.
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.
-
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 revoke_stream_url(
self,
identifier: "capo_gameliftstreams.types.identifier.Identifier",
stream_url_identifier: "capo_gameliftstreams.types.identifier.Identifier",
*,
config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
revocation_mode: Optional[
"capo_gameliftstreams.types.revocation_mode.RevocationMode"
] = None,
) -> None:
"""<p>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 <code>RevocationMode</code> to <code>REVOKE_AND_TERMINATE_SESSIONS</code>.</p> <p>Revoking a stream URL is permanent. The status of the stream URL changes to <code>REVOKED</code>.</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> <p>This is the stream group that owns the stream URL.</p>
stream_url_identifier: <p>The unique identifier of the stream URL to revoke. Specify a stream URL ID or Amazon Resource Name (ARN). Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamurl/sg-1AB2C3De4/su-1AB2C3De4</code>. Example ID: <code>su-1AB2C3De4</code>.</p>
revocation_mode: <p>Controls what happens to running stream sessions when you revoke the stream URL. If you do not specify a value, the default is <code>REVOKE_URL</code>. Possible values include the following:</p> <ul> <li> <p> <code>REVOKE_URL</code>: Stops the stream URL from starting new stream sessions. Running sessions continue until they end.</p> </li> <li> <p> <code>REVOKE_AND_TERMINATE_SESSIONS</code>: Stops new stream sessions and ends any running stream sessions.</p> </li> </ul>
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.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.revoke_stream_url_input.RevokeStreamUrlInput]",
) -> AsyncOperationResponse[None]:
import capo_gameliftstreams._operations.game_lift_streams.revoke_stream_url
(
output,
http_response,
) = await capo_gameliftstreams._operations.game_lift_streams.revoke_stream_url.async_revoke_stream_url(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RevokeStreamUrl")
)
input_: capo_gameliftstreams.types.revoke_stream_url_input.RevokeStreamUrlInput = {
"identifier": identifier,
"stream_url_identifier": stream_url_identifier,
}
if revocation_mode is not None:
input_["revocation_mode"] = revocation_mode
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|