updateJobShipmentState method
Future<void>
updateJobShipmentState({
- required String jobId,
- required ShipmentState shipmentState,
Updates the state when a the shipment states changes to a different state.
May throw InvalidResourceException. May throw InvalidJobStateException.
Parameter jobId
:
The job ID of the job whose shipment date you want to update, for example
JID123e4567-e89b-12d3-a456-426655440000
.
Parameter shipmentState
:
The state of a device when it is being shipped.
Set to RECEIVED
when the device arrives at your location.
Set to RETURNED
when you have returned the device to AWS.
Implementation
Future<void> updateJobShipmentState({
required String jobId,
required ShipmentState shipmentState,
}) async {
ArgumentError.checkNotNull(jobId, 'jobId');
_s.validateStringLength(
'jobId',
jobId,
39,
39,
isRequired: true,
);
ArgumentError.checkNotNull(shipmentState, 'shipmentState');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.UpdateJobShipmentState'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobId': jobId,
'ShipmentState': shipmentState.toValue(),
},
);
}