describePools method
Retrieves the specified pools or all pools associated with your Amazon Web Services account.
If you specify pool IDs, the output includes information for only the specified pools. If you specify filters, the output includes information for only those pools that meet the filter criteria. If you don't specify pool IDs or filters, the output includes information for all pools.
If you specify a pool ID that isn't valid, 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 InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter filters :
An array of PoolFilter objects to filter the results.
Parameter maxResults :
The maximum number of results to return per each request.
Parameter nextToken :
The token to be used for the next set of paginated results. You don't need
to supply a value for this field in the initial request.
Parameter owner :
Use SELF to filter the list of Pools to ones your account
owns or use SHARED to filter on Pools shared with your
account. The Owner and PoolIds parameters can't
be used at the same time.
Parameter poolIds :
The unique identifier of pools to find. This is an array of strings that
can be either the PoolId or PoolArn.
Implementation
Future<DescribePoolsResult> describePools({
List<PoolFilter>? filters,
int? maxResults,
String? nextToken,
Owner? owner,
List<String>? poolIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.DescribePools'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (owner != null) 'Owner': owner.value,
if (poolIds != null) 'PoolIds': poolIds,
},
);
return DescribePoolsResult.fromJson(jsonResponse.body);
}