View all methods
deployments.delete_region
Remove one region from an API-created deployment.
Facts
| Method | POST https://yourinstance.getdx.net/api/deployments.delete_region |
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
reference_id |
Text or Integer |
Unique identifier of the deployment. Example: release-v2.4.0 |
region |
Object or Text |
Region to remove. Send an object with name, or a string to use as the name. Names are matched after trimming and lowercasing.Example: eu-west-1 |
Usage info
Only the named region is removed. The deployment, its other regions, and its deployed_at are unchanged.
Only deployments created through the Deployments API can be changed through this method. Deployments managed by a native connector or deployment inference rule return deployment_not_api_managed.
This method is idempotent. If the reference_id or region does not exist, the request still succeeds.
Example request
curl -X POST https://yourinstance.getdx.net/api/deployments.delete_region \
-H "Content-Type: application/json" \
-H "Authorization: Bearer xxxx-xxxxxxxxx-xxxx" \
--data '{
"reference_id": "release-v2.4.0",
"region": "eu-west-1"
}'
Success response
{
"ok": true,
"action": "deleted",
"reference_id": "release-v2.4.0"
}
Errors
| Error | Description |
|---|---|
not_authed |
The request did not include a valid API key. |
required_params_missing |
reference_id or region was not provided. |
invalid_reference_id |
reference_id is not text or an integer. |
region_invalid |
region is not a string or an object with a valid name. |
deployment_not_api_managed |
The deployment is managed by a connector or inference rule. |