- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateJobForDevicesCommand
Creates a job to run on a device. A job can update a device's software or reboot it.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PanoramaClient, CreateJobForDevicesCommand } from "@aws-sdk/client-panorama"; // ES Modules import
// const { PanoramaClient, CreateJobForDevicesCommand } = require("@aws-sdk/client-panorama"); // CommonJS import
const client = new PanoramaClient(config);
const input = { // CreateJobForDevicesRequest
DeviceIds: [ // DeviceIdList // required
"STRING_VALUE",
],
DeviceJobConfig: { // DeviceJobConfig
OTAJobConfig: { // OTAJobConfig
ImageVersion: "STRING_VALUE", // required
AllowMajorVersionUpdate: true || false,
},
},
JobType: "STRING_VALUE", // required
};
const command = new CreateJobForDevicesCommand(input);
const response = await client.send(command);
// { // CreateJobForDevicesResponse
// Jobs: [ // JobList // required
// { // Job
// JobId: "STRING_VALUE",
// DeviceId: "STRING_VALUE",
// },
// ],
// };
CreateJobForDevicesCommand Input
See CreateJobForDevicesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DeviceIds Required | string[] | undefined | ID of target device. |
JobType Required | JobType | undefined | The type of job to run. |
DeviceJobConfig | DeviceJobConfig | undefined | Configuration settings for a software update job. |
CreateJobForDevicesCommand Output
See CreateJobForDevicesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Jobs Required | Job[] | undefined | A list of jobs. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The requestor does not have permission to access the target action or resource. |
ConflictException | client | The target resource is in use. |
InternalServerException | server | An internal error occurred. |
ResourceNotFoundException | client | The target resource was not found. |
ValidationException | client | The request contains an invalid parameter value. |
PanoramaServiceException | Base exception class for all service exceptions from Panorama service. |