- 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.
StopJobCommand
Initiates a stop request for the current job. AWS Device Farm immediately stops the job on the device where tests have not started. You are not billed for this device. On the device where tests have started, setup suite and teardown suite tests run to completion on the device. You are billed for setup, teardown, and any tests that were in progress or already completed.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DeviceFarmClient, StopJobCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, StopJobCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // StopJobRequest
arn: "STRING_VALUE", // required
};
const command = new StopJobCommand(input);
const response = await client.send(command);
// { // StopJobResult
// job: { // Job
// arn: "STRING_VALUE",
// name: "STRING_VALUE",
// type: "BUILTIN_FUZZ" || "APPIUM_JAVA_JUNIT" || "APPIUM_JAVA_TESTNG" || "APPIUM_PYTHON" || "APPIUM_NODE" || "APPIUM_RUBY" || "APPIUM_WEB_JAVA_JUNIT" || "APPIUM_WEB_JAVA_TESTNG" || "APPIUM_WEB_PYTHON" || "APPIUM_WEB_NODE" || "APPIUM_WEB_RUBY" || "INSTRUMENTATION" || "XCTEST" || "XCTEST_UI",
// created: new Date("TIMESTAMP"),
// status: "PENDING" || "PENDING_CONCURRENCY" || "PENDING_DEVICE" || "PROCESSING" || "SCHEDULING" || "PREPARING" || "RUNNING" || "COMPLETED" || "STOPPING",
// result: "PENDING" || "PASSED" || "WARNED" || "FAILED" || "SKIPPED" || "ERRORED" || "STOPPED",
// started: new Date("TIMESTAMP"),
// stopped: new Date("TIMESTAMP"),
// counters: { // Counters
// total: Number("int"),
// passed: Number("int"),
// failed: Number("int"),
// warned: Number("int"),
// errored: Number("int"),
// stopped: Number("int"),
// skipped: Number("int"),
// },
// message: "STRING_VALUE",
// device: { // Device
// arn: "STRING_VALUE",
// name: "STRING_VALUE",
// manufacturer: "STRING_VALUE",
// model: "STRING_VALUE",
// modelId: "STRING_VALUE",
// formFactor: "PHONE" || "TABLET",
// platform: "ANDROID" || "IOS",
// os: "STRING_VALUE",
// cpu: { // CPU
// frequency: "STRING_VALUE",
// architecture: "STRING_VALUE",
// clock: Number("double"),
// },
// resolution: { // Resolution
// width: Number("int"),
// height: Number("int"),
// },
// heapSize: Number("long"),
// memory: Number("long"),
// image: "STRING_VALUE",
// carrier: "STRING_VALUE",
// radio: "STRING_VALUE",
// remoteAccessEnabled: true || false,
// remoteDebugEnabled: true || false,
// fleetType: "STRING_VALUE",
// fleetName: "STRING_VALUE",
// instances: [ // DeviceInstances
// { // DeviceInstance
// arn: "STRING_VALUE",
// deviceArn: "STRING_VALUE",
// labels: [ // InstanceLabels
// "STRING_VALUE",
// ],
// status: "IN_USE" || "PREPARING" || "AVAILABLE" || "NOT_AVAILABLE",
// udid: "STRING_VALUE",
// instanceProfile: { // InstanceProfile
// arn: "STRING_VALUE",
// packageCleanup: true || false,
// excludeAppPackagesFromCleanup: [ // PackageIds
// "STRING_VALUE",
// ],
// rebootAfterUse: true || false,
// name: "STRING_VALUE",
// description: "STRING_VALUE",
// },
// },
// ],
// availability: "TEMPORARY_NOT_AVAILABLE" || "BUSY" || "AVAILABLE" || "HIGHLY_AVAILABLE",
// },
// instanceArn: "STRING_VALUE",
// deviceMinutes: { // DeviceMinutes
// total: Number("double"),
// metered: Number("double"),
// unmetered: Number("double"),
// },
// videoEndpoint: "STRING_VALUE",
// videoCapture: true || false,
// },
// };
StopJobCommand Input
See StopJobCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
arn Required | string | undefined | Represents the Amazon Resource Name (ARN) of the Device Farm job to stop. |
StopJobCommand Output
See StopJobCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
job | Job | undefined | The job that was stopped. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ArgumentException | client | An invalid argument was specified. |
LimitExceededException | client | A limit was exceeded. |
NotFoundException | client | The specified entity was not found. |
ServiceAccountException | client | There was a problem with the service account. |
DeviceFarmServiceException | Base exception class for all service exceptions from DeviceFarm service. |