describeGroups method
Describes the groups specified by the query. Groups are defined by the underlying Active Directory.
May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException. May throw FailedDependencyException. May throw ServiceUnavailableException.
Parameter searchQuery
:
A query to describe groups by group name.
Parameter authenticationToken
:
Amazon WorkDocs authentication token. Not required when using AWS
administrator credentials to access the API.
Parameter limit
:
The maximum number of items to return with this call.
Parameter marker
:
The marker for the next set of results. (You received this marker from a
previous call.)
Parameter organizationId
:
The ID of the organization.
Implementation
Future<DescribeGroupsResponse> describeGroups({
required String searchQuery,
String? authenticationToken,
int? limit,
String? marker,
String? organizationId,
}) async {
ArgumentError.checkNotNull(searchQuery, 'searchQuery');
_s.validateStringLength(
'searchQuery',
searchQuery,
1,
512,
isRequired: true,
);
_s.validateStringLength(
'authenticationToken',
authenticationToken,
1,
8199,
);
_s.validateNumRange(
'limit',
limit,
1,
1152921504606846976,
);
_s.validateStringLength(
'marker',
marker,
1,
2048,
);
_s.validateStringLength(
'organizationId',
organizationId,
1,
256,
);
final headers = <String, String>{
if (authenticationToken != null)
'Authentication': authenticationToken.toString(),
};
final $query = <String, List<String>>{
'searchQuery': [searchQuery],
if (limit != null) 'limit': [limit.toString()],
if (marker != null) 'marker': [marker],
if (organizationId != null) 'organizationId': [organizationId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/api/v1/groups',
queryParams: $query,
headers: headers,
exceptionFnMap: _exceptionFns,
);
return DescribeGroupsResponse.fromJson(response);
}