listAssetRevisions method
Lists the revisions for the asset.
Prerequisites:
- The asset must exist in the domain.
- There must be at least one revision of the asset (which happens automatically after creation).
- The domain must be valid and active.
- User must have permissions on the asset and domain.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the domain.
Parameter identifier :
The identifier of the asset.
Parameter maxResults :
The maximum number of revisions to return in a single call to
ListAssetRevisions. When the number of revisions to be listed
is greater than the value of MaxResults, the response
contains a NextToken value that you can use in a subsequent
call to ListAssetRevisions to list the next set of revisions.
Parameter nextToken :
When the number of revisions is greater than the default value for the
MaxResults parameter, or if you explicitly specify a value
for MaxResults that is less than the number of revisions, the
response includes a pagination token named NextToken. You can
specify this NextToken value in a subsequent call to
ListAssetRevisions to list the next set of revisions.
Implementation
Future<ListAssetRevisionsOutput> listAssetRevisions({
required String domainIdentifier,
required String identifier,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
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:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/assets/${Uri.encodeComponent(identifier)}/revisions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAssetRevisionsOutput.fromJson(response);
}