listTenants method
List all tenants associated with your account in the current Amazon Web Services Region.
This operation returns basic information about each tenant, such as tenant name, ID, ARN, and creation timestamp.
May throw BadRequestException.
May throw TooManyRequestsException.
Parameter nextToken :
A token returned from a previous call to ListTenants to
indicate the position in the list of tenants.
Parameter pageSize :
The number of results to show in a single call to
ListTenants. If the number of results is larger than the
number you specified in this parameter, then the response includes a
NextToken element, which you can use to obtain additional
results.
Implementation
Future<ListTenantsResponse> listTenants({
String? nextToken,
int? pageSize,
}) async {
final $payload = <String, dynamic>{
if (nextToken != null) 'NextToken': nextToken,
if (pageSize != null) 'PageSize': pageSize,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/email/tenants/list',
exceptionFnMap: _exceptionFns,
);
return ListTenantsResponse.fromJson(response);
}