import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient"; import type { CancelQueryRequest, CancelQueryResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CancelQueryCommand}. */ export interface CancelQueryCommandInput extends CancelQueryRequest { } /** * @public * * The output of {@link CancelQueryCommand}. */ export interface CancelQueryCommandOutput extends CancelQueryResponse, __MetadataBearer { } declare const CancelQueryCommand_base: { new (input: CancelQueryCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CancelQueryCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Cancels a query if the query is not in a terminated state, such as * CANCELLED, FAILED, TIMED_OUT, or * FINISHED. You must specify an ARN value for EventDataStore. * The ID of the query that you want to cancel is also required. When you run * CancelQuery, the query status might show as CANCELLED even if * the operation is not yet finished.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudTrailClient, CancelQueryCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import * // const { CloudTrailClient, CancelQueryCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import * // import type { CloudTrailClientConfig } from "@aws-sdk/client-cloudtrail"; * const config = {}; // type is CloudTrailClientConfig * const client = new CloudTrailClient(config); * const input = { // CancelQueryRequest * EventDataStore: "STRING_VALUE", * QueryId: "STRING_VALUE", // required * EventDataStoreOwnerAccountId: "STRING_VALUE", * }; * const command = new CancelQueryCommand(input); * const response = await client.send(command); * // { // CancelQueryResponse * // QueryId: "STRING_VALUE", // required * // QueryStatus: "QUEUED" || "RUNNING" || "FINISHED" || "FAILED" || "CANCELLED" || "TIMED_OUT", // required * // EventDataStoreOwnerAccountId: "STRING_VALUE", * // }; * * ``` * * @param CancelQueryCommandInput - {@link CancelQueryCommandInput} * @returns {@link CancelQueryCommandOutput} * @see {@link CancelQueryCommandInput} for command's `input` shape. * @see {@link CancelQueryCommandOutput} for command's `response` shape. * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. * * @throws {@link ConflictException} (client fault) *

This exception is thrown when the specified resource is not ready for an operation. This * can occur when you try to run an operation on a resource before CloudTrail has time * to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the * operation again.

* * @throws {@link EventDataStoreARNInvalidException} (client fault) *

The specified event data store ARN is not valid or does not map to an event data store * in your account.

* * @throws {@link EventDataStoreNotFoundException} (client fault) *

The specified event data store was not found.

* * @throws {@link InactiveEventDataStoreException} (client fault) *

The event data store is inactive.

* * @throws {@link InactiveQueryException} (client fault) *

The specified query cannot be canceled because it is in the FINISHED, * FAILED, TIMED_OUT, or CANCELLED state.

* * @throws {@link InvalidParameterException} (client fault) *

The request includes a parameter that is not valid.

* * @throws {@link NoManagementAccountSLRExistsException} (client fault) *

This exception is thrown when the management account does not have a service-linked * role.

* * @throws {@link OperationNotPermittedException} (client fault) *

This exception is thrown when the requested operation is not permitted.

* * @throws {@link QueryIdNotFoundException} (client fault) *

The query ID does not exist or does not map to a query.

* * @throws {@link UnsupportedOperationException} (client fault) *

This exception is thrown when the requested operation is not supported.

* * @throws {@link CloudTrailServiceException} *

Base exception class for all service exceptions from CloudTrail service.

* * * @public */ export declare class CancelQueryCommand extends CancelQueryCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CancelQueryRequest; output: CancelQueryResponse; }; sdk: { input: CancelQueryCommandInput; output: CancelQueryCommandOutput; }; }; }