ExecutionDesiredState
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/execution/desired_states/{id}/reconcile |
create |
Success |
POST |
/api/v1/execution/desired_states |
create |
Success |
GET |
/api/v1/execution/desired_states/{id} |
load |
Desired state and current scheduler termination proof |
GET |
/api/v1/execution/desired_states |
load |
Success |
PATCH |
/api/v1/execution/desired_states/{id} |
patch |
Success |
DELETE |
/api/v1/execution/desired_states/{id} |
remove |
Success |
PUT |
/api/v1/execution/desired_states/{id} |
update |
Success |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
execution_desired_state, err := client.ExecutionDesiredState(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(execution_desired_state)
created, err := client.ExecutionDesiredState(nil).Create(map[string]any{}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.ExecutionDesiredState(nil).Update(map[string]any{"id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.ExecutionDesiredState(nil).Patch(map[string]any{"id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
removed, err := client.ExecutionDesiredState(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local execution_desired_state, err = client:ExecutionDesiredState():load({ id = "example_id" })
local created, err = client:ExecutionDesiredState():create({ })
local updated, err = client:ExecutionDesiredState():update({ id = "example_id" })
local patched, err = client:ExecutionDesiredState():patch({ id = "example_id" })
local removed, err = client:ExecutionDesiredState():remove({ id = "example_id" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$execution_desired_state = $client->ExecutionDesiredState()->load(["id" => "example_id"]);
$created = $client->ExecutionDesiredState()->create([]);
$updated = $client->ExecutionDesiredState()->update(["id" => "example_id"]);
$patched = $client->ExecutionDesiredState()->patch(["id" => "example_id"]);
$client->ExecutionDesiredState()->remove(["id" => "example_id"]);
Python
Construct client as shown in the Python setup, then call the operations:
execution_desired_state = client.ExecutionDesiredState().load({"id": "example_id"})
created = client.ExecutionDesiredState().create({ })
updated = client.ExecutionDesiredState().update({"id": "example_id"})
patched = client.ExecutionDesiredState().patch({"id": "example_id"})
client.ExecutionDesiredState().remove({"id": "example_id"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
execution_desired_state = client.ExecutionDesiredState.load({ "id" => "example_id" })
created = client.ExecutionDesiredState.create({ })
updated = client.ExecutionDesiredState.update({ "id" => "example_id" })
patched = client.ExecutionDesiredState.patch({ "id" => "example_id" })
client.ExecutionDesiredState.remove({ "id" => "example_id" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const execution_desired_state = await client.ExecutionDesiredState().load({ id: "example_id" })
const created = await client.ExecutionDesiredState().create({ })
const updated = await client.ExecutionDesiredState().update({ id: "example_id" })
const patched = await client.ExecutionDesiredState().patch({ id: "example_id" })
await client.ExecutionDesiredState().remove({ id: "example_id" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
desired_state |
object |
Yes | Desired State |
id |
string |
No | Id |
stop_observed |
boolean |
Yes | True only for archived zero-capacity states with all known jobs stopped and allocations terminated. |
create
POST /api/v1/execution/desired_states/{id}/reconcile
Operation ID: reconcile_api_v1_desired_state.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/execution/desired_states
Operation ID: post_api_v1_execution_desired_states.
Authentication: bearer token (bearerAuth).
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/execution/desired_states/{id}
Operation ID: api_v1_desired_state.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Responses
200: Desired state and current scheduler termination proof
application/json
| Property | Type | Required | Description |
|---|---|---|---|
desired_state |
object |
Yes | |
stop_observed |
boolean |
Yes | True only for archived zero-capacity states with all known jobs stopped and allocations terminated. Unknown observations return false. |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/execution/desired_states
Operation ID: api_v1_desired_states.
Authentication: bearer token (bearerAuth).
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
patch
PATCH /api/v1/execution/desired_states/{id}
Operation ID: patch_api_v1_execution_desired_states_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
remove
DELETE /api/v1/execution/desired_states/{id}
Operation ID: delete_api_v1_execution_desired_states_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
update
PUT /api/v1/execution/desired_states/{id}
Operation ID: put_api_v1_execution_desired_states_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.