listTenantResources method
List all resources associated with a specific tenant.
This operation returns a list of resources (email identities, configuration sets, or email templates) that are associated with the specified tenant. You can optionally filter the results by resource type.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter tenantName :
The name of the tenant to list resources for.
Parameter filter :
A map of filter keys and values for filtering the list of tenant
resources. Currently, the only supported filter key is
RESOURCE_TYPE.
Parameter nextToken :
A token returned from a previous call to ListTenantResources
to indicate the position in the list of tenant resources.
Parameter pageSize :
The number of results to show in a single call to
ListTenantResources. 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<ListTenantResourcesResponse> listTenantResources({
required String tenantName,
Map<ListTenantResourcesFilterKey, String>? filter,
String? nextToken,
int? pageSize,
}) async {
final $payload = <String, dynamic>{
'TenantName': tenantName,
if (filter != null) 'Filter': filter.map((k, e) => MapEntry(k.value, e)),
if (nextToken != null) 'NextToken': nextToken,
if (pageSize != null) 'PageSize': pageSize,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/email/tenants/resources/list',
exceptionFnMap: _exceptionFns,
);
return ListTenantResourcesResponse.fromJson(response);
}