describeResourcePermissions method

Future<DescribeResourcePermissionsResponse> describeResourcePermissions({
  1. required String resourceId,
  2. String? authenticationToken,
  3. int? limit,
  4. String? marker,
  5. String? principalId,
})

Describes the permissions of a specified resource.

May throw FailedDependencyException. May throw InvalidArgumentException. May throw ServiceUnavailableException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException.

Parameter resourceId : The ID of the resource.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using Amazon Web Services 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 principalId : The ID of the principal to filter permissions by.

Implementation

Future<DescribeResourcePermissionsResponse> describeResourcePermissions({
  required String resourceId,
  String? authenticationToken,
  int? limit,
  String? marker,
  String? principalId,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  final $query = <String, List<String>>{
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
    if (principalId != null) 'principalId': [principalId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/api/v1/resources/${Uri.encodeComponent(resourceId)}/permissions',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeResourcePermissionsResponse.fromJson(response);
}