disableSso method

Future<void> disableSso({
  1. required String directoryId,
  2. String? password,
  3. String? userName,
})

Disables single-sign on for a directory.

May throw EntityDoesNotExistException. May throw InsufficientPermissionsException. May throw AuthenticationFailedException. May throw ClientException. May throw ServiceException.

Parameter directoryId : The identifier of the directory for which to disable single-sign on.

Parameter password : The password of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. For more information, see the UserName parameter.

Parameter userName : The username of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. This account must have privileges to remove a service principal name.

If the AD Connector service account does not have privileges to remove a service principal name, you can specify an alternate account with the UserName and Password parameters. These credentials are only used to disable single sign-on and are not stored by the service. The AD Connector service account is not changed.

Implementation

Future<void> disableSso({
  required String directoryId,
  String? password,
  String? userName,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  _s.validateStringLength(
    'password',
    password,
    1,
    128,
  );
  _s.validateStringLength(
    'userName',
    userName,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.DisableSso'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      if (password != null) 'Password': password,
      if (userName != null) 'UserName': userName,
    },
  );
}