- 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.
CancelJobCommand
This operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataExchangeClient, CancelJobCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import
// const { DataExchangeClient, CancelJobCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import
const client = new DataExchangeClient(config);
const input = { // CancelJobRequest
JobId: "STRING_VALUE", // required
};
const command = new CancelJobCommand(input);
const response = await client.send(command);
// {};
CancelJobCommand Input
See CancelJobCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
JobId Required | string | undefined | The unique identifier for a job. |
CancelJobCommand Output
See CancelJobCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConflictException | client | The request couldn't be completed because it conflicted with the current state of the resource. |
InternalServerException | server | An exception occurred with the service. |
ResourceNotFoundException | client | The resource couldn't be found. |
ThrottlingException | client | The limit on the number of requests per second was exceeded. |
ValidationException | client | The request was invalid. |
DataExchangeServiceException | Base exception class for all service exceptions from DataExchange service. |