Remove an Instance

Updated: January 16th, 2013

Remove an instance

Allows you to remove a utility or an application instance.

Important: The remove instances endpoint does not guard against removing all instances of the requested type.

Who can use it

Any user with an Engine Yard Cloud login and API token for the environment.

To remove an instance

POST https://cloud.engineyard.com:443/api/v2/environments/YOUR_ENVIRO_ID_GOES_HERE/remove_instances

Parameters


role

Required

util, app.

Default: none.


name

Required for util instance

Optional for app instance

string

Default: none.

Valid response example

{
"request":
{
"role": "util",
"name": "foo"
},
"instance":
{
"amazon_id": "i-9999e9aa",
"availability_zone": "us-west-2a",
"bootstrapped_at": "2012-12-19T22:00:55+00:00",
"chef_status":
[{
"message": "Preparing to shutdown instance and take snapshots...",
"timestamp": "2013-01-03T03:15:42+00:00"
}],
"error_message": null,
"id": 999999,
"name": "foo",
"role": "util",
"size": "medium_cpu_64",
"status": "decommissioning",
"public_hostname": "ec2-50-112-65-999.us-west-2.compute.amazonaws.com",
"private_hostname": "ip-10-252-29-99.us-west-2.compute.internal"
},
"status":"accepted"
}

Invalid response example

{
"request":
{"role":"util"},
"errors":
{
"name": ["must be provided for util instances"],
"instance": ["environment has no matching running instances"]
},
"status":"rejected"
}

Curl example

This is an example of a simple remove instance operation using curl:

curl -v -H "X-EY-Cloud-Token: ENGINEYARD_API_TOKEN" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"request": {"role":"util","name":"foo"}}' https://cloud.engineyard.com:443/api/v2/environments/YOUR_ENVIRO_ID_GOES_HERE/remove_instances

Where ENGINEYARD_API_TOKEN looks something like this: 76f2d43d79bedd9bc74654a1ded733c9 See Get the API Token.

And where YOUR_ENVIRO_ID_GOES_HERE is a number. For example, 99999. See Get Environment Data.

Check status

You can check the status of remove instance operations in progress by using the Engine Yard Cloud dashboard, or programmatically, using the API. See Get Instance Provisioning Status.


If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

Comments

Please sign in to leave a comment.