Projects
Update an environment
- INVALID_ARGUMENT when the mask names a field that can't be updated.
- ABORTED when
etagis set and the environment changed since it was read.
- ABORTED when
Scope: env:write
Authorization
bearerAuth An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...
In: header
Path Parameters
The project id.
The environment id.
Query Parameters
The fields to update: display_name, description, labels, agents
and approval. Empty updates every field the request populates, and *
replaces them all.
Request Body
application/json
The environment with updated fields. Its resource_name identifies the
environment, and only the fields named in update_mask are applied. Its
etag, when set, must match the environment's current one.
TypeScript Definitions
Use the request body type in TypeScript.
The environment with updated fields. Its resource_name identifies the
environment, and only the fields named in update_mask are applied. Its
etag, when set, must match the environment's current one.
Response Body
application/json
curl -X PATCH "https://example.com/v1/projects/string/environments/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "environment": { "id": "string", "name": "string", "display_name": "string", "resource_name": "string", "description": "string", "project_id": "string", "labels": { "property1": "string", "property2": "string" }, "agents": [ { "agent_id": "string", "id": "string", "kind": "AGENT_KIND_UNSPECIFIED", "settings": { "infra": { "backend": { "type": "string", "config": { "property1": null, "property2": null } }, "engine": { "engine": "ENGINE_UNSPECIFIED", "version": "string" } } } } ], "approval": { "required_approvals": 0, "groups": [ { "group_id": "string", "approvals": 1 } ] }, "generation": "string", "hold": { "change_set_id": "string", "held_at": "2023-01-15T01:30:15.01Z", "run_id": "string" }, "last_apply": { "change_set_id": "string", "revision_id": "string", "applied_at": "2023-01-15T01:30:15.01Z", "run_id": "string" }, "etag": "string", "created_by": { "id": "string", "display_name": "string", "email": "string" }, "created_at": "2023-01-15T01:30:15.01Z", "updated_at": "2023-01-15T01:30:15.01Z" }}Rename an environment POST
A Terraform workspace on Admiral's hosted state is named `<project>_<environment>_<component>`, so a `cloud` block that names the old name stops resolving too. Name the workspace `<environment id>_<component>`, such as `env-01je3n6r1k8w_web`, to keep it working across renames. - ALREADY_EXISTS when another environment in the project has the new name. - ABORTED when `etag` is set and the environment changed since it was read. Scope: `env:write`
Cancel a job POST
- NOT_FOUND when no job has that resource name. Scope: `agent:write`