import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { SetInstanceProtectionAnswer, SetInstanceProtectionQuery } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link SetInstanceProtectionCommand}. */ export interface SetInstanceProtectionCommandInput extends SetInstanceProtectionQuery { } /** * @public * * The output of {@link SetInstanceProtectionCommand}. */ export interface SetInstanceProtectionCommandOutput extends SetInstanceProtectionAnswer, __MetadataBearer { } declare const SetInstanceProtectionCommand_base: { new (input: SetInstanceProtectionCommandInput): import("@smithy/core/client").CommandImpl; new (input: SetInstanceProtectionCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Updates the instance protection settings of the specified instances. This operation * cannot be called on instances in a warm pool.

*

For more information, see Use * instance scale-in protection in the * Amazon EC2 Auto Scaling User Guide.

*

If you exceed your maximum limit of instance IDs, which is 50 per Auto Scaling group, the call * fails.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { AutoScalingClient, SetInstanceProtectionCommand } from "@aws-sdk/client-auto-scaling"; // ES Modules import * // const { AutoScalingClient, SetInstanceProtectionCommand } = require("@aws-sdk/client-auto-scaling"); // CommonJS import * // import type { AutoScalingClientConfig } from "@aws-sdk/client-auto-scaling"; * const config = {}; // type is AutoScalingClientConfig * const client = new AutoScalingClient(config); * const input = { // SetInstanceProtectionQuery * InstanceIds: [ // InstanceIds // required * "STRING_VALUE", * ], * AutoScalingGroupName: "STRING_VALUE", // required * ProtectedFromScaleIn: true || false, // required * }; * const command = new SetInstanceProtectionCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param SetInstanceProtectionCommandInput - {@link SetInstanceProtectionCommandInput} * @returns {@link SetInstanceProtectionCommandOutput} * @see {@link SetInstanceProtectionCommandInput} for command's `input` shape. * @see {@link SetInstanceProtectionCommandOutput} for command's `response` shape. * @see {@link AutoScalingClientResolvedConfig | config} for AutoScalingClient's `config` shape. * * @throws {@link LimitExceededFault} (client fault) *

You have already reached a limit for your Amazon EC2 Auto Scaling * resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For * more information, see DescribeAccountLimits in the Amazon EC2 Auto Scaling API * Reference.

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

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, * instance, or load balancer).

* * @throws {@link AutoScalingServiceException} *

Base exception class for all service exceptions from AutoScaling service.

* * * @example To enable instance protection for an instance * ```javascript * // This example enables instance protection for the specified instance. * const input = { * AutoScalingGroupName: "my-auto-scaling-group", * InstanceIds: [ * "i-93633f9b" * ], * ProtectedFromScaleIn: true * }; * const command = new SetInstanceProtectionCommand(input); * const response = await client.send(command); * /* response is * { /* metadata only *\/ } * *\/ * ``` * * @example To disable instance protection for an instance * ```javascript * // This example disables instance protection for the specified instance. * const input = { * AutoScalingGroupName: "my-auto-scaling-group", * InstanceIds: [ * "i-93633f9b" * ], * ProtectedFromScaleIn: false * }; * const command = new SetInstanceProtectionCommand(input); * const response = await client.send(command); * /* response is * { /* metadata only *\/ } * *\/ * ``` * * @public */ export declare class SetInstanceProtectionCommand extends SetInstanceProtectionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: SetInstanceProtectionQuery; output: {}; }; sdk: { input: SetInstanceProtectionCommandInput; output: SetInstanceProtectionCommandOutput; }; }; }