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-typesOutput:
{ "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 V4
-
Example 1: This example lists the termination policies that are supported by Auto Scaling.
Get-ASTerminationPolicyTypeOutput:
ClosestToNextInstanceHour Default NewestInstance OldestInstance OldestLaunchConfiguration-
For API details, see DescribeTerminationPolicyTypes in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example lists the termination policies that are supported by Auto Scaling.
Get-ASTerminationPolicyTypeOutput:
ClosestToNextInstanceHour Default NewestInstance OldestInstance OldestLaunchConfiguration-
For API details, see DescribeTerminationPolicyTypes in AWS Tools for PowerShell Cmdlet Reference (V5).
-
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.