listResourceTenants method

Future<ListResourceTenantsResponse> listResourceTenants({
  1. required String resourceArn,
  2. String? nextToken,
  3. int? pageSize,
})

List all tenants associated with a specific resource.

This operation returns a list of tenants that are associated with the specified resource. This is useful for understanding which tenants are currently using a particular resource such as an email identity, configuration set, or email template.

May throw BadRequestException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource to list associated tenants for.

Parameter nextToken : A token returned from a previous call to ListResourceTenants to indicate the position in the list of resource tenants.

Parameter pageSize : The number of results to show in a single call to ListResourceTenants. 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<ListResourceTenantsResponse> listResourceTenants({
  required String resourceArn,
  String? nextToken,
  int? pageSize,
}) async {
  final $payload = <String, dynamic>{
    'ResourceArn': resourceArn,
    if (nextToken != null) 'NextToken': nextToken,
    if (pageSize != null) 'PageSize': pageSize,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/email/resources/tenants/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListResourceTenantsResponse.fromJson(response);
}