import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EventBridgeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EventBridgeClient"; import type { RemoveTargetsRequest, RemoveTargetsResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link RemoveTargetsCommand}. */ export interface RemoveTargetsCommandInput extends RemoveTargetsRequest { } /** * @public * * The output of {@link RemoveTargetsCommand}. */ export interface RemoveTargetsCommandOutput extends RemoveTargetsResponse, __MetadataBearer { } declare const RemoveTargetsCommand_base: { new (input: RemoveTargetsCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: RemoveTargetsCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Removes the specified targets from the specified rule. When the rule is triggered, those * targets are no longer be invoked.

* *

A successful execution of RemoveTargets doesn't guarantee all targets are * removed from the rule, it means that the target(s) listed in the request are removed.

*
*

When you remove a target, when the associated rule triggers, removed targets might * continue to be invoked. Allow a short period of time for changes to take effect.

*

This action can partially fail if too many requests are made at the same time. If that * happens, FailedEntryCount is non-zero in the response and each entry in * FailedEntries provides the ID of the failed target and the error code.

*

The maximum number of entries per request is 10.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { EventBridgeClient, RemoveTargetsCommand } from "@aws-sdk/client-eventbridge"; // ES Modules import * // const { EventBridgeClient, RemoveTargetsCommand } = require("@aws-sdk/client-eventbridge"); // CommonJS import * // import type { EventBridgeClientConfig } from "@aws-sdk/client-eventbridge"; * const config = {}; // type is EventBridgeClientConfig * const client = new EventBridgeClient(config); * const input = { // RemoveTargetsRequest * Rule: "STRING_VALUE", // required * EventBusName: "STRING_VALUE", * Ids: [ // TargetIdList // required * "STRING_VALUE", * ], * Force: true || false, * }; * const command = new RemoveTargetsCommand(input); * const response = await client.send(command); * // { // RemoveTargetsResponse * // FailedEntryCount: Number("int"), * // FailedEntries: [ // RemoveTargetsResultEntryList * // { // RemoveTargetsResultEntry * // TargetId: "STRING_VALUE", * // ErrorCode: "STRING_VALUE", * // ErrorMessage: "STRING_VALUE", * // }, * // ], * // }; * * ``` * * @param RemoveTargetsCommandInput - {@link RemoveTargetsCommandInput} * @returns {@link RemoveTargetsCommandOutput} * @see {@link RemoveTargetsCommandInput} for command's `input` shape. * @see {@link RemoveTargetsCommandOutput} for command's `response` shape. * @see {@link EventBridgeClientResolvedConfig | config} for EventBridgeClient's `config` shape. * * @throws {@link ConcurrentModificationException} (client fault) *

There is concurrent modification on a rule, target, archive, or replay.

* * @throws {@link InternalException} (server fault) *

This exception occurs due to unexpected causes.

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

This rule was created by an Amazon Web Services service on behalf of your account. It is * managed by that service. If you see this error in response to DeleteRule or * RemoveTargets, you can use the Force parameter in those calls to * delete the rule or remove targets from the rule. You cannot modify these managed rules by * using DisableRule, EnableRule, PutTargets, * PutRule, TagResource, or UntagResource.

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

An entity that you specified does not exist.

* * @throws {@link EventBridgeServiceException} *

Base exception class for all service exceptions from EventBridge service.

* * * @public */ export declare class RemoveTargetsCommand extends RemoveTargetsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: RemoveTargetsRequest; output: RemoveTargetsResponse; }; sdk: { input: RemoveTargetsCommandInput; output: RemoveTargetsCommandOutput; }; }; }