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
3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 | |