Jump to Content

Class CancelJobCommandProtected

This operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.

Example

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 = {
JobId: "STRING_VALUE", // required
};
const command = new CancelJobCommand(input);
const response = await client.send(command);

Param

CancelJobCommandInput

Returns

CancelJobCommandOutput

See

Throws

ConflictException (client fault)

The request couldn't be completed because it conflicted with the current state of the resource.

Throws

InternalServerException (server fault)

An exception occurred with the service.

Throws

ResourceNotFoundException (client fault)

The resource couldn't be found.

Throws

ThrottlingException (client fault)

The limit on the number of requests per second was exceeded.

Throws

ValidationException (client fault)

The request was invalid.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<CancelJobCommandInput, CancelJobCommandOutput>

Methods