setDefaultAuthorizer method

Future<SetDefaultAuthorizerResponse> setDefaultAuthorizer({
  1. required String authorizerName,
})

Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer.

Requires permission to access the SetDefaultAuthorizer action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceAlreadyExistsException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException.

Parameter authorizerName : The authorizer name.

Implementation

Future<SetDefaultAuthorizerResponse> setDefaultAuthorizer({
  required String authorizerName,
}) async {
  final $payload = <String, dynamic>{
    'authorizerName': authorizerName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/default-authorizer',
    exceptionFnMap: _exceptionFns,
  );
  return SetDefaultAuthorizerResponse.fromJson(response);
}