adminForgetDevice method

Future<void> adminForgetDevice({
  1. required String deviceKey,
  2. required String userPoolId,
  3. required String username,
})

Forgets the device, as an administrator.

Calling this action requires developer credentials.

May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InvalidUserPoolConfigurationException. May throw TooManyRequestsException. May throw NotAuthorizedException. May throw UserNotFoundException. May throw InternalErrorException.

Parameter deviceKey : The device key.

Parameter userPoolId : The user pool ID.

Parameter username : The user name.

Implementation

Future<void> adminForgetDevice({
  required String deviceKey,
  required String userPoolId,
  required String username,
}) async {
  ArgumentError.checkNotNull(deviceKey, 'deviceKey');
  _s.validateStringLength(
    'deviceKey',
    deviceKey,
    1,
    55,
    isRequired: true,
  );
  ArgumentError.checkNotNull(userPoolId, 'userPoolId');
  _s.validateStringLength(
    'userPoolId',
    userPoolId,
    1,
    55,
    isRequired: true,
  );
  ArgumentError.checkNotNull(username, 'username');
  _s.validateStringLength(
    'username',
    username,
    1,
    128,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSCognitoIdentityProviderService.AdminForgetDevice'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeviceKey': deviceKey,
      'UserPoolId': userPoolId,
      'Username': username,
    },
  );
}