ibee-cli 0.11.1__tar.gz → 0.13.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.
Files changed (39) hide show
  1. {ibee_cli-0.11.1/src/ibee_cli.egg-info → ibee_cli-0.13.0}/PKG-INFO +29 -8
  2. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/README.md +27 -6
  3. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/pyproject.toml +2 -2
  4. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/__init__.py +1 -1
  5. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/__init__.py +5 -2
  6. ibee_cli-0.13.0/src/ibee_cli/commands/api_tokens.py +82 -0
  7. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/billing.py +1 -1
  8. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/block_storage.py +1 -1
  9. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/buckets.py +4 -4
  10. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/cdn.py +1 -1
  11. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/compute.py +4 -4
  12. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/firewalls.py +1 -1
  13. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/gpus.py +1 -1
  14. ibee_cli-0.13.0/src/ibee_cli/commands/kubernetes.py +226 -0
  15. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/load_balancers.py +2 -2
  16. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/ops.py +1 -1
  17. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/registries.py +1 -1
  18. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/reserved_ips.py +1 -1
  19. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/secrets.py +1 -1
  20. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/vms.py +1 -1
  21. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/commands/vpcs.py +1 -1
  22. ibee_cli-0.13.0/src/ibee_cli/commands/vpus.py +697 -0
  23. {ibee_cli-0.11.1 → ibee_cli-0.13.0/src/ibee_cli.egg-info}/PKG-INFO +29 -8
  24. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli.egg-info/SOURCES.txt +3 -0
  25. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli.egg-info/requires.txt +1 -1
  26. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/tests/test_command_behaviour.py +41 -0
  27. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/tests/test_contract_commands.py +4 -3
  28. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/LICENSE +0 -0
  29. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/setup.cfg +0 -0
  30. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/billing_selection.py +0 -0
  31. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/context.py +0 -0
  32. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/helpers.py +0 -0
  33. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/main.py +0 -0
  34. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli/render.py +0 -0
  35. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli.egg-info/dependency_links.txt +0 -0
  36. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli.egg-info/entry_points.txt +0 -0
  37. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/src/ibee_cli.egg-info/top_level.txt +0 -0
  38. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/tests/test_cli_core.py +0 -0
  39. {ibee_cli-0.11.1 → ibee_cli-0.13.0}/tests/test_contract_014_commands.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ibee-cli
3
- Version: 0.11.1
3
+ Version: 0.13.0
4
4
  Summary: Official command-line interface for the IBEE Solutions cloud platform
5
5
  Author-email: IBEE Solutions <support@ibee.ai>
6
6
  License-Expression: MIT
@@ -13,7 +13,7 @@ Classifier: Environment :: Console
13
13
  Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: ibee<0.12,>=0.11.0
16
+ Requires-Dist: ibee<0.14,>=0.13.0
17
17
  Requires-Dist: httpx>=0.27
18
18
  Requires-Dist: typer>=0.12
19
19
  Requires-Dist: click>=8.1
@@ -28,7 +28,7 @@ Dynamic: license-file
28
28
 
29
29
  Official command-line interface for the IBEE Solutions cloud platform, built on the
30
30
  [`ibee` Python SDK](https://github.com/IBEE/ibee-python). It has one command per
31
- operation of the IBEE public API (contract 0.14.3, 222 operations): each command makes
31
+ operation of the IBEE public API (contract 0.18.0, 271 operations): each command makes
32
32
  that operation's one SDK call and prints the server's answer. The server decides
33
33
  prices, eligibility, limits and states; the CLI checks nothing before sending.
34
34
 
@@ -61,9 +61,9 @@ sent as every operation's `workspace_id`.
61
61
 
62
62
  ## Commands
63
63
 
64
- `ibee --help` lists the groups (`vms`, `gpus`, `ops`, `compute`, `block-storage`,
65
- `buckets`, `cdn`, `secrets`, `vpcs`, `reserved-ips`, `firewalls`, `load-balancers`,
66
- `registries`, `billing`); [COMMANDS.md](COMMANDS.md) lists every command with its API operation,
64
+ `ibee --help` lists the groups (`vms`, `gpus`, `ops`, `compute`, `kubernetes`,
65
+ `block-storage`, `buckets`, `cdn`, `secrets`, `vpcs`, `reserved-ips`, `firewalls`,
66
+ `load-balancers`, `registries`, `billing`, `api-tokens`); [COMMANDS.md](COMMANDS.md) lists every command with its API operation,
67
67
  and `ibee COMMAND --help` shows each option's description from the contract.
68
68
 
69
69
  Every command follows the contract, field for field:
@@ -75,8 +75,13 @@ Every command follows the contract, field for field:
75
75
  - booleans are `--name/--no-name`; arrays of strings or numbers repeat the option
76
76
  (`--tags a --tags b`); objects and arrays of objects take JSON, and a JSON value of
77
77
  `@FILE` reads the file, `@-` standard input (`--rules @rules.json`);
78
- - `X-Idempotency-Key` (and Container Registry's `Idempotency-Key`) is
79
- `--idempotency-key`; without it the SDK sends a new random key.
78
+ - `X-Idempotency-Key` (and the `Idempotency-Key` of Container Registry plan upgrade,
79
+ Secret Manager enable and app-credential create, and load balancer and Kubernetes
80
+ changes) is `--idempotency-key`; without it the SDK sends a new random key;
81
+ - each command calls the SDK method Fern generates for its operation:
82
+ `x-fern-sdk-group-name` / `x-fern-sdk-method-name` when the contract has them
83
+ (`ibee api-tokens scopes` calls `client.api_tokens.list_scopes`), else the tag and
84
+ operationId.
80
85
 
81
86
  ```bash
82
87
  ibee compute sites
@@ -105,6 +110,22 @@ ibee load-balancers regions
105
110
  ibee registries tokens create REGISTRY_ID --token-name ci-push --permission PULL_PUSH
106
111
  ```
107
112
 
113
+ ### API tokens
114
+
115
+ A token with `api-tokens.write` creates, lists, reads and revokes its owner's API
116
+ tokens. A new token never gets more access than the token that creates it (403
117
+ `scope_not_held`, `workspace_not_held` or `expiry_exceeds_parent`). The value is in
118
+ `token` of the `create` answer only.
119
+
120
+ ```bash
121
+ ibee api-tokens scopes
122
+ ibee api-tokens list
123
+ ibee api-tokens create --name ci-deploy --description "GitHub Actions deploys" \
124
+ --scopes vm.read --scopes vm.write --workspace-ids 907479 --expires-at 2027-06-30T00:00:00Z
125
+ ibee api-tokens get TOKEN_ID
126
+ ibee api-tokens delete TOKEN_ID --yes
127
+ ```
128
+
108
129
  ### VM creates: `--billing-interval`
109
130
 
110
131
  `vms create` and `gpus create` need the contract's `billing_catalog` (a
@@ -2,7 +2,7 @@
2
2
 
3
3
  Official command-line interface for the IBEE Solutions cloud platform, built on the
4
4
  [`ibee` Python SDK](https://github.com/IBEE/ibee-python). It has one command per
5
- operation of the IBEE public API (contract 0.14.3, 222 operations): each command makes
5
+ operation of the IBEE public API (contract 0.18.0, 271 operations): each command makes
6
6
  that operation's one SDK call and prints the server's answer. The server decides
7
7
  prices, eligibility, limits and states; the CLI checks nothing before sending.
8
8
 
@@ -35,9 +35,9 @@ sent as every operation's `workspace_id`.
35
35
 
36
36
  ## Commands
37
37
 
38
- `ibee --help` lists the groups (`vms`, `gpus`, `ops`, `compute`, `block-storage`,
39
- `buckets`, `cdn`, `secrets`, `vpcs`, `reserved-ips`, `firewalls`, `load-balancers`,
40
- `registries`, `billing`); [COMMANDS.md](COMMANDS.md) lists every command with its API operation,
38
+ `ibee --help` lists the groups (`vms`, `gpus`, `ops`, `compute`, `kubernetes`,
39
+ `block-storage`, `buckets`, `cdn`, `secrets`, `vpcs`, `reserved-ips`, `firewalls`,
40
+ `load-balancers`, `registries`, `billing`, `api-tokens`); [COMMANDS.md](COMMANDS.md) lists every command with its API operation,
41
41
  and `ibee COMMAND --help` shows each option's description from the contract.
42
42
 
43
43
  Every command follows the contract, field for field:
@@ -49,8 +49,13 @@ Every command follows the contract, field for field:
49
49
  - booleans are `--name/--no-name`; arrays of strings or numbers repeat the option
50
50
  (`--tags a --tags b`); objects and arrays of objects take JSON, and a JSON value of
51
51
  `@FILE` reads the file, `@-` standard input (`--rules @rules.json`);
52
- - `X-Idempotency-Key` (and Container Registry's `Idempotency-Key`) is
53
- `--idempotency-key`; without it the SDK sends a new random key.
52
+ - `X-Idempotency-Key` (and the `Idempotency-Key` of Container Registry plan upgrade,
53
+ Secret Manager enable and app-credential create, and load balancer and Kubernetes
54
+ changes) is `--idempotency-key`; without it the SDK sends a new random key;
55
+ - each command calls the SDK method Fern generates for its operation:
56
+ `x-fern-sdk-group-name` / `x-fern-sdk-method-name` when the contract has them
57
+ (`ibee api-tokens scopes` calls `client.api_tokens.list_scopes`), else the tag and
58
+ operationId.
54
59
 
55
60
  ```bash
56
61
  ibee compute sites
@@ -79,6 +84,22 @@ ibee load-balancers regions
79
84
  ibee registries tokens create REGISTRY_ID --token-name ci-push --permission PULL_PUSH
80
85
  ```
81
86
 
87
+ ### API tokens
88
+
89
+ A token with `api-tokens.write` creates, lists, reads and revokes its owner's API
90
+ tokens. A new token never gets more access than the token that creates it (403
91
+ `scope_not_held`, `workspace_not_held` or `expiry_exceeds_parent`). The value is in
92
+ `token` of the `create` answer only.
93
+
94
+ ```bash
95
+ ibee api-tokens scopes
96
+ ibee api-tokens list
97
+ ibee api-tokens create --name ci-deploy --description "GitHub Actions deploys" \
98
+ --scopes vm.read --scopes vm.write --workspace-ids 907479 --expires-at 2027-06-30T00:00:00Z
99
+ ibee api-tokens get TOKEN_ID
100
+ ibee api-tokens delete TOKEN_ID --yes
101
+ ```
102
+
82
103
  ### VM creates: `--billing-interval`
83
104
 
84
105
  `vms create` and `gpus create` need the contract's `billing_catalog` (a
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ibee-cli"
7
- version = "0.11.1"
7
+ version = "0.13.0"
8
8
  description = "Official command-line interface for the IBEE Solutions cloud platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -18,7 +18,7 @@ classifiers = [
18
18
  "Environment :: Console",
19
19
  ]
20
20
  dependencies = [
21
- "ibee>=0.11.0,<0.12",
21
+ "ibee>=0.13.0,<0.14",
22
22
  "httpx>=0.27",
23
23
  "typer>=0.12",
24
24
  "click>=8.1",
@@ -1,3 +1,3 @@
1
1
  """IBEE Solutions command-line interface."""
2
2
 
3
- __version__ = "0.11.1"
3
+ __version__ = "0.13.0"
@@ -1,15 +1,17 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """The command groups, in `ibee --help` order."""
4
4
 
5
- from . import billing, block_storage, buckets, cdn, compute, firewalls, gpus, load_balancers, ops, registries, reserved_ips, secrets, vms, vpcs
5
+ from . import api_tokens, billing, block_storage, buckets, cdn, compute, firewalls, gpus, kubernetes, load_balancers, ops, registries, reserved_ips, secrets, vms, vpcs, vpus
6
6
 
7
7
  #: (CLI name, Typer app) of every command group.
8
8
  GROUPS = [
9
9
  ('vms', vms.app),
10
10
  ('gpus', gpus.app),
11
+ ('vpus', vpus.app),
11
12
  ('ops', ops.app),
12
13
  ('compute', compute.app),
14
+ ('kubernetes', kubernetes.app),
13
15
  ('block-storage', block_storage.app),
14
16
  ('buckets', buckets.app),
15
17
  ('cdn', cdn.app),
@@ -20,4 +22,5 @@ GROUPS = [
20
22
  ('load-balancers', load_balancers.app),
21
23
  ('registries', registries.app),
22
24
  ('billing', billing.app),
25
+ ('api-tokens', api_tokens.app),
23
26
  ]
@@ -0,0 +1,82 @@
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
+ # Do not edit by hand: change the contract or the generator and run the script again.
3
+ """``ibee api-tokens``: Platform API tokens: scopes, create, list, read and revoke (one command per contract operation)."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List, Optional
8
+
9
+ import typer
10
+
11
+ from ..helpers import compact, confirm, sdk, workspace
12
+ from ..render import emit, handle_api_errors
13
+
14
+ app = typer.Typer(help='Platform API tokens: scopes, create, list, read and revoke', no_args_is_help=True)
15
+
16
+
17
+ @app.command('list', help="List API tokens.\n\nLists the platform API tokens of the calling token's owner in its organization, newest first, including revoked and expired ones. Token values are never returned. Requires scope: api-tokens.read.\n\nAPI: GET /api-tokens (listApiTokens).", short_help='List API tokens')
18
+ @handle_api_errors
19
+ def list_api_tokens(
20
+ ctx: typer.Context,
21
+ ) -> None:
22
+ client = sdk(ctx)
23
+ result = client.api_tokens.list(**compact(workspace_id=workspace(ctx)))
24
+ emit(result, collection='items', id_field='id')
25
+
26
+
27
+ @app.command('create', help="Create an API token.\n\nCreates a platform API token in the calling token's organization, owned by the same person, and returns its value once in `token`. The new token never gets more access than the calling token: every scope in `scopes` must be one the calling token holds (403 `scope_not_held`); `workspace_ids` must be workspaces the calling token can reach, and a token limited to some workspaces cannot create one for every workspace (403 `workspace_not_held`); `expires_at` cannot be later than the calling token's expiry (403 `expiry_exceeds_parent`). Leave out `workspace_ids` to get the calling token's workspaces and `expires_at` to get its expiry. The token's user must still be an Owner or Admin of the organization, identity-verified, and the organization must not be restricted, as for a token created in the portal. Requires scope: api-tokens.write.\n\nAPI: POST /api-tokens (createApiToken).", short_help='Create an API token')
28
+ @handle_api_errors
29
+ def create_api_token(
30
+ ctx: typer.Context,
31
+ name: str = typer.Option(..., '--name', show_default=False, help='What will use the token, for example `ci-deploy`.'),
32
+ scopes: List[str] = typer.Option(..., '--scopes', show_default=False, help='Scopes to grant, from `GET /api-token-scopes`. Each one must be held by the calling token.'),
33
+ description: Optional[str] = typer.Option(None, '--description', show_default=False, help='Optional note about the token.'),
34
+ workspace_ids: Optional[List[str]] = typer.Option(None, '--workspace-ids', show_default=False, help="Workspaces the token may use. Leave out (or send an empty list) for the calling token's workspaces: every workspace when the calling token has every workspace. Each one must be reachable by the calling token."),
35
+ expires_at: Optional[str] = typer.Option(None, '--expires-at', show_default=False, help="When the token stops working (RFC 3339). Leave out for the calling token's expiry, or no expiry when the calling token has none. Never later than the calling token's expiry."),
36
+ ) -> None:
37
+ client = sdk(ctx)
38
+ result = client.api_tokens.create(
39
+ **compact(
40
+ workspace_id=workspace(ctx),
41
+ name=name,
42
+ scopes=scopes,
43
+ description=description,
44
+ workspace_ids=workspace_ids,
45
+ expires_at=expires_at,
46
+ ),
47
+ )
48
+ emit(result)
49
+
50
+
51
+ @app.command('get', help="Get an API token.\n\nReturns one platform API token of the calling token's owner, without its value. 404 when the ID is unknown or belongs to another person or organization. Requires scope: api-tokens.read.\n\nAPI: GET /api-tokens/{token_id} (getApiToken).", short_help='Get an API token')
52
+ @handle_api_errors
53
+ def get_api_token(
54
+ ctx: typer.Context,
55
+ token_id: str = typer.Argument(..., metavar='TOKEN_ID', show_default=False, help="The API token's ID (`id` in its answers)."),
56
+ ) -> None:
57
+ client = sdk(ctx)
58
+ result = client.api_tokens.get(token_id, **compact(workspace_id=workspace(ctx)))
59
+ emit(result)
60
+
61
+
62
+ @app.command('delete', help="Revoke an API token.\n\nRevokes a platform API token of the calling token's owner. It stops working on its next call and cannot be restored; it stays listed with `status: revoked`. A token may revoke itself. Revoking an already revoked token answers 200 with the same shape. 404 when the ID is unknown or belongs to another person or organization. Requires scope: api-tokens.write.\n\nAPI: DELETE /api-tokens/{token_id} (deleteApiToken).", short_help='Revoke an API token')
63
+ @handle_api_errors
64
+ def delete_api_token(
65
+ ctx: typer.Context,
66
+ token_id: str = typer.Argument(..., metavar='TOKEN_ID', show_default=False, help="The API token's ID (`id` in its answers)."),
67
+ yes: bool = typer.Option(False, '--yes', '-y', help='Do not ask for confirmation.'),
68
+ ) -> None:
69
+ confirm(ctx, yes, f'Revoke an API token {token_id}?')
70
+ client = sdk(ctx)
71
+ result = client.api_tokens.delete(token_id, **compact(workspace_id=workspace(ctx)))
72
+ emit(result)
73
+
74
+
75
+ @app.command('scopes', help='List API token scopes.\n\nLists every scope a platform API token can hold, with what it allows. A token you create can only get scopes the calling token holds. Requires scope: api-tokens.read.\n\nAPI: GET /api-token-scopes (listApiTokenScopes).', short_help='List API token scopes')
76
+ @handle_api_errors
77
+ def list_api_token_scopes(
78
+ ctx: typer.Context,
79
+ ) -> None:
80
+ client = sdk(ctx)
81
+ result = client.api_tokens.list_scopes(**compact(workspace_id=workspace(ctx)))
82
+ emit(result, collection='items')
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee billing``: Organization wallet balance and top-ups (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee block-storage``: Block Storage volumes and plans (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee buckets``: Object Storage buckets, bucket settings and S3 credentials (one command per contract operation)."""
4
4
 
@@ -50,7 +50,7 @@ def list_buckets(
50
50
  @handle_api_errors
51
51
  def create_bucket(
52
52
  ctx: typer.Context,
53
- name: str = typer.Option(..., '--name', show_default=False, help='Unique bucket name within the workspace.'),
53
+ name: str = typer.Option(..., '--name', show_default=False, help="Unique bucket name within the workspace. The longest name allowed is 63 characters minus the workspace ID's length minus 2 (55 for a 6-digit workspace ID); a longer name answers 400 with the limit."),
54
54
  region: str = typer.Option(..., '--region', show_default=False, help='Required Object Storage region identifier. This must match a region configured for the target environment; it is not a compute `site_id` or display name.'),
55
55
  is_public: Optional[bool] = typer.Option(None, '--is-public/--no-is-public', show_default=False, help='Whether the bucket allows unauthenticated read access.'),
56
56
  object_lock_enabled: Optional[bool] = typer.Option(None, '--object-lock-enabled/--no-object-lock-enabled', show_default=False, help='Must be `true` when `default_retention` is provided.'),
@@ -214,7 +214,7 @@ def get_bucket_object_lock(
214
214
  def set_bucket_object_lock(
215
215
  ctx: typer.Context,
216
216
  bucket_name: str = typer.Argument(..., metavar='BUCKET_NAME', show_default=False, help='Logical bucket name.'),
217
- rule: Optional[str] = typer.Option(None, '--rule', metavar='JSON', show_default=False, help='New default retention, or null to remove it. JSON (@FILE reads a file, @- stdin).'),
217
+ rule: Optional[str] = typer.Option(None, '--rule', metavar='JSON', show_default=False, help="New default retention, or null to remove it. Object Lock itself stays enabled on the bucket (it can't be turned off), and objects already stored keep their own retention. JSON (@FILE reads a file, @- stdin)."),
218
218
  ) -> None:
219
219
  client = sdk(ctx)
220
220
  result = client.object_storage.set_bucket_object_lock(
@@ -465,7 +465,7 @@ def get_s3credential(
465
465
  emit(result)
466
466
 
467
467
 
468
- @credentials_app.command('delete', help='Delete S3 credential.\n\nDeletes a credential record permanently. Revoke it first with POST /object-storage/credentials/{access_key_id}/revoke; the portal deletes revoked credentials only. Requires scope: object-storage.write.\n\nAPI: DELETE /object-storage/credentials/{access_key_id} (deleteS3Credential).', short_help='Delete S3 credential')
468
+ @credentials_app.command('delete', help='Delete S3 credential.\n\nDeletes a credential record permanently. Revoke it first with POST /object-storage/credentials/{access_key_id}/revoke: an active key answers 409 ("revoke it first") and keeps working. Requires scope: object-storage.write.\n\nAPI: DELETE /object-storage/credentials/{access_key_id} (deleteS3Credential).', short_help='Delete S3 credential')
469
469
  @handle_api_errors
470
470
  def delete_s3credential(
471
471
  ctx: typer.Context,
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee cdn``: CDN distributions, website configuration and custom domains (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee compute``: Compute catalog: sites, plans, images and recovery storage plans (one command per contract operation)."""
4
4
 
@@ -28,10 +28,10 @@ def list_compute_sites(
28
28
  @handle_api_errors
29
29
  def list_compute_plans(
30
30
  ctx: typer.Context,
31
- vm_type: str = typer.Option(..., '--vm-type', show_default=False, help='Kind of VM the plans are for. Required. - `cloud` - `gpu`'),
31
+ vm_type: str = typer.Option(..., '--vm-type', show_default=False, help='Kind of VM the plans are for. Required. - `cloud` - `gpu` - `vpu`: VPU plans are sold hourly only, and are listed hourly unless you ask otherwise.'),
32
32
  site_id: Optional[str] = typer.Option(None, '--site-id', show_default=False, help='Optional exact placement filter. Copy `site_id` from `GET /compute/sites`.'),
33
33
  currency: Optional[str] = typer.Option(None, '--currency', show_default=False, help='ISO 4217 code of the currency to quote prices in. Default `INR`.'),
34
- billing_interval: Optional[str] = typer.Option(None, '--billing-interval', show_default=False, help='Billing period to quote prices for. - `HOURLY` - `MONTHLY` (default)'),
34
+ billing_interval: Optional[str] = typer.Option(None, '--billing-interval', show_default=False, help='Billing period to quote prices for. - `HOURLY`: the default for `vm_type=vpu`. - `MONTHLY`: the default for `cloud` and `gpu`. VPU has no monthly plans, so `vm_type=vpu` with `MONTHLY` lists none.'),
35
35
  include_availability: Optional[bool] = typer.Option(None, '--include-availability/--no-include-availability', show_default=False, help='Check advisory placement by default when site_id is supplied. Set false for pricing-only discovery. This does not reserve stock.'),
36
36
  os_type: Optional[str] = typer.Option(None, '--os-type', show_default=False, help='OS pool to check when include_availability is true. One of: linux, windows.'),
37
37
  requires_public_ip: Optional[bool] = typer.Option(None, '--requires-public-ip/--no-requires-public-ip', show_default=False, help='Include public IPv4 capacity in the advisory placement check.'),
@@ -56,7 +56,7 @@ def list_compute_plans(
56
56
  @handle_api_errors
57
57
  def list_compute_images(
58
58
  ctx: typer.Context,
59
- vm_type: str = typer.Option(..., '--vm-type', show_default=False, help='Kind of VM the images are for. Required. - `cloud` - `gpu`'),
59
+ vm_type: str = typer.Option(..., '--vm-type', show_default=False, help='Kind of VM the images are for. Required. - `cloud` - `gpu` - `vpu`: the Ubuntu images the portal offers for VPU VMs.'),
60
60
  site_id: Optional[str] = typer.Option(None, '--site-id', show_default=False, help='Optional exact placement filter. Copy `site_id` from `GET /compute/sites`.'),
61
61
  ) -> None:
62
62
  client = sdk(ctx)
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee firewalls``: Firewall groups, rules and attachments (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee gpus``: GPU VMs (one command per contract operation)."""
4
4
 
@@ -0,0 +1,226 @@
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
+ # Do not edit by hand: change the contract or the generator and run the script again.
3
+ """``ibee kubernetes``: Managed Kubernetes clusters, node pools, operations and kubeconfig (one command per contract operation)."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Optional
8
+
9
+ import typer
10
+
11
+ from ..helpers import compact, confirm, json_arg, sdk, workspace
12
+ from ..render import emit, handle_api_errors
13
+
14
+ app = typer.Typer(help='Managed Kubernetes clusters, node pools, operations and kubeconfig', no_args_is_help=True)
15
+ node_pools_app = typer.Typer(help='Node pools of a Kubernetes cluster', no_args_is_help=True)
16
+ app.add_typer(node_pools_app, name='node-pools')
17
+
18
+
19
+ @app.command('plans', help="List Kubernetes plans.\n\nWhere Managed Kubernetes is sold and each availability tier's price per cluster-hour, from the billing catalog. Workers are billed separately as cloud VMs at their plan's price (see listComputePlans). An empty `siteCodes` means Kubernetes is not sold anywhere yet. A tier is null when Billing has no hourly price for it in this currency. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/plans (listKubernetesPlans).", short_help='List Kubernetes plans')
20
+ @handle_api_errors
21
+ def list_kubernetes_plans(
22
+ ctx: typer.Context,
23
+ currency: Optional[str] = typer.Option(None, '--currency', show_default=False, help='ISO 4217 code of the currency to quote prices in. Default `INR`.'),
24
+ ) -> None:
25
+ client = sdk(ctx)
26
+ result = client.kubernetes.list_kubernetes_plans(**compact(workspace_id=workspace(ctx), currency=currency))
27
+ emit(result)
28
+
29
+
30
+ @app.command('list', help="List Kubernetes clusters.\n\nLists the workspace's Kubernetes clusters with their node pools and latest operation. Deleted clusters are listed with `state` `deleted`. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/clusters (listKubernetesClusters).", short_help='List Kubernetes clusters')
31
+ @handle_api_errors
32
+ def list_kubernetes_clusters(
33
+ ctx: typer.Context,
34
+ ) -> None:
35
+ client = sdk(ctx)
36
+ result = client.kubernetes.list_kubernetes_clusters(**compact(workspace_id=workspace(ctx)))
37
+ emit(result, collection='items', id_field='id')
38
+
39
+
40
+ @app.command('create', help="Create a Kubernetes cluster.\n\nCreates a managed Kubernetes cluster with one or more worker node pools. Answers 202 with the cluster and the operation that builds it; follow it with getKubernetesOperation. New clusters use NAT connectivity: the workers reach the internet through a NAT gateway and have no public IPs. `network.mode` `create` makes a new NAT VPC (and its NAT gateway) for the cluster; `existing` uses a NAT VPC and subnet you already have. Before anything is created, Billing is asked about the tier's cluster SKU, every pool's worker SKU and the plan's VM limit (counting each pool's `replicas`, or its `autoscaling.max_replicas`), and the NAT gateway when a VPC is created; a refusal is 402 `billing_denied` with `billing_reason`. Other refusals: 409 `cluster_name_taken` or `idempotency_key_reused`; 422 `unsupported_site`, `unsupported_kubernetes_version`, `unknown_sku`, `unsupported_sku`, `sku_not_offered_here`, `node_pool_limit`, `replica_limit` or `duplicate_node_pool_name`. Requires scope: kubernetes.write.\n\nAPI: POST /kubernetes/clusters (createKubernetesCluster).", short_help='Create a Kubernetes cluster')
41
+ @handle_api_errors
42
+ def create_kubernetes_cluster(
43
+ ctx: typer.Context,
44
+ name: str = typer.Option(..., '--name', show_default=False, help='Lowercase letters, digits and hyphens, starting with a letter; unique in the workspace.'),
45
+ kubernetes_version: str = typer.Option(..., '--kubernetes-version', show_default=False, help='An exact Kubernetes release, `vMAJOR.MINOR.PATCH`. Offered now - `v1.37.1`.'),
46
+ network: str = typer.Option(..., '--network', metavar='JSON', show_default=False, help='`create` makes a new NAT VPC, its default subnet and a NAT gateway (billed hourly) for the cluster. `existing` uses a NAT VPC and subnet from the workspace (listVpcs). JSON (@FILE reads a file, @- stdin).'),
47
+ connectivity: str = typer.Option(..., '--connectivity', show_default=False, help="Workers reach the internet through the VPC's NAT gateway. The only value new clusters accept. One of: nat."),
48
+ node_pools: str = typer.Option(..., '--node-pools', metavar='JSON', show_default=False, help='JSON (@FILE reads a file, @- stdin).'),
49
+ site_id: Optional[str] = typer.Option(None, '--site-id', show_default=False, help='The `site_id` from listComputeSites of a site whose `site_code` is in listKubernetesPlans `siteCodes`. Left out, the cluster is created at the site the Kubernetes service runs in.'),
50
+ tier: Optional[str] = typer.Option(None, '--tier', show_default=False, help="`standard` runs one control-plane replica; `ha` runs three and spreads every pool's workers across hosts."),
51
+ idempotency_key: Optional[str] = typer.Option(None, '--idempotency-key', show_default=False, help='A unique key for this change. Retry with the same key and body to get the same operation back; the same key with a different body answers 409 `idempotency_key_reused`. `X-Idempotency-Key` is accepted too.'),
52
+ ) -> None:
53
+ client = sdk(ctx)
54
+ result = client.kubernetes.create_kubernetes_cluster(
55
+ **compact(
56
+ workspace_id=workspace(ctx),
57
+ name=name,
58
+ kubernetes_version=kubernetes_version,
59
+ network=json_arg(network, '--network'),
60
+ connectivity=connectivity,
61
+ node_pools=json_arg(node_pools, '--node-pools'),
62
+ site_id=site_id,
63
+ tier=tier,
64
+ idempotency_key=idempotency_key,
65
+ ),
66
+ )
67
+ emit(result)
68
+
69
+
70
+ @app.command('get', help='Get a Kubernetes cluster.\n\nReturns one cluster with its node pools and latest operation. `customer_api_endpoint` is set once the cluster is `running` and its kubeconfig can be downloaded. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/clusters/{cluster_id} (getKubernetesCluster).', short_help='Get a Kubernetes cluster')
71
+ @handle_api_errors
72
+ def get_kubernetes_cluster(
73
+ ctx: typer.Context,
74
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
75
+ ) -> None:
76
+ client = sdk(ctx)
77
+ result = client.kubernetes.get_kubernetes_cluster(cluster_id, **compact(workspace_id=workspace(ctx)))
78
+ emit(result)
79
+
80
+
81
+ @app.command('delete', help="Delete a Kubernetes cluster.\n\nDeletes the cluster, its control plane and every worker node. Answers 202 with the operation and a `deletion` object. The VPC and NAT gateway the cluster created stay unless the body chooses them; a chosen one is still kept while anything besides the cluster's own workers uses it (see getKubernetesClusterDeletePreview). Deleting the VPC without its NAT gateway is refused with 422 `vpc_needs_nat_gateway`. Another running change answers 409 `operation_in_progress`. Requires scope: kubernetes.write.\n\nAPI: DELETE /kubernetes/clusters/{cluster_id} (deleteKubernetesCluster).", short_help='Delete a Kubernetes cluster')
82
+ @handle_api_errors
83
+ def delete_kubernetes_cluster(
84
+ ctx: typer.Context,
85
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
86
+ delete: Optional[str] = typer.Option(None, '--delete', metavar='JSON', show_default=False, help='JSON (@FILE reads a file, @- stdin).'),
87
+ idempotency_key: Optional[str] = typer.Option(None, '--idempotency-key', show_default=False, help='A unique key for this change. Retry with the same key and body to get the same operation back; the same key with a different body answers 409 `idempotency_key_reused`. `X-Idempotency-Key` is accepted too.'),
88
+ yes: bool = typer.Option(False, '--yes', '-y', help='Do not ask for confirmation.'),
89
+ ) -> None:
90
+ confirm(ctx, yes, f'Delete a Kubernetes cluster {cluster_id}?')
91
+ client = sdk(ctx)
92
+ result = client.kubernetes.delete_kubernetes_cluster(
93
+ cluster_id,
94
+ **compact(
95
+ workspace_id=workspace(ctx),
96
+ delete=json_arg(delete, '--delete'),
97
+ idempotency_key=idempotency_key,
98
+ ),
99
+ )
100
+ emit(result)
101
+
102
+
103
+ @app.command('delete-preview', help='Preview a Kubernetes cluster delete.\n\nLists what a cluster delete may also remove: the VPC and NAT gateway the cluster created (null when it used an existing VPC), with how many other resources use each. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/clusters/{cluster_id}/delete-preview (getKubernetesClusterDeletePreview).', short_help='Preview a Kubernetes cluster delete')
104
+ @handle_api_errors
105
+ def get_kubernetes_cluster_delete_preview(
106
+ ctx: typer.Context,
107
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
108
+ ) -> None:
109
+ client = sdk(ctx)
110
+ result = client.kubernetes.get_kubernetes_cluster_delete_preview(
111
+ cluster_id,
112
+ **compact(
113
+ workspace_id=workspace(ctx),
114
+ ),
115
+ )
116
+ emit(result)
117
+
118
+
119
+ @app.command('resources', help="List a Kubernetes cluster's resources.\n\nWhat the cluster's workers use, as the portal's Resources tab shows it: the VPC, subnet, NAT gateway and firewall group (`created_for_cluster` tells which a cluster delete may remove), and the block storage volumes created for the cluster's PersistentVolumeClaims. Each part is read on its own, so one service being down hides only its part: `network_details` is false when the network rows carry IDs only, and `volumes` is null when the volumes couldn't be read. Load balancers the cluster's Services create carry `kubernetes_uid` as their owner. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/clusters/{cluster_id}/resources (getKubernetesClusterResources).", short_help="List a Kubernetes cluster's resources")
120
+ @handle_api_errors
121
+ def get_kubernetes_cluster_resources(
122
+ ctx: typer.Context,
123
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
124
+ ) -> None:
125
+ client = sdk(ctx)
126
+ result = client.kubernetes.get_kubernetes_cluster_resources(
127
+ cluster_id,
128
+ **compact(
129
+ workspace_id=workspace(ctx),
130
+ ),
131
+ )
132
+ emit(result)
133
+
134
+
135
+ @app.command('kubeconfig', help="Get a cluster's kubeconfig.\n\nReturns the cluster's kubeconfig, for `kubectl` and other Kubernetes tools. It carries a client certificate with administrator access to the cluster: store it like a password. Every call returns the same credential, and the API has no call to rotate or revoke it yet; deleting the cluster ends it. It needs write access because it administers workloads, and the answer is never cached. A cluster that is not `running` answers 409 `cluster_not_running`; one whose credential is still being prepared answers 409 `kubeconfig_pending` (retry shortly). Requires scope: kubernetes.write.\n\nAPI: POST /kubernetes/clusters/{cluster_id}/kubeconfig (getKubernetesKubeconfig).", short_help="Get a cluster's kubeconfig")
136
+ @handle_api_errors
137
+ def get_kubernetes_kubeconfig(
138
+ ctx: typer.Context,
139
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
140
+ ) -> None:
141
+ client = sdk(ctx)
142
+ result = client.kubernetes.get_kubernetes_kubeconfig(cluster_id, **compact(workspace_id=workspace(ctx)))
143
+ emit(result)
144
+
145
+
146
+ @node_pools_app.command('create', help="Add a node pool.\n\nAdds a node pool to a running cluster. Answers 202 with the operation. Billing is asked about the pool's worker SKU and the plan's VM limit for its `replicas` (or `autoscaling.max_replicas`) first; a refusal is 402 `billing_denied`. Other refusals: 409 `node_pool_name_taken`, `cluster_not_running` or `operation_in_progress`; 422 `node_pool_limit`, `replica_limit` or a SKU error. Requires scope: kubernetes.write.\n\nAPI: POST /kubernetes/clusters/{cluster_id}/node-pools (createKubernetesNodePool).", short_help='Add a node pool')
147
+ @handle_api_errors
148
+ def create_kubernetes_node_pool(
149
+ ctx: typer.Context,
150
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
151
+ name: str = typer.Option(..., '--name', show_default=False, help='Lowercase letters, digits and hyphens, starting with a letter; unique in the cluster.'),
152
+ sku_code: str = typer.Option(..., '--sku-code', show_default=False, help="The worker plan's SKU: the `code` of a cloud VM plan from listComputePlans (`vm_type=cloud`) at the cluster's site. Every worker in the pool, autoscaled ones included, gets this plan."),
153
+ replicas: Optional[int] = typer.Option(None, '--replicas', show_default=False, help='A fixed worker count.'),
154
+ autoscaling: Optional[str] = typer.Option(None, '--autoscaling', metavar='JSON', show_default=False, help="The bounds the cluster autoscaler keeps the pool's worker count within. While a pool autoscales, the autoscaler owns its count. JSON (@FILE reads a file, @- stdin)."),
155
+ idempotency_key: Optional[str] = typer.Option(None, '--idempotency-key', show_default=False, help='A unique key for this change. Retry with the same key and body to get the same operation back; the same key with a different body answers 409 `idempotency_key_reused`. `X-Idempotency-Key` is accepted too.'),
156
+ ) -> None:
157
+ client = sdk(ctx)
158
+ result = client.kubernetes.create_kubernetes_node_pool(
159
+ cluster_id,
160
+ **compact(
161
+ workspace_id=workspace(ctx),
162
+ name=name,
163
+ sku_code=sku_code,
164
+ replicas=replicas,
165
+ autoscaling=json_arg(autoscaling, '--autoscaling'),
166
+ idempotency_key=idempotency_key,
167
+ ),
168
+ )
169
+ emit(result)
170
+
171
+
172
+ @node_pools_app.command('resize', help="Resize a node pool.\n\nSets a pool's size: a fixed `replicas` count (which also turns autoscaling off) or new `autoscaling` bounds. Answers 202 with the operation. Only the nodes a larger size adds are put to Billing; a refusal is 402 `billing_denied`. The same size answers 409 `replicas_unchanged` or `autoscaling_unchanged`; a pool that is not ready answers 409 `node_pool_not_ready`. Requires scope: kubernetes.write.\n\nAPI: PATCH /kubernetes/clusters/{cluster_id}/node-pools/{node_pool_id} (updateKubernetesNodePool).", short_help='Resize a node pool')
173
+ @handle_api_errors
174
+ def update_kubernetes_node_pool(
175
+ ctx: typer.Context,
176
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
177
+ node_pool_id: str = typer.Argument(..., metavar='NODE_POOL_ID', show_default=False, help="The node pool's ID."),
178
+ replicas: Optional[int] = typer.Option(None, '--replicas', show_default=False, help='A fixed worker count.'),
179
+ autoscaling: Optional[str] = typer.Option(None, '--autoscaling', metavar='JSON', show_default=False, help="The bounds the cluster autoscaler keeps the pool's worker count within. While a pool autoscales, the autoscaler owns its count. JSON (@FILE reads a file, @- stdin)."),
180
+ idempotency_key: Optional[str] = typer.Option(None, '--idempotency-key', show_default=False, help='A unique key for this change. Retry with the same key and body to get the same operation back; the same key with a different body answers 409 `idempotency_key_reused`. `X-Idempotency-Key` is accepted too.'),
181
+ ) -> None:
182
+ client = sdk(ctx)
183
+ result = client.kubernetes.update_kubernetes_node_pool(
184
+ cluster_id,
185
+ node_pool_id,
186
+ **compact(
187
+ workspace_id=workspace(ctx),
188
+ replicas=replicas,
189
+ autoscaling=json_arg(autoscaling, '--autoscaling'),
190
+ idempotency_key=idempotency_key,
191
+ ),
192
+ )
193
+ emit(result)
194
+
195
+
196
+ @node_pools_app.command('delete', help='Delete a node pool.\n\nDeletes the pool and its worker nodes. Answers 202 with the operation and a `deletion` object; the pool disappears from the cluster when the operation succeeds. Requires scope: kubernetes.write.\n\nAPI: DELETE /kubernetes/clusters/{cluster_id}/node-pools/{node_pool_id} (deleteKubernetesNodePool).', short_help='Delete a node pool')
197
+ @handle_api_errors
198
+ def delete_kubernetes_node_pool(
199
+ ctx: typer.Context,
200
+ cluster_id: str = typer.Argument(..., metavar='CLUSTER_ID', show_default=False, help="The cluster's ID."),
201
+ node_pool_id: str = typer.Argument(..., metavar='NODE_POOL_ID', show_default=False, help="The node pool's ID."),
202
+ idempotency_key: Optional[str] = typer.Option(None, '--idempotency-key', show_default=False, help='A unique key for this change. Retry with the same key and body to get the same operation back; the same key with a different body answers 409 `idempotency_key_reused`. `X-Idempotency-Key` is accepted too.'),
203
+ yes: bool = typer.Option(False, '--yes', '-y', help='Do not ask for confirmation.'),
204
+ ) -> None:
205
+ confirm(ctx, yes, f'Delete a node pool {cluster_id}, {node_pool_id}?')
206
+ client = sdk(ctx)
207
+ result = client.kubernetes.delete_kubernetes_node_pool(
208
+ cluster_id,
209
+ node_pool_id,
210
+ **compact(
211
+ workspace_id=workspace(ctx),
212
+ idempotency_key=idempotency_key,
213
+ ),
214
+ )
215
+ emit(result)
216
+
217
+
218
+ @app.command('operation', help='Get a Kubernetes operation.\n\nReturns one cluster or node pool operation: its `state`, the `phase` it is in, and why it waits or failed. Read it every few seconds until `state` is `succeeded`, `failed` or `cancelled`. Requires scope: kubernetes.read.\n\nAPI: GET /kubernetes/operations/{operation_id} (getKubernetesOperation).', short_help='Get a Kubernetes operation')
219
+ @handle_api_errors
220
+ def get_kubernetes_operation(
221
+ ctx: typer.Context,
222
+ operation_id: str = typer.Argument(..., metavar='OPERATION_ID', show_default=False, help="The operation's ID."),
223
+ ) -> None:
224
+ client = sdk(ctx)
225
+ result = client.kubernetes.get_kubernetes_operation(operation_id, **compact(workspace_id=workspace(ctx)))
226
+ emit(result)
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee load-balancers``: Regional load balancers (one command per contract operation)."""
4
4
 
@@ -44,7 +44,7 @@ def list_load_balancers(
44
44
  emit(result, collection='items', id_field='id')
45
45
 
46
46
 
47
- @app.command('create', help='Create a load balancer.\n\nCreates a load balancer from a full specification. Answers 202 with an operation to read with getLoadBalancerOperation. Targets are checked before anything is reserved: a VM the region cannot reach (for example one without a public IP), or a private target in a region whose `capabilities.private_targets` is false (see listLoadBalancerRegions), answers 422 `target_not_usable`. Billed per node-hour; a Billing refusal is 402 `billing_denied` with `billing_reason`. Requires scope: load-balancer.write.\n\nAPI: POST /networking/load-balancers (createLoadBalancer).', short_help='Create a load balancer')
47
+ @app.command('create', help='Create a load balancer.\n\nCreates a load balancer from a full specification. Answers 202 with an operation to read with getLoadBalancerOperation. Targets are checked before anything is reserved: a VM the region cannot reach (for example one without a public IP), a private IP target without a VPC, or a private target in a region whose `capabilities.private_targets` is false (see listLoadBalancerRegions), answers 422 `target_not_usable`; a VM listed by ID and again by its IP on the same port answers 422 `duplicate_target`. Billed per node-hour; a Billing refusal is 402 `billing_denied` with `billing_reason`. Requires scope: load-balancer.write.\n\nAPI: POST /networking/load-balancers (createLoadBalancer).', short_help='Create a load balancer')
48
48
  @handle_api_errors
49
49
  def create_load_balancer(
50
50
  ctx: typer.Context,
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.18.0).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee ops``: Async compute operations of cloud and GPU VMs (one command per contract operation)."""
4
4