listMemberships method
Returns a paginated list of membership summaries for the specified agent space within an application.
Parameter agentSpaceId :
The unique identifier of the agent space to list memberships for.
Parameter applicationId :
The unique identifier of the application that contains the agent space.
Parameter maxResults :
The maximum number of results to return in a single call.
Parameter memberType :
Filter memberships by member type.
Parameter nextToken :
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the first request. For
subsequent calls, use the nextToken value returned from the previous
request.
Implementation
Future<ListMembershipsResponse> listMemberships({
required String agentSpaceId,
required String applicationId,
int? maxResults,
MembershipTypeFilter? memberType,
String? nextToken,
}) async {
final $payload = <String, dynamic>{
'agentSpaceId': agentSpaceId,
'applicationId': applicationId,
if (maxResults != null) 'maxResults': maxResults,
if (memberType != null) 'memberType': memberType.value,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListMemberships',
exceptionFnMap: _exceptionFns,
);
return ListMembershipsResponse.fromJson(response);
}