Amazon EC2 Auto Scaling · JSON Structure

Ec2 Auto Scaling Refresh Preferences Structure

Describes the preferences for an instance refresh.

Type: object Properties: 8
Amazon Web ServicesAuto ScalingComputeEC2High AvailabilityScaling

RefreshPreferences is a JSON Structure definition published by Amazon EC2 Auto Scaling, describing 8 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

MinHealthyPercentage InstanceWarmup CheckpointPercentages CheckpointDelay SkipMatching AutoRollback ScaleInProtectedInstances StandbyInstances

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-ec2-auto-scaling/refs/heads/main/json-structure/ec2-auto-scaling-refresh-preferences-structure.json",
  "name": "RefreshPreferences",
  "description": "Describes the preferences for an instance refresh.",
  "type": "object",
  "properties": {
    "MinHealthyPercentage": {
      "allOf": [
        {
          "$ref": "#/components/schemas/IntPercent"
        },
        {
          "description": "<p>The amount of capacity in the Auto Scaling group that must pass your group's health checks to allow the operation to continue. The value is expressed as a percentage of the desired capacity of the Auto Scaling group (rounded up to the nearest integer). The default is <code>90</code>.</p> <p>Setting the minimum healthy percentage to 100 percent limits the rate of replacement to one instance at a time. In contrast, setting it to 0 percent has the effect of replacing all instances at the same time. </p>"
        }
      ]
    },
    "InstanceWarmup": {
      "allOf": [
        {
          "$ref": "#/components/schemas/RefreshInstanceWarmup"
        },
        {
          "description": "<p>A time period, in seconds, during which an instance refresh waits before moving on to replacing the next instance after a new instance enters the <code>InService</code> state.</p> <p>This property is not required for normal usage. Instead, use the <code>DefaultInstanceWarmup</code> property of the Auto Scaling group. The <code>InstanceWarmup</code> and <code>DefaultInstanceWarmup</code> properties work the same way. Only specify this property if you must override the <code>DefaultInstanceWarmup</code> property. </p> <p> If you do not specify this property, the instance warmup by default is the value of the <code>DefaultInstanceWarmup</code> property, if defined (which is recommended in all cases), or the <code>HealthCheckGracePeriod</code> property otherwise.</p>"
        }
      ]
    },
    "CheckpointPercentages": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CheckpointPercentages"
        },
        {
          "description": "<p>(Optional) Threshold values for each checkpoint in ascending order. Each number must be unique. To replace all instances in the Auto Scaling group, the last number in the array must be <code>100</code>.</p> <p>For usage examples, see <a href=\"https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-adding-checkpoints-instance-refresh.html\">Adding checkpoints to an instance refresh</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>"
        }
      ]
    },
    "CheckpointDelay": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CheckpointDelay"
        },
        {
          "description": "(Optional) The amount of time, in seconds, to wait after a checkpoint before continuing. This property is optional, but if you specify a value for it, you must also specify a value for <code>CheckpointPercentages</code>. If you specify a value for <code>CheckpointPercentages</code> and not for <code>CheckpointDelay</code>, the <code>CheckpointDelay</code> defaults to <code>3600</code> (1 hour). "
        }
      ]
    },
    "SkipMatching": {
      "allOf": [
        {
          "$ref": "#/components/schemas/SkipMatching"
        },
        {
          "description": "<p>(Optional) Indicates whether skip matching is enabled. If enabled (<code>true</code>), then Amazon EC2 Auto Scaling skips replacing instances that match the desired configuration. If no desired configuration is specified, then it skips replacing instances that have the same launch template and instance types that the Auto Scaling group was using before the start of the instance refresh. The default is <code>false</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh-skip-matching.html\">Use an instance refresh with skip matching</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>"
        }
      ]
    },
    "AutoRollback": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AutoRollback"
        },
        {
          "description": "<p>(Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration if the instance refresh fails. The default is <code>false</code>.</p> <p>A rollback is not supported in the following situations: </p> <ul> <li> <p>There is no desired configuration specified for the instance refresh.</p> </li> <li> <p>The Auto Scaling group has a launch template that uses an Amazon Web Services Systems Manager parameter instead of an AMI ID for the <code>ImageId</code> property.</p> </li> <li> <p>The Auto Scaling group uses the launch template's <code>$Latest</code> or <code>$Default</code> version.</p> </li> </ul>"
        }
      ]
    },
    "ScaleInProtectedInstances": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ScaleInProtectedInstances"
        },
        {
          "description": "<p>Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected from scale in are found. </p> <p>The following lists the valid values:</p> <dl> <dt>Refresh</dt> <dd> <p>Amazon EC2 Auto Scaling replaces instances that are protected from scale in.</p> </dd> <dt>Ignore</dt> <dd> <p>Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.</p> </dd> <dt>Wait (default)</dt> <dd> <p>Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.</p> </dd> </dl>"
        }
      ]
    },
    "StandbyInstances": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StandbyInstances"
        },
        {
          "description": "<p>Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in <code>Standby</code> state are found.</p> <p>The following lists the valid values:</p> <dl> <dt>Terminate</dt> <dd> <p>Amazon EC2 Auto Scaling terminates instances that are in <code>Standby</code>.</p> </dd> <dt>Ignore</dt> <dd> <p>Amazon EC2 Auto Scaling ignores instances that are in <code>Standby</code> and continues to replace instances that are in the <code>InService</code> state.</p> </dd> <dt>Wait (default)</dt> <dd> <p>Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.</p> </dd> </dl>"
        }
      ]
    }
  }
}