listShares method
Retrieves the resource shares associated with an account. Use the filter parameter to retrieve a specific subset of the shares.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceOwner :
The account that owns the resource shares.
Parameter filter :
Attributes that you use to filter for a specific subset of resource
shares.
Parameter maxResults :
The maximum number of shares to return in one page of results.
Parameter nextToken :
Next token returned in the response of a previous
ListReadSetUploadPartsRequest call. Used to get the next page of results.
Implementation
Future<ListSharesResponse> listShares({
required ResourceOwner resourceOwner,
Filter? filter,
int? maxResults,
String? nextToken,
}) async {
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final $payload = <String, dynamic>{
'resourceOwner': resourceOwner.value,
if (filter != null) 'filter': filter,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/shares',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListSharesResponse.fromJson(response);
}