---
title: "Start Deployment"
method: PUT
path: "/aws/ec2/group/{groupId}/roll"
tags: ["Elastigroup AWS"]
---

# Start Deployment

`PUT /aws/ec2/group/{groupId}/roll`

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

## Query parameters

- `accountId` string

## Parameters

- `#/paths/~1aws~1ec2~1group~1%7BgroupId%7D/put/parameters/0` — unresolved $ref

## Request body

- object
  - `batchSizePercentage` integer, required — Indicates (in percentage) the batch size of the deployment (meaning, how many instances to replace in each batch)
  - `gracePeriod` integer, required — Indicates (in seconds) the timeout to wait until instance become healthy based on the healthCheckType
  - `healthCheckType` 'ELB' | 'ECS_CLUSTER_INSTANCE' | 'TARGET_GROUP' | 'OPSWORKS' | 'NOMAD_NODE' | 'HCS' | 'EC2' | 'NONE' — Define a health check type.\ If no value is set the roll will use the group’s auto-healing health check.
  - `drainingTimeout` integer — Indicates (in seconds) the timeout to drain the instances. Override the group value.
  - `strategy` object — The roll strategy
    - `action` 'REPLACE_SERVER' | 'RESTART_SERVER' — The roll action to perform.
    - `batchMinHealthyPercentage` integer — Indicates the threshold of minimum healthy instances in single batch.\ If the amount of healthy instances in single batch is under the threshold, the deployment will fail.\ In case of null as value, the default value in the backend will be 50%.\ Value of param should represent the number in percentage (%) of the batch.
    - `onFailure` object — Set detach options to the deployment
      - `actionType` 'DETACH_OLD' | 'DETACH_NEW', required — Sets the action that will take place.
      - `shouldHandleAllBatches` boolean — Indicator if the action should apply to all batches of the deployment or only the latest batch
      - `drainingTimeout` integer — Indicates (in seconds) the timeout to drain the instances
      - `shouldDecrementTargetCapacity` boolean — Decrementing the group target capacity after detaching the instances

## Response `200`

Deploy Response

- object
  - `request` object — Original request properties
    - `id` string — Unique ID associated with this request
    - `url` string — The URL that was used for the request
    - `method` string — The HTTP **METHOD** used for the request
    - `timestamp` string — When the request was received by Spot
  - `response` object — Response package that includes, status, type and any relevant data.
    - `status` object
      - `code` integer — HTTP status code assigned to this response
      - `message` string — HTTP status message for the respective status code
    - `kind` string — The data type of each item in the response
    - `items` object[] — Array of data objects
      - `id` string
      - `status` string
      - `currentBatch` integer
      - `numOfBatches` integer
      - `progress` object
        - `unit` string
        - `value` integer
    - `count` integer — Size of the data object array

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
