DescribeInstanceRefreshesCommand

Gets information about the instance refreshes for the specified Auto Scaling group from the previous six weeks.

This operation is part of the instance refresh feature  in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes.

To help you determine the status of an instance refresh, Amazon EC2 Auto Scaling returns information about the instance refreshes you previously initiated, including their status, start time, end time, the percentage of the instance refresh that is complete, and the number of instances remaining to update before the instance refresh is complete. If a rollback is initiated while an instance refresh is in progress, Amazon EC2 Auto Scaling also returns information about the rollback of the instance refresh.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AutoScalingClient, DescribeInstanceRefreshesCommand } from "@aws-sdk/client-auto-scaling"; // ES Modules import
// const { AutoScalingClient, DescribeInstanceRefreshesCommand } = require("@aws-sdk/client-auto-scaling"); // CommonJS import
const client = new AutoScalingClient(config);
const input = { // DescribeInstanceRefreshesType
  AutoScalingGroupName: "STRING_VALUE", // required
  InstanceRefreshIds: [ // InstanceRefreshIds
    "STRING_VALUE",
  ],
  NextToken: "STRING_VALUE",
  MaxRecords: Number("int"),
};
const command = new DescribeInstanceRefreshesCommand(input);
const response = await client.send(command);
// { // DescribeInstanceRefreshesAnswer
//   InstanceRefreshes: [ // InstanceRefreshes
//     { // InstanceRefresh
//       InstanceRefreshId: "STRING_VALUE",
//       AutoScalingGroupName: "STRING_VALUE",
//       Status: "Pending" || "InProgress" || "Successful" || "Failed" || "Cancelling" || "Cancelled" || "RollbackInProgress" || "RollbackFailed" || "RollbackSuccessful" || "Baking",
//       StatusReason: "STRING_VALUE",
//       StartTime: new Date("TIMESTAMP"),
//       EndTime: new Date("TIMESTAMP"),
//       PercentageComplete: Number("int"),
//       InstancesToUpdate: Number("int"),
//       ProgressDetails: { // InstanceRefreshProgressDetails
//         LivePoolProgress: { // InstanceRefreshLivePoolProgress
//           PercentageComplete: Number("int"),
//           InstancesToUpdate: Number("int"),
//         },
//         WarmPoolProgress: { // InstanceRefreshWarmPoolProgress
//           PercentageComplete: Number("int"),
//           InstancesToUpdate: Number("int"),
//         },
//       },
//       Preferences: { // RefreshPreferences
//         MinHealthyPercentage: Number("int"),
//         InstanceWarmup: Number("int"),
//         CheckpointPercentages: [ // CheckpointPercentages
//           Number("int"),
//         ],
//         CheckpointDelay: Number("int"),
//         SkipMatching: true || false,
//         AutoRollback: true || false,
//         ScaleInProtectedInstances: "Refresh" || "Ignore" || "Wait",
//         StandbyInstances: "Terminate" || "Ignore" || "Wait",
//         AlarmSpecification: { // AlarmSpecification
//           Alarms: [ // AlarmList
//             "STRING_VALUE",
//           ],
//         },
//         MaxHealthyPercentage: Number("int"),
//         BakeTime: Number("int"),
//       },
//       DesiredConfiguration: { // DesiredConfiguration
//         LaunchTemplate: { // LaunchTemplateSpecification
//           LaunchTemplateId: "STRING_VALUE",
//           LaunchTemplateName: "STRING_VALUE",
//           Version: "STRING_VALUE",
//         },
//         MixedInstancesPolicy: { // MixedInstancesPolicy
//           LaunchTemplate: { // LaunchTemplate
//             LaunchTemplateSpecification: {
//               LaunchTemplateId: "STRING_VALUE",
//               LaunchTemplateName: "STRING_VALUE",
//               Version: "STRING_VALUE",
//             },
//             Overrides: [ // Overrides
//               { // LaunchTemplateOverrides
//                 InstanceType: "STRING_VALUE",
//                 WeightedCapacity: "STRING_VALUE",
//                 LaunchTemplateSpecification: "<LaunchTemplateSpecification>",
//                 InstanceRequirements: { // InstanceRequirements
//                   VCpuCount: { // VCpuCountRequest
//                     Min: Number("int"), // required
//                     Max: Number("int"),
//                   },
//                   MemoryMiB: { // MemoryMiBRequest
//                     Min: Number("int"), // required
//                     Max: Number("int"),
//                   },
//                   CpuManufacturers: [ // CpuManufacturers
//                     "intel" || "amd" || "amazon-web-services",
//                   ],
//                   MemoryGiBPerVCpu: { // MemoryGiBPerVCpuRequest
//                     Min: Number("double"),
//                     Max: Number("double"),
//                   },
//                   ExcludedInstanceTypes: [ // ExcludedInstanceTypes
//                     "STRING_VALUE",
//                   ],
//                   InstanceGenerations: [ // InstanceGenerations
//                     "current" || "previous",
//                   ],
//                   SpotMaxPricePercentageOverLowestPrice: Number("int"),
//                   MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
//                   OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
//                   BareMetal: "included" || "excluded" || "required",
//                   BurstablePerformance: "included" || "excluded" || "required",
//                   RequireHibernateSupport: true || false,
//                   NetworkInterfaceCount: { // NetworkInterfaceCountRequest
//                     Min: Number("int"),
//                     Max: Number("int"),
//                   },
//                   LocalStorage: "included" || "excluded" || "required",
//                   LocalStorageTypes: [ // LocalStorageTypes
//                     "hdd" || "ssd",
//                   ],
//                   TotalLocalStorageGB: { // TotalLocalStorageGBRequest
//                     Min: Number("double"),
//                     Max: Number("double"),
//                   },
//                   BaselineEbsBandwidthMbps: { // BaselineEbsBandwidthMbpsRequest
//                     Min: Number("int"),
//                     Max: Number("int"),
//                   },
//                   AcceleratorTypes: [ // AcceleratorTypes
//                     "gpu" || "fpga" || "inference",
//                   ],
//                   AcceleratorCount: { // AcceleratorCountRequest
//                     Min: Number("int"),
//                     Max: Number("int"),
//                   },
//                   AcceleratorManufacturers: [ // AcceleratorManufacturers
//                     "nvidia" || "amd" || "amazon-web-services" || "xilinx",
//                   ],
//                   AcceleratorNames: [ // AcceleratorNames
//                     "a100" || "v100" || "k80" || "t4" || "m60" || "radeon-pro-v520" || "vu9p",
//                   ],
//                   AcceleratorTotalMemoryMiB: { // AcceleratorTotalMemoryMiBRequest
//                     Min: Number("int"),
//                     Max: Number("int"),
//                   },
//                   NetworkBandwidthGbps: { // NetworkBandwidthGbpsRequest
//                     Min: Number("double"),
//                     Max: Number("double"),
//                   },
//                   AllowedInstanceTypes: [ // AllowedInstanceTypes
//                     "STRING_VALUE",
//                   ],
//                   BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest
//                     Cpu: { // CpuPerformanceFactorRequest
//                       References: [ // PerformanceFactorReferenceSetRequest
//                         { // PerformanceFactorReferenceRequest
//                           InstanceFamily: "STRING_VALUE",
//                         },
//                       ],
//                     },
//                   },
//                 },
//               },
//             ],
//           },
//           InstancesDistribution: { // InstancesDistribution
//             OnDemandAllocationStrategy: "STRING_VALUE",
//             OnDemandBaseCapacity: Number("int"),
//             OnDemandPercentageAboveBaseCapacity: Number("int"),
//             SpotAllocationStrategy: "STRING_VALUE",
//             SpotInstancePools: Number("int"),
//             SpotMaxPrice: "STRING_VALUE",
//           },
//         },
//       },
//       RollbackDetails: { // RollbackDetails
//         RollbackReason: "STRING_VALUE",
//         RollbackStartTime: new Date("TIMESTAMP"),
//         PercentageCompleteOnRollback: Number("int"),
//         InstancesToUpdateOnRollback: Number("int"),
//         ProgressDetailsOnRollback: {
//           LivePoolProgress: {
//             PercentageComplete: Number("int"),
//             InstancesToUpdate: Number("int"),
//           },
//           WarmPoolProgress: {
//             PercentageComplete: Number("int"),
//             InstancesToUpdate: Number("int"),
//           },
//         },
//       },
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

DescribeInstanceRefreshesCommand Input

Parameter
Type
Description
AutoScalingGroupName
Required
string | undefined

The name of the Auto Scaling group.

InstanceRefreshIds
string[] | undefined

One or more instance refresh IDs.

MaxRecords
number | undefined

The maximum number of items to return with this call. The default value is 50 and the maximum value is 100.

NextToken
string | undefined

The token for the next set of items to return. (You received this token from a previous call.)

DescribeInstanceRefreshesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
InstanceRefreshes
InstanceRefresh[] | undefined

The instance refreshes for the specified group, sorted by creation timestamp in descending order.

NextToken
string | undefined

A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.

Throws

Name
Fault
Details
InvalidNextToken
client

The NextToken value is not valid.

ResourceContentionFault
server

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

AutoScalingServiceException
Base exception class for all service exceptions from AutoScaling service.