fbpx
POSThttps://api.spotinst.io/aws/ec2/group/{GROUP_ID}/codeDeploy/blueGreenDeployment ?accountId={ACCOUNT_ID}

Trigger a Blue-Green deployment to your Elastigroup, this will initiate a deployment that will replace the existing instances(blue) with new ones(green).

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


  • deployment * Object
    Holds the deployment configuration
  • deployment.timeout * Integer
    Indicates (in Minutes) the timeout for the deployment state
    Example: 20
  • deployment.tags * Object
    Configure the Tags for the deployment
  • deployment.tags.tagKey * String
    Configure the Tags keys for the deployment
    Example: deploy
  • deployment.tags.tagValue * String
    Configure the Tags values for the deployment
    Example: new
  • deployment.deploymentGroups * Object
    The Deployment information
  • deployment.deploymentGroups.applicationName * String
    The Deployment Application name - should be the same as the applicaiton in the Elastigroup
    Example: appTest
  • deployment.deploymentGroups.deploymentGroupName * String
    The Deployment Group name - should be the same as the deployment group in the Elastigroup
    Example: deploymentGroupTest
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "deployment": {
    "timeout": 20,
    "tags": [
      {
        "tagKey": "ver",
        "tagValue": "pink"
      }
    ],
    "deploymentGroups": [
      {
        "applicationName": "appTest",
        "deploymentGroupName": "deploymentGroupTest"
      }
    ]
  }
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "kind": "spotinst:aws:ec2:group:codeDeploy:blueGreenDeployment",
  "items": [
    {
      "id": "cdbg-3ccf1234",
      "groupId": "sig-87231234",
      "state": "STARTING",
      "config": {
        "timeout": 20,
        "tags": [
          {
            "tagKey": "ver",
            "tagValue": "pink"
          }
        ],
        "deploymentGroups": [
          {
            "applicationName": "appTest",
            "deploymentGroupName": "deploymentGroupTest"
          }
        ]
      }
    }
  ],
  "count": 1
}