---
title: "Deployment Actions"
method: POST
path: "/aws/ec2/group/{groupId}/roll/{rollId}/action"
tags: ["Elastigroup AWS"]
---

# Deployment Actions

`POST /aws/ec2/group/{groupId}/roll/{rollId}/action`

## Request

- Base URL: `https://api.spotinst.io`
- URL: `https://api.spotinst.io/aws/ec2/group/{groupId}/roll/{rollId}/action`
- Auth: HTTP bearer

Apply a Detach action to a deployment

## Path parameters

- `rollId` string, required

## Query parameters

- `accountId` string

## Parameters

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

## Request body

- object
  - `actionType` string: Sets the action that will take place, Accepted values are: DETACH_OLD, DETACH_NEW
  - `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 wait until instance are detached
  - `shouldDecrementTargetCapacity` boolean

## Response `200`

Deployment Actions 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
      - `groupId` string: Group ID
      - `rollId` string: Roll ID
      - `actionType` string: Roll ID
      - `detachedInstances` string
    - `count` integer: Size of the data object array

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/spot/apis/spot-by-flexera-api.md) - [All operations](https://skmtc.dev/spot/apis/spot-by-flexera-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spot/apis/spot-by-flexera-api/revisions/f7e206fa6474?raw)
