deleteResourceServer method

Future<void> deleteResourceServer({
  1. required String identifier,
  2. required String userPoolId,
})

Deletes a resource server.

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

Parameter identifier : The identifier for the resource server.

Parameter userPoolId : The user pool ID for the user pool that hosts the resource server.

Implementation

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