Use DescribeTerminationPolicyTypes with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

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.

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