listMilestones method
List all milestones for an existing workload.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Implementation
Future<ListMilestonesOutput> listMilestones({
required String workloadId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workloads/${Uri.encodeComponent(workloadId)}/milestonesSummaries',
exceptionFnMap: _exceptionFns,
);
return ListMilestonesOutput.fromJson(response);
}