createMilestone method
Create a milestone for an existing workload.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Implementation
Future<CreateMilestoneOutput> createMilestone({
required String milestoneName,
required String workloadId,
String? clientRequestToken,
}) async {
final $payload = <String, dynamic>{
'MilestoneName': milestoneName,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/workloads/${Uri.encodeComponent(workloadId)}/milestones',
exceptionFnMap: _exceptionFns,
);
return CreateMilestoneOutput.fromJson(response);
}