import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { DetachInstancesAnswer, DetachInstancesQuery } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link DetachInstancesCommand}. */ export interface DetachInstancesCommandInput extends DetachInstancesQuery { } /** * @public * * The output of {@link DetachInstancesCommand}. */ export interface DetachInstancesCommandOutput extends DetachInstancesAnswer, __MetadataBearer { } declare const DetachInstancesCommand_base: { new (input: DetachInstancesCommandInput): import("@smithy/core/client").CommandImpl; new (input: DetachInstancesCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Removes one or more instances from the specified Auto Scaling group.

*

After the instances are detached, you can manage them independent of the Auto Scaling * group.

*

If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches * instances to replace the ones that are detached.

*

If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are * deregistered from the load balancer. If there are target groups attached to the Auto Scaling * group, the instances are deregistered from the target groups.

*

For more information, see Detach * or attach instances in the Amazon EC2 Auto Scaling User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { AutoScalingClient, DetachInstancesCommand } from "@aws-sdk/client-auto-scaling"; // ES Modules import * // const { AutoScalingClient, DetachInstancesCommand } = 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 = { // DetachInstancesQuery * InstanceIds: [ // InstanceIds * "STRING_VALUE", * ], * AutoScalingGroupName: "STRING_VALUE", // required * ShouldDecrementDesiredCapacity: true || false, // required * }; * const command = new DetachInstancesCommand(input); * const response = await client.send(command); * // { // DetachInstancesAnswer * // Activities: [ // Activities * // { // Activity * // ActivityId: "STRING_VALUE", // required * // AutoScalingGroupName: "STRING_VALUE", // required * // Description: "STRING_VALUE", * // Cause: "STRING_VALUE", // required * // StartTime: new Date("TIMESTAMP"), // required * // EndTime: new Date("TIMESTAMP"), * // StatusCode: "PendingSpotBidPlacement" || "WaitingForSpotInstanceRequestId" || "WaitingForSpotInstanceId" || "WaitingForInstanceId" || "PreInService" || "InProgress" || "WaitingForELBConnectionDraining" || "MidLifecycleAction" || "WaitingForInstanceWarmup" || "Successful" || "Failed" || "Cancelled" || "WaitingForConnectionDraining" || "WaitingForInPlaceUpdateToStart" || "WaitingForInPlaceUpdateToFinalize" || "InPlaceUpdateInProgress", // required * // StatusMessage: "STRING_VALUE", * // Progress: Number("int"), * // Details: "STRING_VALUE", * // AutoScalingGroupState: "STRING_VALUE", * // AutoScalingGroupARN: "STRING_VALUE", * // }, * // ], * // }; * * ``` * * @param DetachInstancesCommandInput - {@link DetachInstancesCommandInput} * @returns {@link DetachInstancesCommandOutput} * @see {@link DetachInstancesCommandInput} for command's `input` shape. * @see {@link DetachInstancesCommandOutput} for command's `response` shape. * @see {@link AutoScalingClientResolvedConfig | config} for AutoScalingClient's `config` shape. * * @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 detach an instance from an Auto Scaling group * ```javascript * // This example detaches the specified instance from the specified Auto Scaling group. * const input = { * AutoScalingGroupName: "my-auto-scaling-group", * InstanceIds: [ * "i-93633f9b" * ], * ShouldDecrementDesiredCapacity: true * }; * const command = new DetachInstancesCommand(input); * const response = await client.send(command); * /* response is * { * Activities: [ * { * ActivityId: "5091cb52-547a-47ce-a236-c9ccbc2cb2c9", * AutoScalingGroupName: "my-auto-scaling-group", * Cause: "At 2015-04-12T15:02:16Z instance i-93633f9b was detached in response to a user request, shrinking the capacity from 2 to 1.", * Description: "Detaching EC2 instance: i-93633f9b", * Details: "details", * Progress: 50, * StartTime: "2015-04-12T15:02:16.179Z", * StatusCode: "InProgress" * } * ] * } * *\/ * ``` * * @public */ export declare class DetachInstancesCommand extends DetachInstancesCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DetachInstancesQuery; output: DetachInstancesAnswer; }; sdk: { input: DetachInstancesCommandInput; output: DetachInstancesCommandOutput; }; }; }