listRevisionAssets method

Future<ListRevisionAssetsResponse> listRevisionAssets({
  1. required String dataSetId,
  2. required String revisionId,
  3. int? maxResults,
  4. String? nextToken,
})

This operation lists a revision's assets sorted alphabetically in descending order.

May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException. May throw InternalServerException.

Parameter dataSetId : The unique identifier for a data set.

Parameter revisionId : The unique identifier for a revision.

Parameter maxResults : The maximum number of results returned by a single call.

Parameter nextToken : The token value retrieved from a previous call to access the next page of results.

Implementation

Future<ListRevisionAssetsResponse> listRevisionAssets({
  required String dataSetId,
  required String revisionId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(dataSetId, 'dataSetId');
  ArgumentError.checkNotNull(revisionId, 'revisionId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/data-sets/${Uri.encodeComponent(dataSetId)}/revisions/${Uri.encodeComponent(revisionId)}/assets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRevisionAssetsResponse.fromJson(response);
}