There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DescribeTerminationPolicyTypes
with a CLI
The following code examples show how to use DescribeTerminationPolicyTypes
.
- CLI
-
- AWS CLI
-
To describe available termination policy types
This example describes the available termination policy types.
aws autoscaling describe-termination-policy-types
Output:
{ "TerminationPolicyTypes": [ "AllocationStrategy", "ClosestToNextInstanceHour", "Default", "NewestInstance", "OldestInstance", "OldestLaunchConfiguration", "OldestLaunchTemplate" ] }
For more information, see Controlling which Auto Scaling instances terminate during scale in in the Amazon EC2 Auto Scaling User Guide.
-
For API details, see DescribeTerminationPolicyTypes
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example lists the termination policies that are supported by Auto Scaling.
Get-ASTerminationPolicyType
Output:
ClosestToNextInstanceHour Default NewestInstance OldestInstance OldestLaunchConfiguration
-
For API details, see DescribeTerminationPolicyTypes in AWS Tools for PowerShell Cmdlet Reference.
-