completeRollout method
Marks a rollout as complete, indicating that no further turns will be appended to the trajectory. After calling this operation, the trajectory is sealed and eligible for reward submission via the UpdateReward operation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServiceError.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter jobArn :
The job ARN.
Parameter trajectoryId :
The trajectory ID to mark as complete.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter status :
The target status for the trajectory. Defaults to READY if not specified.
Set to FAILED if the rollout encountered an error and the trajectory
should not be used for processing.
Implementation
Future<void> completeRollout({
required String jobArn,
required String trajectoryId,
String? clientToken,
CompletionStatus? status,
}) async {
final headers = <String, String>{
'X-Amzn-SageMaker-Job-Arn': jobArn.toString(),
};
final $payload = <String, dynamic>{
'TrajectoryId': trajectoryId,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (status != null) 'Status': status.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/complete-rollout',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}