getResources method
- String? authenticationToken,
- ResourceCollectionType? collectionType,
- int? limit,
- String? marker,
- String? userId,
Retrieves a collection of resources, including folders and documents. The
only CollectionType supported is SHARED_WITH_ME.
May throw UnauthorizedResourceAccessException. May throw UnauthorizedOperationException. May throw InvalidArgumentException. May throw FailedDependencyException. May throw ServiceUnavailableException.
Parameter authenticationToken :
The Amazon WorkDocs authentication token. Not required when using AWS
administrator credentials to access the API.
Parameter collectionType :
The collection type.
Parameter limit :
The maximum number of resources to return.
Parameter marker :
The marker for the next set of results. This marker was received from a
previous call.
Parameter userId :
The user ID for the resource collection. This is a required field for
accessing the API operation using IAM credentials.
Implementation
Future<GetResourcesResponse> getResources({
  String? authenticationToken,
  ResourceCollectionType? collectionType,
  int? limit,
  String? marker,
  String? userId,
}) async {
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    2048,
  );
  _s.validateStringLength(
    'userId',
    userId,
    1,
    256,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  final $query = <String, List<String>>{
    if (collectionType != null) 'collectionType': [collectionType.toValue()],
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
    if (userId != null) 'userId': [userId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/api/v1/resources',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return GetResourcesResponse.fromJson(response);
}