UpdateJobShipmentStateCommand

Updates the state when a shipment state changes to a different state.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SnowballClient, UpdateJobShipmentStateCommand } from "@aws-sdk/client-snowball"; // ES Modules import
// const { SnowballClient, UpdateJobShipmentStateCommand } = require("@aws-sdk/client-snowball"); // CommonJS import
const client = new SnowballClient(config);
const input = { // UpdateJobShipmentStateRequest
  JobId: "STRING_VALUE", // required
  ShipmentState: "RECEIVED" || "RETURNED", // required
};
const command = new UpdateJobShipmentStateCommand(input);
const response = await client.send(command);
// {};

UpdateJobShipmentStateCommand Input

Parameter
Type
Description
JobId
Required
string | undefined

The job ID of the job whose shipment date you want to update, for example JID123e4567-e89b-12d3-a456-426655440000.

ShipmentState
Required
ShipmentState | undefined

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 Amazon Web Services.

UpdateJobShipmentStateCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InvalidJobStateException
client

The action can't be performed because the job's current state doesn't allow that action to be performed.

InvalidResourceException
client

The specified resource can't be found. Check the information you provided in your last request, and try again.

SnowballServiceException
Base exception class for all service exceptions from Snowball service.