pantech 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pantech-0.2.0 → pantech-0.3.0}/CHANGELOG.md +6 -0
- {pantech-0.2.0 → pantech-0.3.0}/PKG-INFO +1 -1
- {pantech-0.2.0 → pantech-0.3.0}/openapi/public-api.yaml +158 -17
- {pantech-0.2.0 → pantech-0.3.0}/pyproject.toml +1 -1
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_operations.py +1 -0
- pantech-0.3.0/src/pantech/_version.py +1 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/types/_generated.py +23 -2
- pantech-0.2.0/src/pantech/_version.py +0 -1
- {pantech-0.2.0 → pantech-0.3.0}/.gitignore +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/LICENSE +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/README.md +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/examples/async_list.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/examples/create_instance.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/examples/migrate_from_aws.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/examples/webhook_server.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/scripts/_codegen.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/scripts/_spec.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/scripts/generate_resources.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/scripts/generate_types.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/scripts/sync_spec.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/__init__.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_base_client.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_client.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_exceptions.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_resource.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_streaming.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_types.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/_webhooks.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/py.typed +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/resources/__init__.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/resources/_async.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/resources/_sync.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/src/pantech/types/__init__.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/__init__.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/conftest.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_client.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_errors.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_migrate.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_pagination.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_retries.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_spec_coverage.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_wait.py +0 -0
- {pantech-0.2.0 → pantech-0.3.0}/tests/test_webhooks.py +0 -0
|
@@ -4,6 +4,12 @@ All notable changes to the `pantech` package. The newest version heading
|
|
|
4
4
|
(`## X.Y.Z (YYYY-MM-DD)`) is released when it reaches `main`: see
|
|
5
5
|
`.github/workflows/release.yml`. Put work in progress under `## Unreleased`.
|
|
6
6
|
|
|
7
|
+
## 0.3.0 (2026-11-06)
|
|
8
|
+
|
|
9
|
+
FEATURES:
|
|
10
|
+
|
|
11
|
+
- `KubernetesFixedNodeSize` and `fixed_node_sizes` on the Kubernetes versions list: the zones that build nodes only at fixed sizes, one entry per size. Types regenerated from the current public API spec.
|
|
12
|
+
|
|
7
13
|
## 0.2.0 (2026-10-28)
|
|
8
14
|
|
|
9
15
|
FEATURES:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pantech
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: The official Python SDK for the Pantech Dynamics public API.
|
|
5
5
|
Project-URL: Homepage, https://pantechdynamics.com
|
|
6
6
|
Project-URL: Documentation, https://docs.pantechdynamics.com/sdks/python
|
|
@@ -10,7 +10,7 @@ info:
|
|
|
10
10
|
|
|
11
11
|
**Authentication.** Every request needs an API key: `Authorization: Bearer PAN_…`. Create one in the console under Organization › API keys. A `read` key can call every GET; a `write` key can also create, change and delete. A key acts as the member who created it, with no more access than they have. `DELETE /me` revokes the key that sends it.
|
|
12
12
|
|
|
13
|
-
**AI apps.** When a member connects an AI app (an AI assistant or coding tool) to Pantech, the app is given an API key of kind `ai_app`, shown under Organization › AI apps; `GET /me` reports `kind` and `client_name`. Its access is the level the member chose: `read` (Read only), `write` (Manage) or `write` plus `delete` (Manage and delete). An `ai_app` key with `write` but not `delete` can create and change resources but cannot make a destructive call — every DELETE except `DELETE /me`, rebuilding or restoring an instance, and lowering a snapshot schedule's `retention_count` (these operations are marked `x-destructive`); it gets `403 INSUFFICIENT_SCOPE` instead. A standard key's `write` covers destructive calls as it always has. Owners can turn AI app access off for the whole organization: every request made with an `ai_app` key, and every request sent by Pantech's MCP server (it sends the header `Pantech-Client: mcp/<version>`, whatever key it uses), then gets `403 AI_APPS_DISABLED` until it is turned back on. `DELETE /me` keeps working so an app can always be disconnected.
|
|
13
|
+
**AI apps.** When a member connects an AI app (an AI assistant or coding tool) to Pantech, the app is given an API key of kind `ai_app`, shown under Organization › AI apps; `GET /me` reports `kind` and `client_name`. Its access is the level the member chose: `read` (Read only), `write` (Manage) or `write` plus `delete` (Manage and delete). An `ai_app` key with `write` but not `delete` can create and change resources but cannot make a destructive call — every DELETE except `DELETE /me`, closing SSH access and disconnecting a cloud account (which only take access away), plus rebuilding or restoring an instance, and lowering a snapshot schedule's `retention_count` (these operations are marked `x-destructive`); it gets `403 INSUFFICIENT_SCOPE` instead. A standard key's `write` covers destructive calls as it always has. Owners can turn AI app access off for the whole organization: every request made with an `ai_app` key, and every request sent by Pantech's MCP server (it sends the header `Pantech-Client: mcp/<version>`, whatever key it uses), then gets `403 AI_APPS_DISABLED` until it is turned back on. `DELETE /me` keeps working so an app can always be disconnected.
|
|
14
14
|
|
|
15
15
|
**Asynchronous changes.** Writes return `202 Accepted` with an `operation_id`. Poll `GET /operations/{operation_id}` (or stream `/events`) until `status` is `succeeded` or `failed`. A new instance or database returns an order instead: follow `GET /instance-orders/{order_id}` or `GET /database-orders/{order_id}`.
|
|
16
16
|
|
|
@@ -833,6 +833,7 @@ paths:
|
|
|
833
833
|
`ACCOUNT_SUSPENDED`: an invoice is overdue, or the organization was suspended for non-payment. Pay the outstanding invoice in the console, then retry.
|
|
834
834
|
`ACCOUNT_NOT_ACTIVE`: the organization's billing account is not active yet. Finish billing setup in the console (verify the organization and add a payment method), then retry.
|
|
835
835
|
`DATABASE_NAME_TAKEN`: you already have a database with this name. Choose a different name.
|
|
836
|
+
`IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was already used to order a different database. Use a new key for a different request; resend the same body to get the original order back.
|
|
836
837
|
`CONCURRENT_UPDATE`: the resource changed while this request was being processed. Retry the request; if it repeats, read the resource first.
|
|
837
838
|
content:
|
|
838
839
|
"application/problem+json":
|
|
@@ -2761,6 +2762,7 @@ paths:
|
|
|
2761
2762
|
409:
|
|
2762
2763
|
description: |-
|
|
2763
2764
|
`INSTANCE_NAME_TAKEN`: you already have an instance with this name. Choose a different name.
|
|
2765
|
+
`IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was already used to order a different instance. Use a new key for a different request; resend the same body to get the original order back.
|
|
2764
2766
|
`ACCOUNT_SUSPENDED`: an invoice is overdue, or the organization was suspended for non-payment. Pay the outstanding invoice in the console, then retry.
|
|
2765
2767
|
`ACCOUNT_NOT_ACTIVE`: the organization's billing account is not active yet. Finish billing setup in the console (verify the organization and add a payment method), then retry.
|
|
2766
2768
|
`PROVIDER_ACCOUNT_NOT_READY`: your organization's cloud account is still being set up, which takes a few minutes after sign-up. Retry shortly.
|
|
@@ -5967,7 +5969,7 @@ paths:
|
|
|
5967
5969
|
- Load balancers
|
|
5968
5970
|
summary: List load balancers
|
|
5969
5971
|
description: |-
|
|
5970
|
-
Your load balancers, newest first, each with its targets. Deleted
|
|
5972
|
+
Your load balancers, newest first, each with its targets. Deleted ones are left out; one whose create failed stays listed with status `failed` until you delete it. Narrow it with `network_id` or `public_ip_id`.
|
|
5971
5973
|
|
|
5972
5974
|
**Scope:** `read`.
|
|
5973
5975
|
operationId: listLoadBalancers
|
|
@@ -6278,6 +6280,7 @@ paths:
|
|
|
6278
6280
|
409:
|
|
6279
6281
|
description: |-
|
|
6280
6282
|
`LOAD_BALANCER_NOT_CHANGEABLE`: the load balancer is being deleted or has failed.
|
|
6283
|
+
`LOAD_BALANCER_NOT_READY`: the load balancer is still being created. Change it once its status is `active`.
|
|
6281
6284
|
`CONCURRENT_UPDATE`: the resource changed while this request was being processed. Retry the request; if it repeats, read the resource first.
|
|
6282
6285
|
content:
|
|
6283
6286
|
"application/problem+json":
|
|
@@ -7450,7 +7453,7 @@ paths:
|
|
|
7450
7453
|
- Kubernetes
|
|
7451
7454
|
summary: List Kubernetes versions
|
|
7452
7455
|
description: |-
|
|
7453
|
-
The Kubernetes versions you can create clusters with, newest first, each in one zone. `ha_zone_ids` are the zones where a highly available control plane (3 control nodes) can be created now. A version is withdrawn from new clusters before its upstream end of life; clusters already on it keep running it.
|
|
7456
|
+
The Kubernetes versions you can create clusters with, newest first, each in one zone. `ha_zone_ids` are the zones where a highly available control plane (3 control nodes) can be created now, and `fixed_node_sizes` the zones that build nodes only at fixed sizes, one entry per size, where only a plan of one of those sizes is accepted. A version is withdrawn from new clusters before its upstream end of life; clusters already on it keep running it.
|
|
7454
7457
|
|
|
7455
7458
|
**Scope:** `read`.
|
|
7456
7459
|
operationId: listKubernetesVersions
|
|
@@ -8065,9 +8068,11 @@ paths:
|
|
|
8065
8068
|
- Kubernetes
|
|
8066
8069
|
summary: Change the cluster's node plan
|
|
8067
8070
|
description: |-
|
|
8068
|
-
|
|
8071
|
+
Moves the cluster's control node and default workers to another node plan, one node at a time. Each worker is drained (its pods are moved to the other nodes, within their disruption budgets), stopped, given the new size and a larger disk, and started again, and the next node waits until it has rejoined the cluster. The control node goes last; the Kubernetes API is unavailable for the minutes it restarts, while workloads keep running. A cluster with one worker has no other node to move its pods to while that worker restarts.
|
|
8069
8072
|
|
|
8070
|
-
|
|
8073
|
+
The cluster keeps its current plan, and is billed at it, until every node runs the new one. If the change cannot finish (for example, there is no room for the larger nodes), the nodes are moved back to the plan the cluster had and the operation fails with `KUBERNETES_NODE_RESIZE_FAILED`.
|
|
8074
|
+
|
|
8075
|
+
A node's disk can only grow: a plan with a smaller disk than the nodes have is refused with `409 KUBERNETES_NODE_DISK_CANNOT_SHRINK`. Sending the plan the cluster already runs changes nothing. Node pools keep their own plans.
|
|
8071
8076
|
|
|
8072
8077
|
Returns `202 Accepted` with an `operation_id` (also in the `Location` header). The change happens in the background: poll `GET /public/v1/operations/{operation_id}`, or stream `/events`, until `status` is `succeeded` or `failed`.
|
|
8073
8078
|
|
|
@@ -8143,7 +8148,8 @@ paths:
|
|
|
8143
8148
|
`KUBERNETES_CLUSTER_NOT_RUNNING`: start the cluster first.
|
|
8144
8149
|
`KUBERNETES_CLUSTER_BUSY`: the cluster is already changing. Wait until it is running or stopped.
|
|
8145
8150
|
`KUBERNETES_CLUSTER_NOT_CHANGEABLE`: the cluster cannot make this change now (stopped, being deleted, or failed).
|
|
8146
|
-
`
|
|
8151
|
+
`KUBERNETES_NODE_DISK_CANNOT_SHRINK`: the plan's disk is smaller than the disks the cluster's nodes have. Choose a plan with at least the same disk.
|
|
8152
|
+
`KUBERNETES_NODE_PLAN_NOT_CHANGEABLE`: this cluster's nodes cannot be resized. Add a node pool on the plan you need, or create a new cluster on it.
|
|
8147
8153
|
`CONCURRENT_UPDATE`: the cluster changed while this request was being processed. Retry the request; if it repeats, read the cluster first.
|
|
8148
8154
|
content:
|
|
8149
8155
|
"application/problem+json":
|
|
@@ -8473,7 +8479,7 @@ paths:
|
|
|
8473
8479
|
- Kubernetes
|
|
8474
8480
|
summary: Download a kubeconfig
|
|
8475
8481
|
description: |-
|
|
8476
|
-
The cluster's admin kubeconfig, for `kubectl`. It holds a long-lived cluster-admin credential: store it like a password. It is fetched fresh on each call and is not kept by the platform. Available while the cluster is running. It is a `POST` that needs a `write` key so that a read-only key can never fetch a cluster-admin credential; the response is `Cache-Control: no-store`.
|
|
8482
|
+
The cluster's admin kubeconfig, for `kubectl`. It holds a long-lived cluster-admin credential: store it like a password. It is fetched fresh on each call and is not kept by the platform; each download is recorded (who, which key, when). Available while the cluster is running. It is a `POST` that needs a `write` key so that a read-only key can never fetch a cluster-admin credential; the response is `Cache-Control: no-store`.
|
|
8477
8483
|
|
|
8478
8484
|
**Scope:** `write`.
|
|
8479
8485
|
operationId: getKubernetesKubeconfig
|
|
@@ -8546,6 +8552,7 @@ paths:
|
|
|
8546
8552
|
description: |-
|
|
8547
8553
|
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
|
|
8548
8554
|
`KUBERNETES_UNAVAILABLE`: managed Kubernetes is not open on this platform yet.
|
|
8555
|
+
`KUBECONFIG_TEMPORARILY_UNAVAILABLE`: the download could not be recorded, so no kubeconfig was issued. Retry shortly.
|
|
8549
8556
|
content:
|
|
8550
8557
|
"application/problem+json":
|
|
8551
8558
|
schema:
|
|
@@ -8853,7 +8860,7 @@ paths:
|
|
|
8853
8860
|
|
|
8854
8861
|
Public routing needs a cluster in a VPC subnet: it uses the VPC's public address. Port 22 and the cluster's API port are reserved.
|
|
8855
8862
|
|
|
8856
|
-
Errors: `404 KUBERNETES_CLUSTER_NOT_FOUND`; `404 KUBERNETES_SERVICE_NOT_FOUND` (apply the Service first); `409 PORT_IN_USE` (another service, cluster or resource uses that public port; choose another); `409 KUBERNETES_ROUTING_UNAVAILABLE` (a cluster with no VPC address); `409 KUBERNETES_CLUSTER_NOT_RUNNING`; `422 VALIDATION_FAILED` (`service_name`, `public_port` or `node_port`; or `INVALID_KUBERNETES_MANIFEST` when the cluster refused the change); `503 KUBERNETES_API_UNREACHABLE` (retry).
|
|
8863
|
+
Errors: `404 KUBERNETES_CLUSTER_NOT_FOUND`; `404 KUBERNETES_SERVICE_NOT_FOUND` (apply the Service first); `409 PORT_IN_USE` (another service, cluster or resource uses that public port; choose another); `409 KUBERNETES_ROUTING_UNAVAILABLE` (a cluster with no VPC address); `409 IP_POOL_EXHAUSTED` (no public address is free in the zone; try again later); `409 KUBERNETES_CLUSTER_NOT_RUNNING`; `422 VALIDATION_FAILED` (`service_name`, `public_port` or `node_port`; or `INVALID_KUBERNETES_MANIFEST` when the cluster refused the change); `503 KUBERNETES_API_UNREACHABLE` (retry).
|
|
8857
8864
|
operationId: exposeKubernetesService
|
|
8858
8865
|
security:
|
|
8859
8866
|
- apiKey: []
|
|
@@ -8906,7 +8913,7 @@ paths:
|
|
|
8906
8913
|
schema:
|
|
8907
8914
|
$ref: "#/components/schemas/Problem"
|
|
8908
8915
|
"409":
|
|
8909
|
-
description: "`PORT_IN_USE`, `KUBERNETES_ROUTING_UNAVAILABLE` or `KUBERNETES_CLUSTER_NOT_RUNNING`."
|
|
8916
|
+
description: "`PORT_IN_USE`, `KUBERNETES_ROUTING_UNAVAILABLE`, `IP_POOL_EXHAUSTED` or `KUBERNETES_CLUSTER_NOT_RUNNING`."
|
|
8910
8917
|
content:
|
|
8911
8918
|
"application/problem+json":
|
|
8912
8919
|
schema:
|
|
@@ -8933,7 +8940,7 @@ paths:
|
|
|
8933
8940
|
|
|
8934
8941
|
Every cluster on a shared address gets its own API port: the first 6443, the next 6444, and so on. A new cluster's API port is routed automatically once it is running; call this after exposing or unexposing services with kubectl. If the API server does not answer, only its own route is ensured and no service route is removed.
|
|
8935
8942
|
|
|
8936
|
-
Errors: `404 KUBERNETES_CLUSTER_NOT_FOUND`; `409 PORT_IN_USE`; `409 KUBERNETES_ROUTING_UNAVAILABLE` (a cluster with no VPC address); `409 KUBERNETES_CLUSTER_NOT_RUNNING`.
|
|
8943
|
+
Errors: `404 KUBERNETES_CLUSTER_NOT_FOUND`; `409 PORT_IN_USE`; `409 KUBERNETES_ROUTING_UNAVAILABLE` (a cluster with no VPC address); `409 IP_POOL_EXHAUSTED` (no public address is free in the zone; try again later); `409 KUBERNETES_CLUSTER_NOT_RUNNING`.
|
|
8937
8944
|
operationId: syncKubernetesRouting
|
|
8938
8945
|
security:
|
|
8939
8946
|
- apiKey: []
|
|
@@ -8980,7 +8987,7 @@ paths:
|
|
|
8980
8987
|
schema:
|
|
8981
8988
|
$ref: "#/components/schemas/Problem"
|
|
8982
8989
|
"409":
|
|
8983
|
-
description: "`PORT_IN_USE`, `KUBERNETES_ROUTING_UNAVAILABLE` or `KUBERNETES_CLUSTER_NOT_RUNNING`."
|
|
8990
|
+
description: "`PORT_IN_USE`, `KUBERNETES_ROUTING_UNAVAILABLE`, `IP_POOL_EXHAUSTED` or `KUBERNETES_CLUSTER_NOT_RUNNING`."
|
|
8984
8991
|
content:
|
|
8985
8992
|
"application/problem+json":
|
|
8986
8993
|
schema:
|
|
@@ -9031,7 +9038,7 @@ paths:
|
|
|
9031
9038
|
tags:
|
|
9032
9039
|
- Kubernetes
|
|
9033
9040
|
summary: Create a node pool
|
|
9034
|
-
description: "Adds a node pool: workers of their own plan, joined with the pool's labels, the label `pantech.io/node-pool=<name>` and the pool's taints, so workloads choose it with a nodeSelector and tolerations. Each worker is billed as a VM of the pool's plan once it has joined (`observed_workers`). With autoscaling on, the platform adds a worker when a pod the pool could run is waiting for room, and removes the newest one after 10 idle minutes. A pool's name is unique in its cluster: sending the same pool again is answered as a replay, another pool under a taken name is `409 NODE_POOL_NAME_TAKEN`. In a zone
|
|
9041
|
+
description: "Adds a node pool: workers of their own plan, joined with the pool's labels, the label `pantech.io/node-pool=<name>` and the pool's taints, so workloads choose it with a nodeSelector and tolerations. Each worker is billed as a VM of the pool's plan once it has joined (`observed_workers`). With autoscaling on, the platform adds a worker when a pod the pool could run is waiting for room, and removes the newest one after 10 idle minutes. A pool's name is unique in its cluster: sending the same pool again is answered as a replay, another pool under a taken name is `409 NODE_POOL_NAME_TAKEN`. In a zone listed in `fixed_node_sizes` on the versions list, the plan must be one of that zone's sizes (`422 KUBERNETES_PLAN_NOT_IN_ZONE`)."
|
|
9035
9042
|
operationId: createKubernetesNodePool
|
|
9036
9043
|
security:
|
|
9037
9044
|
- apiKey: []
|
|
@@ -13097,6 +13104,105 @@ paths:
|
|
|
13097
13104
|
"application/problem+json":
|
|
13098
13105
|
schema:
|
|
13099
13106
|
$ref: "#/components/schemas/Problem"
|
|
13107
|
+
/public/v1/instances/{instance_id}/agent/setup:
|
|
13108
|
+
post:
|
|
13109
|
+
tags:
|
|
13110
|
+
- Agent sessions
|
|
13111
|
+
summary: Set up an instance's agent
|
|
13112
|
+
description: |-
|
|
13113
|
+
Sets the agent up on one of your running instances, with no commands to run. **The instance restarts once:** it is stopped, set to install the agent on its next start, and started again, which takes about two minutes. The agent then installs itself and connects within a few minutes; `GET /instances/{instance_id}/agent` shows `token_pending: true` until it does, then `enrolled: true`.
|
|
13114
|
+
|
|
13115
|
+
Returns `202 Accepted` with an `operation_id` (also in the `Location` header). Poll `GET /public/v1/operations/{operation_id}` until `status` is `succeeded` or `failed`. The operation succeeds once the instance is running again; if the instance could not be set up, it is started again unchanged and the operation fails with `failure.code` `AGENT_SETUP_FAILED`. An instance that cannot restart can be set up by hand from the console, under the instance's Agent tab.
|
|
13116
|
+
|
|
13117
|
+
Send an `Idempotency-Key`. A retry with the same key returns the original operation instead of restarting the instance again.
|
|
13118
|
+
|
|
13119
|
+
Only an owner or admin can do this, and only with an AI app connection; standard API keys are refused.
|
|
13120
|
+
|
|
13121
|
+
**Scope:** `write`.
|
|
13122
|
+
operationId: setUpInstanceAgent
|
|
13123
|
+
security:
|
|
13124
|
+
- apiKey: []
|
|
13125
|
+
x-scope: write
|
|
13126
|
+
x-order: 167
|
|
13127
|
+
parameters:
|
|
13128
|
+
- name: instance_id
|
|
13129
|
+
in: path
|
|
13130
|
+
required: true
|
|
13131
|
+
description: "The instance's id (`vm_…`)."
|
|
13132
|
+
schema:
|
|
13133
|
+
type: string
|
|
13134
|
+
- $ref: "#/components/parameters/IdempotencyKey"
|
|
13135
|
+
responses:
|
|
13136
|
+
202:
|
|
13137
|
+
description: "Accepted. Follow `operation_id` until it finishes."
|
|
13138
|
+
headers:
|
|
13139
|
+
RateLimit-Limit:
|
|
13140
|
+
description: Requests allowed per window for this key.
|
|
13141
|
+
schema:
|
|
13142
|
+
type: integer
|
|
13143
|
+
RateLimit-Remaining:
|
|
13144
|
+
description: Requests left in this window.
|
|
13145
|
+
schema:
|
|
13146
|
+
type: integer
|
|
13147
|
+
RateLimit-Reset:
|
|
13148
|
+
description: Seconds until the window resets.
|
|
13149
|
+
schema:
|
|
13150
|
+
type: integer
|
|
13151
|
+
X-Request-Id:
|
|
13152
|
+
description: "This request's id."
|
|
13153
|
+
schema:
|
|
13154
|
+
type: string
|
|
13155
|
+
content:
|
|
13156
|
+
application/json:
|
|
13157
|
+
schema:
|
|
13158
|
+
$ref: "#/components/schemas/Accepted"
|
|
13159
|
+
400:
|
|
13160
|
+
description: |-
|
|
13161
|
+
`IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
|
|
13162
|
+
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
|
|
13163
|
+
content:
|
|
13164
|
+
"application/problem+json":
|
|
13165
|
+
schema:
|
|
13166
|
+
$ref: "#/components/schemas/Problem"
|
|
13167
|
+
401:
|
|
13168
|
+
$ref: "#/components/responses/Unauthenticated"
|
|
13169
|
+
403:
|
|
13170
|
+
description: |-
|
|
13171
|
+
`FORBIDDEN`: only an owner or admin of the organization can set an agent up.
|
|
13172
|
+
`AGENT_SESSIONS_NOT_FOR_API_KEYS`: standard API keys cannot do this. Use the console, or an AI app connection.
|
|
13173
|
+
`INSUFFICIENT_SCOPE`: the key does not have the `write` scope.
|
|
13174
|
+
content:
|
|
13175
|
+
"application/problem+json":
|
|
13176
|
+
schema:
|
|
13177
|
+
$ref: "#/components/schemas/Problem"
|
|
13178
|
+
404:
|
|
13179
|
+
description: |-
|
|
13180
|
+
`INSTANCE_NOT_FOUND`: no instance with this id in your organization.
|
|
13181
|
+
`RESOURCE_NOT_FOUND`: the id is not an instance id (`vm_…`).
|
|
13182
|
+
content:
|
|
13183
|
+
"application/problem+json":
|
|
13184
|
+
schema:
|
|
13185
|
+
$ref: "#/components/schemas/Problem"
|
|
13186
|
+
409:
|
|
13187
|
+
description: |-
|
|
13188
|
+
`AGENT_ALREADY_SET_UP`: the instance's agent is already set up. Start a session instead.
|
|
13189
|
+
`AGENT_SETUP_NEEDS_RUNNING_INSTANCE`: the instance is not running, or another change that restarts it is in progress. Start it, or wait for its current operation to finish, then retry.
|
|
13190
|
+
`ACCOUNT_SUSPENDED`: the organization was suspended for non-payment. Pay the outstanding invoice in the console, then retry.
|
|
13191
|
+
`IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was used for a different request. Use a new key.
|
|
13192
|
+
content:
|
|
13193
|
+
"application/problem+json":
|
|
13194
|
+
schema:
|
|
13195
|
+
$ref: "#/components/schemas/Problem"
|
|
13196
|
+
429:
|
|
13197
|
+
$ref: "#/components/responses/RateLimited"
|
|
13198
|
+
503:
|
|
13199
|
+
description: |-
|
|
13200
|
+
`AGENT_SESSIONS_UNAVAILABLE`: agent sessions are not available on this deployment right now. Try again later; resending with the same `Idempotency-Key` is safe.
|
|
13201
|
+
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
|
|
13202
|
+
content:
|
|
13203
|
+
"application/problem+json":
|
|
13204
|
+
schema:
|
|
13205
|
+
$ref: "#/components/schemas/Problem"
|
|
13100
13206
|
/public/v1/instances/{instance_id}/agent-sessions:
|
|
13101
13207
|
post:
|
|
13102
13208
|
tags:
|
|
@@ -13606,6 +13712,7 @@ paths:
|
|
|
13606
13712
|
409:
|
|
13607
13713
|
description: |-
|
|
13608
13714
|
`AGENT_SESSION_KIND_MISMATCH`: this is an agent session, which has no tool calls.
|
|
13715
|
+
`AGENT_SESSION_RECORD_TOO_LONG`: the session's record is too long to find this call's result. Start a new session.
|
|
13609
13716
|
content:
|
|
13610
13717
|
"application/problem+json":
|
|
13611
13718
|
schema:
|
|
@@ -13709,7 +13816,7 @@ paths:
|
|
|
13709
13816
|
description: |-
|
|
13710
13817
|
A person's decision on an approval the session asked for. Refused for an AI app's connection (`AGENT_APPROVAL_NEEDS_PERSON`): use a standard API key, or the console.
|
|
13711
13818
|
|
|
13712
|
-
**Idempotency:** an approval is decided once; a
|
|
13819
|
+
**Idempotency:** an approval is decided once; sending the same decision again (after an error, say) delivers it to the agent again and returns 200; a different decision is `AGENT_APPROVAL_ALREADY_DECIDED`.
|
|
13713
13820
|
|
|
13714
13821
|
**Scope:** `write`.
|
|
13715
13822
|
operationId: decideAgentApproval
|
|
@@ -13791,7 +13898,8 @@ paths:
|
|
|
13791
13898
|
409:
|
|
13792
13899
|
description: |-
|
|
13793
13900
|
`AGENT_SESSION_ENDED`: the session has ended. Start a new one.
|
|
13794
|
-
`AGENT_APPROVAL_ALREADY_DECIDED`: the approval has been decided.
|
|
13901
|
+
`AGENT_APPROVAL_ALREADY_DECIDED`: the approval has been decided differently.
|
|
13902
|
+
`AGENT_SESSION_RECORD_TOO_LONG`: the session's record is too long to look the approval up. Start a new session.
|
|
13795
13903
|
content:
|
|
13796
13904
|
"application/problem+json":
|
|
13797
13905
|
schema:
|
|
@@ -15895,6 +16003,26 @@ components:
|
|
|
15895
16003
|
description: "Zones where a cluster can have 3 control nodes."
|
|
15896
16004
|
items:
|
|
15897
16005
|
type: string
|
|
16006
|
+
fixed_node_sizes:
|
|
16007
|
+
type: array
|
|
16008
|
+
description: "Zones that build Kubernetes nodes only at fixed sizes, one entry per size, so a zone may appear more than once. There, a cluster, a node plan resize and a node pool take only a plan of exactly one entry's `vcpu` and `memory_mb`; anything else is `422 KUBERNETES_PLAN_NOT_IN_ZONE`. A zone not listed takes any plan that meets the version's minimum."
|
|
16009
|
+
items:
|
|
16010
|
+
$ref: "#/components/schemas/KubernetesFixedNodeSize"
|
|
16011
|
+
KubernetesFixedNodeSize:
|
|
16012
|
+
type: object
|
|
16013
|
+
required:
|
|
16014
|
+
- zone_id
|
|
16015
|
+
- vcpu
|
|
16016
|
+
- memory_mb
|
|
16017
|
+
properties:
|
|
16018
|
+
zone_id:
|
|
16019
|
+
type: string
|
|
16020
|
+
vcpu:
|
|
16021
|
+
type: integer
|
|
16022
|
+
description: "The vCPUs of one node size the zone builds; 0 when the zone takes no plan now."
|
|
16023
|
+
memory_mb:
|
|
16024
|
+
type: integer
|
|
16025
|
+
description: "The memory, in MB, of that node size; 0 when the zone takes no plan now."
|
|
15898
16026
|
CreateKubernetesClusterRequest:
|
|
15899
16027
|
type: object
|
|
15900
16028
|
required:
|
|
@@ -15920,7 +16048,7 @@ components:
|
|
|
15920
16048
|
examples: ["snet_06gk3x9tq7m2v8r4y1c5d0zp8w"]
|
|
15921
16049
|
node_plan:
|
|
15922
16050
|
type: string
|
|
15923
|
-
description: "The plan slug every node uses, from the plans list. In a zone
|
|
16051
|
+
description: "The plan slug every node uses, from the plans list. In a zone listed in `fixed_node_sizes` on the versions list, the plan must be one of that zone's sizes: `422 KUBERNETES_PLAN_NOT_IN_ZONE` on `node_plan`. Change it later with the node plan resize, or add a node pool."
|
|
15924
16052
|
examples: ["s-2vcpu-4gb"]
|
|
15925
16053
|
control_nodes:
|
|
15926
16054
|
type: integer
|
|
@@ -16131,7 +16259,7 @@ components:
|
|
|
16131
16259
|
- deleted
|
|
16132
16260
|
observed_state:
|
|
16133
16261
|
type: string
|
|
16134
|
-
description: "`updating` while a scale or upgrade runs."
|
|
16262
|
+
description: "A new cluster reads `provisioning` until every node has joined and its kubeconfig can be downloaded, then `running`. `updating` while a scale or upgrade runs."
|
|
16135
16263
|
enum:
|
|
16136
16264
|
- pending
|
|
16137
16265
|
- provisioning
|
|
@@ -16299,16 +16427,29 @@ components:
|
|
|
16299
16427
|
- taints
|
|
16300
16428
|
- status
|
|
16301
16429
|
- observed_workers
|
|
16430
|
+
- failure_code
|
|
16431
|
+
- failure_reason
|
|
16302
16432
|
- created_at
|
|
16303
16433
|
- updated_at
|
|
16304
16434
|
properties:
|
|
16305
16435
|
status:
|
|
16306
16436
|
type: string
|
|
16307
|
-
description: "`provisioning` (workers being built), `ready` (every worker has joined), `updating` (a scale in progress), `deleting`, or `unavailable` (a pool made while node pools were a preview, with no node size: delete it and create it again)."
|
|
16437
|
+
description: "`provisioning` (workers being built), `ready` (every worker has joined), `updating` (a scale in progress), `deleting`, or `unavailable` (a pool made while node pools were a preview, with no node size: delete it and create it again). A pool whose workers cannot be built stays `provisioning` or `updating` and is retried; `failure_code` and `failure_reason` say why."
|
|
16308
16438
|
enum: [provisioning, ready, updating, deleting, unavailable]
|
|
16309
16439
|
observed_workers:
|
|
16310
16440
|
type: integer
|
|
16311
16441
|
description: "The pool's workers that have joined the cluster. This is what is billed, never `workers` alone."
|
|
16442
|
+
failure_code:
|
|
16443
|
+
type:
|
|
16444
|
+
- string
|
|
16445
|
+
- "null"
|
|
16446
|
+
description: "Why the pool's workers last failed to build, e.g. `PROVISIONING_CAPACITY_UNAVAILABLE` (the region has no room for them now) or `PROVISIONING_LIMIT_EXCEEDED`. Null while nothing has failed; cleared once the pool is `ready` or is scaled."
|
|
16447
|
+
examples: ["PROVISIONING_CAPACITY_UNAVAILABLE"]
|
|
16448
|
+
failure_reason:
|
|
16449
|
+
type:
|
|
16450
|
+
- string
|
|
16451
|
+
- "null"
|
|
16452
|
+
description: "A sentence saying what failed and what to do. Null when `failure_code` is."
|
|
16312
16453
|
id:
|
|
16313
16454
|
type: string
|
|
16314
16455
|
description: "e.g. `k8spool_...`."
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|
|
@@ -101,6 +101,7 @@ __all__ = [
|
|
|
101
101
|
"KubernetesClusterAddon",
|
|
102
102
|
"KubernetesClusterAddonList",
|
|
103
103
|
"KubernetesClusterList",
|
|
104
|
+
"KubernetesFixedNodeSize",
|
|
104
105
|
"KubernetesNode",
|
|
105
106
|
"KubernetesNodePool",
|
|
106
107
|
"KubernetesNodePoolList",
|
|
@@ -405,12 +406,26 @@ class KubernetesVersion(TypedDict):
|
|
|
405
406
|
min_memory_mb: int
|
|
406
407
|
|
|
407
408
|
|
|
408
|
-
class
|
|
409
|
+
class _KubernetesVersionListRequired(TypedDict):
|
|
409
410
|
data: List[KubernetesVersion]
|
|
410
411
|
# Zones where a cluster can have 3 control nodes.
|
|
411
412
|
ha_zone_ids: List[str]
|
|
412
413
|
|
|
413
414
|
|
|
415
|
+
class KubernetesVersionList(_KubernetesVersionListRequired, total=False):
|
|
416
|
+
# Zones that build Kubernetes nodes only at fixed sizes, one entry per size, so a zone may
|
|
417
|
+
# appear more than once.
|
|
418
|
+
fixed_node_sizes: List[KubernetesFixedNodeSize]
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
class KubernetesFixedNodeSize(TypedDict):
|
|
422
|
+
zone_id: str
|
|
423
|
+
# The vCPUs of one node size the zone builds; 0 when the zone takes no plan now.
|
|
424
|
+
vcpu: int
|
|
425
|
+
# The memory, in MB, of that node size; 0 when the zone takes no plan now.
|
|
426
|
+
memory_mb: int
|
|
427
|
+
|
|
428
|
+
|
|
414
429
|
class _CreateKubernetesClusterRequestRequired(TypedDict):
|
|
415
430
|
# 1 to 40 lowercase letters, digits and hyphens, starting with a letter.
|
|
416
431
|
name: str
|
|
@@ -508,7 +523,8 @@ class _KubernetesClusterRequired(TypedDict):
|
|
|
508
523
|
# control_nodes plus workers: the VMs billed.
|
|
509
524
|
nodes: int
|
|
510
525
|
desired_state: Literal["running", "stopped", "deleted"]
|
|
511
|
-
# `
|
|
526
|
+
# A new cluster reads `provisioning` until every node has joined and its kubeconfig can be
|
|
527
|
+
# downloaded, then `running`.
|
|
512
528
|
observed_state: Literal[
|
|
513
529
|
"pending",
|
|
514
530
|
"provisioning",
|
|
@@ -596,6 +612,11 @@ class KubernetesNodePool(TypedDict):
|
|
|
596
612
|
status: Literal["provisioning", "ready", "updating", "deleting", "unavailable"]
|
|
597
613
|
# The pool's workers that have joined the cluster.
|
|
598
614
|
observed_workers: int
|
|
615
|
+
# Why the pool's workers last failed to build, e.g. `PROVISIONING_CAPACITY_UNAVAILABLE` (the
|
|
616
|
+
# region has no room for them now) or `PROVISIONING_LIMIT_EXCEEDED`.
|
|
617
|
+
failure_code: Optional[str]
|
|
618
|
+
# A sentence saying what failed and what to do.
|
|
619
|
+
failure_reason: Optional[str]
|
|
599
620
|
# e.g. `k8spool_...`.
|
|
600
621
|
id: str
|
|
601
622
|
cluster_id: str
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|