fbpx
PUThttps://api.spotinst.io/aws/ec2/group/{GROUP_ID}/roll?accountId={ACCOUNT_ID}

Deploy your Elastigroup (triggers Blue/Green Deployment that replaces the existing instances in the Elastigroup)

URL Parameters

Parameter Type Description
GROUP_ID * String

The Elastigroup ID you want to deploy

Example: sig-12345
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc

Body Attributes


  • batchSizePercentage * Integer
    Indicates (in percentage) the batch size of the deployment (meaning, how many instances to replace in each batch)
  • gracePeriod * Integer
    Indicates (in seconds) the timeout to wait until instance become healthy in the ELB
  • healthCheckType String
    Define a health check type. valid values: ELB, ECS_CLUSTER_INSTANCE, TARGET_GROUP, MULTAI_TARGET_SET, HCS, EC2, NONE (wait the entire grace period for each batch). If no value is set the roll will use the group’s auto-healing health check.
  • strategy Object
    The roll strategy
  • strategy.action String
    The roll action to perform. valid values: REPLACE_SERVER, RESTART_SERVER
    Default: REPLACE_SERVER
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "batchSizePercentage": 20,
  "gracePeriod": 300,
  "healthCheckType": "EC2",
  "strategy": {
    "action": "REPLACE_SERVER"
  }
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "421c3735-db15-44c9-a659-e830eb2a08de",
        "url": "/aws/ec2/group/sig-12345/roll?accountId=act-123456",
        "method": "PUT",
        "timestamp": "2018-03-27T19:35:40.967Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:aws:ec2:group:roll",
        "items": [
            {
                "id": "sbgd-3ee19606",
                "status": "STARTING",
                "currentBatch": 1,
                "numOfBatches": 1,
                "progress": {
                    "unit": "percentage",
                    "value": 0
                }
            }
        ],
        "count": 1
    }
}