revokeStreamUrl method

Future<void> revokeStreamUrl({
  1. required String identifier,
  2. required String streamUrlIdentifier,
  3. RevocationMode? revocationMode,
})

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.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

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

Parameter streamUrlIdentifier : 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.

Parameter revocationMode : 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.

Implementation

Future<void> revokeStreamUrl({
  required String identifier,
  required String streamUrlIdentifier,
  RevocationMode? revocationMode,
}) async {
  final $payload = <String, dynamic>{
    if (revocationMode != null) 'RevocationMode': revocationMode.value,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/streamgroups/${Uri.encodeComponent(identifier)}/streamurls/${Uri.encodeComponent(streamUrlIdentifier)}/revoke',
    exceptionFnMap: _exceptionFns,
  );
}