Projects
Create an environment
- NOT_FOUND when the project does not exist.
- ALREADY_EXISTS when the project already has an environment with that name.
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.
Query Parameters
(OPTIONAL) A UUID the client generates once per create and sends again on every retry. A repeat within 24 hours returns the first result and creates nothing. The same id with a different request is refused with INVALID_ARGUMENT. Without one, every call creates. request_id.not_zero // request_id may not be the zero UUID
uuidRequest Body
application/json
The environment to create, with its name. Output-only fields and
resource_name are ignored.
TypeScript Definitions
Use the request body type in TypeScript.
The environment to create, with its name. Output-only fields and
resource_name are ignored.
environment.name.required // an environment needs a name
Response Body
application/json
curl -X POST "https://example.com/v1/projects/string/environments" \ -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" }}Update a change set PATCH
- INVALID_ARGUMENT when the mask names a field that can't be updated. - FAILED_PRECONDITION when the change set is not open. - ABORTED when `etag` is set and the change set changed since it was read. Scope: `changeset:write`
Delete an environment DELETE
- FAILED_PRECONDITION while the environment manages anything: a live component, a running apply, or a hold. Apply a change set that destroys or orphans every component first. - ABORTED when `etag` is set and the environment changed since it was read. Scope: `env:write`