enter_standby
async
¶
enter_standby(
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
instance_ids: Optional[InstanceIds] = None,
auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
should_decrement_desired_capacity: Optional[ShouldDecrementDesiredCapacity] = None,
) -> EnterStandbyAnswer
Moves the specified instances into the standby state.
If you choose to decrement the desired capacity of the Auto Scaling group, the instances can enter standby as long as the desired capacity of the Auto Scaling group after the instances are placed into standby is equal to or greater than the minimum capacity of the group.
If you choose not to decrement the desired capacity of the Auto Scaling group, the Auto Scaling group launches new instances to replace the instances on standby.
For more information, see Temporarily removing instances from your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
Parameters:
-
instance_ids(Optional[InstanceIds], default:None) –The IDs of the instances. You can specify up to 20 instances.
-
auto_scaling_group_name(Optional[XmlStringMaxLen255], default:None) –The name of the Auto Scaling group.
-
should_decrement_desired_capacity(Optional[ShouldDecrementDesiredCapacity], default:None) –Indicates whether to decrement the desired capacity of the Auto Scaling group by the number of instances moved to
Standbymode.
Raises:
-
ResourceContentionFault–You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To move instances into standby mode This example puts the specified instance into standby mode.
>>> await client.enter_standby(instance_ids=['i-93633f9b'], auto_scaling_group_name='my-auto-scaling-group', should_decrement_desired_capacity=True)
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 | |