- 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.
CancelResourceRequestCommand
Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the Amazon Web Services Cloud Control API User Guide.
Only resource operations requests with a status of PENDING
or IN_PROGRESS
can be canceled.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudControlClient, CancelResourceRequestCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import
// const { CloudControlClient, CancelResourceRequestCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import
const client = new CloudControlClient(config);
const input = { // CancelResourceRequestInput
RequestToken: "STRING_VALUE", // required
};
const command = new CancelResourceRequestCommand(input);
const response = await client.send(command);
// { // CancelResourceRequestOutput
// ProgressEvent: { // ProgressEvent
// TypeName: "STRING_VALUE",
// Identifier: "STRING_VALUE",
// RequestToken: "STRING_VALUE",
// HooksRequestToken: "STRING_VALUE",
// Operation: "STRING_VALUE",
// OperationStatus: "STRING_VALUE",
// EventTime: new Date("TIMESTAMP"),
// ResourceModel: "STRING_VALUE",
// StatusMessage: "STRING_VALUE",
// ErrorCode: "STRING_VALUE",
// RetryAfter: new Date("TIMESTAMP"),
// },
// };
CancelResourceRequestCommand Input
See CancelResourceRequestCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
RequestToken Required | string | undefined | The |
CancelResourceRequestCommand Output
See CancelResourceRequestCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ProgressEvent | ProgressEvent | undefined | Represents the current status of a resource operation request. For more information, see Managing resource operation requests in the Amazon Web Services Cloud Control API User Guide. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentModificationException | server | The resource is currently being modified by another operation. |
RequestTokenNotFoundException | client | A resource operation with the specified request token can't be found. |
CloudControlServiceException | Base exception class for all service exceptions from CloudControl service. |