deletePool method

Future<DeletePoolResult> deletePool({
  1. required String poolId,
})

Deletes an existing pool. Deleting a pool disassociates all origination identities from that pool.

If the pool status isn't active or if deletion protection is enabled, an error is returned.

A pool is a collection of phone numbers and SenderIds. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.

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

Parameter poolId : The PoolId or PoolArn of the pool to delete. You can use DescribePools to find the values for PoolId and PoolArn .

Implementation

Future<DeletePoolResult> deletePool({
  required String poolId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PinpointSMSVoiceV2.DeletePool'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'PoolId': poolId,
    },
  );

  return DeletePoolResult.fromJson(jsonResponse.body);
}