gcore 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +2 -1
- gcore/_base_client.py +22 -0
- gcore/_client.py +9 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +31 -28
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +7 -12
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +31 -20
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +9 -10
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +8 -4
- gcore/resources/cloud/inference/deployments/deployments.py +10 -2
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +47 -32
- gcore/resources/cloud/instances/interfaces.py +2 -2
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -2
- gcore/resources/cloud/load_balancers/listeners.py +17 -8
- gcore/resources/cloud/load_balancers/load_balancers.py +73 -21
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +6 -2
- gcore/resources/cloud/networks/networks.py +81 -17
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +51 -11
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -16
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +21 -22
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +20 -20
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/tasks.py +4 -4
- gcore/resources/cloud/users/role_assignments.py +12 -14
- gcore/resources/cloud/volumes.py +139 -49
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +0 -14
- gcore/resources/waap/waap.py +0 -32
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +4 -8
- gcore/types/cloud/baremetal/server_list_params.py +1 -5
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_list_params.py +1 -5
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +2 -3
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +2 -4
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/instance_create_params.py +7 -8
- gcore/types/cloud/instance_list_params.py +1 -5
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/load_balancer_create_params.py +8 -4
- gcore/types/cloud/load_balancer_list_params.py +1 -5
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +6 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +6 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +6 -1
- gcore/types/cloud/member.py +6 -1
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_list_params.py +4 -5
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +2 -3
- gcore/types/cloud/networks/subnet_list_params.py +1 -5
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/reserved_fixed_ip_list_params.py +2 -2
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/volume_list_params.py +1 -5
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +0 -1
- gcore/types/waap/domains/custom_rule_create_params.py +7 -3
- gcore/types/waap/domains/custom_rule_update_params.py +7 -3
- gcore/types/waap/waap_custom_rule.py +7 -3
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/RECORD +115 -101
- gcore/resources/waap/clients.py +0 -135
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -59
- gcore/types/waap/client_me_response.py +0 -34
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -78,7 +78,9 @@ class MembersResource(SyncAPIResource):
|
|
|
78
78
|
|
|
79
79
|
protocol_port: Member IP port
|
|
80
80
|
|
|
81
|
-
admin_state_up:
|
|
81
|
+
admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
|
|
82
|
+
and operational. When set to false, the resource is disabled and will not
|
|
83
|
+
process traffic. When null is passed, the value is skipped and defaults to true.
|
|
82
84
|
|
|
83
85
|
instance_id: Either `subnet_id` or `instance_id` should be provided
|
|
84
86
|
|
|
@@ -233,7 +235,9 @@ class AsyncMembersResource(AsyncAPIResource):
|
|
|
233
235
|
|
|
234
236
|
protocol_port: Member IP port
|
|
235
237
|
|
|
236
|
-
admin_state_up:
|
|
238
|
+
admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
|
|
239
|
+
and operational. When set to false, the resource is disabled and will not
|
|
240
|
+
process traffic. When null is passed, the value is skipped and defaults to true.
|
|
237
241
|
|
|
238
242
|
instance_id: Either `subnet_id` or `instance_id` should be provided
|
|
239
243
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -78,7 +78,7 @@ class NetworksResource(SyncAPIResource):
|
|
|
78
78
|
region_id: int | None = None,
|
|
79
79
|
name: str,
|
|
80
80
|
create_router: bool | NotGiven = NOT_GIVEN,
|
|
81
|
-
tags:
|
|
81
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
82
82
|
type: Literal["vlan", "vxlan"] | NotGiven = NOT_GIVEN,
|
|
83
83
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
84
84
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -142,7 +142,8 @@ class NetworksResource(SyncAPIResource):
|
|
|
142
142
|
*,
|
|
143
143
|
project_id: int | None = None,
|
|
144
144
|
region_id: int | None = None,
|
|
145
|
-
name: str,
|
|
145
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
146
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
146
147
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
147
148
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
148
149
|
extra_headers: Headers | None = None,
|
|
@@ -150,8 +151,11 @@ class NetworksResource(SyncAPIResource):
|
|
|
150
151
|
extra_body: Body | None = None,
|
|
151
152
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
152
153
|
) -> Network:
|
|
153
|
-
"""
|
|
154
|
-
|
|
154
|
+
"""Rename network and/or update network tags.
|
|
155
|
+
|
|
156
|
+
The request will only process the
|
|
157
|
+
fields that are provided in the request body. Any fields that are not included
|
|
158
|
+
will remain unchanged.
|
|
155
159
|
|
|
156
160
|
Args:
|
|
157
161
|
project_id: Project ID
|
|
@@ -162,6 +166,26 @@ class NetworksResource(SyncAPIResource):
|
|
|
162
166
|
|
|
163
167
|
name: Name.
|
|
164
168
|
|
|
169
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
170
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
171
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
172
|
+
cannot be modified. **Examples:**
|
|
173
|
+
|
|
174
|
+
- **Add/update tags:**
|
|
175
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
176
|
+
updates existing ones.
|
|
177
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
178
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
179
|
+
tags are preserved).
|
|
180
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
181
|
+
specified tags.
|
|
182
|
+
- **Mixed operations:**
|
|
183
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
184
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
185
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
186
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
187
|
+
ones in the same request.
|
|
188
|
+
|
|
165
189
|
extra_headers: Send extra headers
|
|
166
190
|
|
|
167
191
|
extra_query: Add additional query parameters to the request
|
|
@@ -178,7 +202,13 @@ class NetworksResource(SyncAPIResource):
|
|
|
178
202
|
raise ValueError(f"Expected a non-empty value for `network_id` but received {network_id!r}")
|
|
179
203
|
return self._patch(
|
|
180
204
|
f"/cloud/v1/networks/{project_id}/{region_id}/{network_id}",
|
|
181
|
-
body=maybe_transform(
|
|
205
|
+
body=maybe_transform(
|
|
206
|
+
{
|
|
207
|
+
"name": name,
|
|
208
|
+
"tags": tags,
|
|
209
|
+
},
|
|
210
|
+
network_update_params.NetworkUpdateParams,
|
|
211
|
+
),
|
|
182
212
|
options=make_request_options(
|
|
183
213
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
184
214
|
),
|
|
@@ -191,6 +221,7 @@ class NetworksResource(SyncAPIResource):
|
|
|
191
221
|
project_id: int | None = None,
|
|
192
222
|
region_id: int | None = None,
|
|
193
223
|
limit: int | NotGiven = NOT_GIVEN,
|
|
224
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
194
225
|
offset: int | NotGiven = NOT_GIVEN,
|
|
195
226
|
order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | NotGiven = NOT_GIVEN,
|
|
196
227
|
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
@@ -212,6 +243,8 @@ class NetworksResource(SyncAPIResource):
|
|
|
212
243
|
|
|
213
244
|
limit: Optional. Limit the number of returned items
|
|
214
245
|
|
|
246
|
+
name: Filter networks by name
|
|
247
|
+
|
|
215
248
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
216
249
|
result
|
|
217
250
|
|
|
@@ -220,9 +253,7 @@ class NetworksResource(SyncAPIResource):
|
|
|
220
253
|
|
|
221
254
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
222
255
|
|
|
223
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
224
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
225
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
256
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
226
257
|
|
|
227
258
|
extra_headers: Send extra headers
|
|
228
259
|
|
|
@@ -247,6 +278,7 @@ class NetworksResource(SyncAPIResource):
|
|
|
247
278
|
query=maybe_transform(
|
|
248
279
|
{
|
|
249
280
|
"limit": limit,
|
|
281
|
+
"name": name,
|
|
250
282
|
"offset": offset,
|
|
251
283
|
"order_by": order_by,
|
|
252
284
|
"tag_key": tag_key,
|
|
@@ -384,7 +416,7 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
384
416
|
region_id: int | None = None,
|
|
385
417
|
name: str,
|
|
386
418
|
create_router: bool | NotGiven = NOT_GIVEN,
|
|
387
|
-
tags:
|
|
419
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
388
420
|
type: Literal["vlan", "vxlan"] | NotGiven = NOT_GIVEN,
|
|
389
421
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
390
422
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -448,7 +480,8 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
448
480
|
*,
|
|
449
481
|
project_id: int | None = None,
|
|
450
482
|
region_id: int | None = None,
|
|
451
|
-
name: str,
|
|
483
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
484
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
452
485
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
453
486
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
454
487
|
extra_headers: Headers | None = None,
|
|
@@ -456,8 +489,11 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
456
489
|
extra_body: Body | None = None,
|
|
457
490
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
458
491
|
) -> Network:
|
|
459
|
-
"""
|
|
460
|
-
|
|
492
|
+
"""Rename network and/or update network tags.
|
|
493
|
+
|
|
494
|
+
The request will only process the
|
|
495
|
+
fields that are provided in the request body. Any fields that are not included
|
|
496
|
+
will remain unchanged.
|
|
461
497
|
|
|
462
498
|
Args:
|
|
463
499
|
project_id: Project ID
|
|
@@ -468,6 +504,26 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
468
504
|
|
|
469
505
|
name: Name.
|
|
470
506
|
|
|
507
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
508
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
509
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
510
|
+
cannot be modified. **Examples:**
|
|
511
|
+
|
|
512
|
+
- **Add/update tags:**
|
|
513
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
514
|
+
updates existing ones.
|
|
515
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
516
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
517
|
+
tags are preserved).
|
|
518
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
519
|
+
specified tags.
|
|
520
|
+
- **Mixed operations:**
|
|
521
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
522
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
523
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
524
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
525
|
+
ones in the same request.
|
|
526
|
+
|
|
471
527
|
extra_headers: Send extra headers
|
|
472
528
|
|
|
473
529
|
extra_query: Add additional query parameters to the request
|
|
@@ -484,7 +540,13 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
484
540
|
raise ValueError(f"Expected a non-empty value for `network_id` but received {network_id!r}")
|
|
485
541
|
return await self._patch(
|
|
486
542
|
f"/cloud/v1/networks/{project_id}/{region_id}/{network_id}",
|
|
487
|
-
body=await async_maybe_transform(
|
|
543
|
+
body=await async_maybe_transform(
|
|
544
|
+
{
|
|
545
|
+
"name": name,
|
|
546
|
+
"tags": tags,
|
|
547
|
+
},
|
|
548
|
+
network_update_params.NetworkUpdateParams,
|
|
549
|
+
),
|
|
488
550
|
options=make_request_options(
|
|
489
551
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
490
552
|
),
|
|
@@ -497,6 +559,7 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
497
559
|
project_id: int | None = None,
|
|
498
560
|
region_id: int | None = None,
|
|
499
561
|
limit: int | NotGiven = NOT_GIVEN,
|
|
562
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
500
563
|
offset: int | NotGiven = NOT_GIVEN,
|
|
501
564
|
order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | NotGiven = NOT_GIVEN,
|
|
502
565
|
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
@@ -518,6 +581,8 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
518
581
|
|
|
519
582
|
limit: Optional. Limit the number of returned items
|
|
520
583
|
|
|
584
|
+
name: Filter networks by name
|
|
585
|
+
|
|
521
586
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
522
587
|
result
|
|
523
588
|
|
|
@@ -526,9 +591,7 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
526
591
|
|
|
527
592
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
528
593
|
|
|
529
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
530
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
531
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
594
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
532
595
|
|
|
533
596
|
extra_headers: Send extra headers
|
|
534
597
|
|
|
@@ -553,6 +616,7 @@ class AsyncNetworksResource(AsyncAPIResource):
|
|
|
553
616
|
query=maybe_transform(
|
|
554
617
|
{
|
|
555
618
|
"limit": limit,
|
|
619
|
+
"name": name,
|
|
556
620
|
"offset": offset,
|
|
557
621
|
"order_by": order_by,
|
|
558
622
|
"tag_key": tag_key,
|
|
@@ -68,7 +68,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
68
68
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
69
69
|
) -> TaskIDList:
|
|
70
70
|
"""
|
|
71
|
-
Create router
|
|
71
|
+
Create a new router with the specified configuration.
|
|
72
72
|
|
|
73
73
|
Args:
|
|
74
74
|
name: name of router
|
|
@@ -125,7 +125,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
125
125
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
126
126
|
) -> Router:
|
|
127
127
|
"""
|
|
128
|
-
Update router
|
|
128
|
+
Update the configuration of an existing router.
|
|
129
129
|
|
|
130
130
|
Args:
|
|
131
131
|
external_gateway_info: New external gateway.
|
|
@@ -179,12 +179,12 @@ class RoutersResource(SyncAPIResource):
|
|
|
179
179
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
180
180
|
) -> SyncOffsetPage[Router]:
|
|
181
181
|
"""
|
|
182
|
-
List routers
|
|
182
|
+
List all routers in the specified project and region.
|
|
183
183
|
|
|
184
184
|
Args:
|
|
185
|
-
limit: Limit the number of returned
|
|
185
|
+
limit: Limit the number of returned routers
|
|
186
186
|
|
|
187
|
-
offset: Offset value is used to exclude the first set of records from the result
|
|
187
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
188
188
|
|
|
189
189
|
extra_headers: Send extra headers
|
|
190
190
|
|
|
@@ -231,7 +231,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
231
231
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
232
232
|
) -> TaskIDList:
|
|
233
233
|
"""
|
|
234
|
-
Delete router
|
|
234
|
+
Delete a specific router and all its associated resources.
|
|
235
235
|
|
|
236
236
|
Args:
|
|
237
237
|
extra_headers: Send extra headers
|
|
@@ -272,7 +272,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
272
272
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
273
273
|
) -> Router:
|
|
274
274
|
"""
|
|
275
|
-
Attach subnet to router
|
|
275
|
+
Attach a subnet to an existing router.
|
|
276
276
|
|
|
277
277
|
Args:
|
|
278
278
|
project_id: Project ID
|
|
@@ -330,7 +330,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
330
330
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
331
331
|
) -> Router:
|
|
332
332
|
"""
|
|
333
|
-
Detach subnet from router
|
|
333
|
+
Detach a subnet from an existing router.
|
|
334
334
|
|
|
335
335
|
Args:
|
|
336
336
|
subnet_id: Target IP is identified by it's subnet
|
|
@@ -372,7 +372,7 @@ class RoutersResource(SyncAPIResource):
|
|
|
372
372
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
373
373
|
) -> Router:
|
|
374
374
|
"""
|
|
375
|
-
Get specific router
|
|
375
|
+
Get detailed information about a specific router.
|
|
376
376
|
|
|
377
377
|
Args:
|
|
378
378
|
extra_headers: Send extra headers
|
|
@@ -435,7 +435,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
435
435
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
436
436
|
) -> TaskIDList:
|
|
437
437
|
"""
|
|
438
|
-
Create router
|
|
438
|
+
Create a new router with the specified configuration.
|
|
439
439
|
|
|
440
440
|
Args:
|
|
441
441
|
name: name of router
|
|
@@ -492,7 +492,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
492
492
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
493
493
|
) -> Router:
|
|
494
494
|
"""
|
|
495
|
-
Update router
|
|
495
|
+
Update the configuration of an existing router.
|
|
496
496
|
|
|
497
497
|
Args:
|
|
498
498
|
external_gateway_info: New external gateway.
|
|
@@ -546,12 +546,12 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
546
546
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
547
547
|
) -> AsyncPaginator[Router, AsyncOffsetPage[Router]]:
|
|
548
548
|
"""
|
|
549
|
-
List routers
|
|
549
|
+
List all routers in the specified project and region.
|
|
550
550
|
|
|
551
551
|
Args:
|
|
552
|
-
limit: Limit the number of returned
|
|
552
|
+
limit: Limit the number of returned routers
|
|
553
553
|
|
|
554
|
-
offset: Offset value is used to exclude the first set of records from the result
|
|
554
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
555
555
|
|
|
556
556
|
extra_headers: Send extra headers
|
|
557
557
|
|
|
@@ -598,7 +598,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
598
598
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
599
599
|
) -> TaskIDList:
|
|
600
600
|
"""
|
|
601
|
-
Delete router
|
|
601
|
+
Delete a specific router and all its associated resources.
|
|
602
602
|
|
|
603
603
|
Args:
|
|
604
604
|
extra_headers: Send extra headers
|
|
@@ -639,7 +639,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
639
639
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
640
640
|
) -> Router:
|
|
641
641
|
"""
|
|
642
|
-
Attach subnet to router
|
|
642
|
+
Attach a subnet to an existing router.
|
|
643
643
|
|
|
644
644
|
Args:
|
|
645
645
|
project_id: Project ID
|
|
@@ -697,7 +697,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
697
697
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
698
698
|
) -> Router:
|
|
699
699
|
"""
|
|
700
|
-
Detach subnet from router
|
|
700
|
+
Detach a subnet from an existing router.
|
|
701
701
|
|
|
702
702
|
Args:
|
|
703
703
|
subnet_id: Target IP is identified by it's subnet
|
|
@@ -741,7 +741,7 @@ class AsyncRoutersResource(AsyncAPIResource):
|
|
|
741
741
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
742
742
|
) -> Router:
|
|
743
743
|
"""
|
|
744
|
-
Get specific router
|
|
744
|
+
Get detailed information about a specific router.
|
|
745
745
|
|
|
746
746
|
Args:
|
|
747
747
|
extra_headers: Send extra headers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Iterable, Optional
|
|
5
|
+
from typing import Dict, List, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -64,7 +64,7 @@ class SubnetsResource(SyncAPIResource):
|
|
|
64
64
|
host_routes: Optional[Iterable[subnet_create_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
65
65
|
ip_version: IPVersion | NotGiven = NOT_GIVEN,
|
|
66
66
|
router_id_to_connect: Optional[str] | NotGiven = NOT_GIVEN,
|
|
67
|
-
tags:
|
|
67
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
68
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
69
69
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
70
70
|
extra_headers: Headers | None = None,
|
|
@@ -159,6 +159,7 @@ class SubnetsResource(SyncAPIResource):
|
|
|
159
159
|
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
160
160
|
host_routes: Optional[Iterable[subnet_update_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
161
161
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
162
163
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
163
164
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
164
165
|
extra_headers: Headers | None = None,
|
|
@@ -167,7 +168,7 @@ class SubnetsResource(SyncAPIResource):
|
|
|
167
168
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
168
169
|
) -> Subnet:
|
|
169
170
|
"""
|
|
170
|
-
|
|
171
|
+
Update subnet
|
|
171
172
|
|
|
172
173
|
Args:
|
|
173
174
|
project_id: Project ID
|
|
@@ -189,6 +190,26 @@ class SubnetsResource(SyncAPIResource):
|
|
|
189
190
|
|
|
190
191
|
name: Name
|
|
191
192
|
|
|
193
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
194
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
195
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
196
|
+
cannot be modified. **Examples:**
|
|
197
|
+
|
|
198
|
+
- **Add/update tags:**
|
|
199
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
200
|
+
updates existing ones.
|
|
201
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
202
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
203
|
+
tags are preserved).
|
|
204
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
205
|
+
specified tags.
|
|
206
|
+
- **Mixed operations:**
|
|
207
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
208
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
209
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
210
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
211
|
+
ones in the same request.
|
|
212
|
+
|
|
192
213
|
extra_headers: Send extra headers
|
|
193
214
|
|
|
194
215
|
extra_query: Add additional query parameters to the request
|
|
@@ -212,6 +233,7 @@ class SubnetsResource(SyncAPIResource):
|
|
|
212
233
|
"gateway_ip": gateway_ip,
|
|
213
234
|
"host_routes": host_routes,
|
|
214
235
|
"name": name,
|
|
236
|
+
"tags": tags,
|
|
215
237
|
},
|
|
216
238
|
subnet_update_params.SubnetUpdateParams,
|
|
217
239
|
),
|
|
@@ -274,9 +296,7 @@ class SubnetsResource(SyncAPIResource):
|
|
|
274
296
|
|
|
275
297
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
276
298
|
|
|
277
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
278
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
279
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
299
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
280
300
|
|
|
281
301
|
extra_headers: Send extra headers
|
|
282
302
|
|
|
@@ -440,7 +460,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
440
460
|
host_routes: Optional[Iterable[subnet_create_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
441
461
|
ip_version: IPVersion | NotGiven = NOT_GIVEN,
|
|
442
462
|
router_id_to_connect: Optional[str] | NotGiven = NOT_GIVEN,
|
|
443
|
-
tags:
|
|
463
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
444
464
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
445
465
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
446
466
|
extra_headers: Headers | None = None,
|
|
@@ -535,6 +555,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
535
555
|
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
536
556
|
host_routes: Optional[Iterable[subnet_update_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
537
557
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
558
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
538
559
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
539
560
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
540
561
|
extra_headers: Headers | None = None,
|
|
@@ -543,7 +564,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
543
564
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
544
565
|
) -> Subnet:
|
|
545
566
|
"""
|
|
546
|
-
|
|
567
|
+
Update subnet
|
|
547
568
|
|
|
548
569
|
Args:
|
|
549
570
|
project_id: Project ID
|
|
@@ -565,6 +586,26 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
565
586
|
|
|
566
587
|
name: Name
|
|
567
588
|
|
|
589
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
590
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
591
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
592
|
+
cannot be modified. **Examples:**
|
|
593
|
+
|
|
594
|
+
- **Add/update tags:**
|
|
595
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
596
|
+
updates existing ones.
|
|
597
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
598
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
599
|
+
tags are preserved).
|
|
600
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
601
|
+
specified tags.
|
|
602
|
+
- **Mixed operations:**
|
|
603
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
604
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
605
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
606
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
607
|
+
ones in the same request.
|
|
608
|
+
|
|
568
609
|
extra_headers: Send extra headers
|
|
569
610
|
|
|
570
611
|
extra_query: Add additional query parameters to the request
|
|
@@ -588,6 +629,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
588
629
|
"gateway_ip": gateway_ip,
|
|
589
630
|
"host_routes": host_routes,
|
|
590
631
|
"name": name,
|
|
632
|
+
"tags": tags,
|
|
591
633
|
},
|
|
592
634
|
subnet_update_params.SubnetUpdateParams,
|
|
593
635
|
),
|
|
@@ -650,9 +692,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
|
|
|
650
692
|
|
|
651
693
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
652
694
|
|
|
653
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
654
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
655
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
695
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
656
696
|
|
|
657
697
|
extra_headers: Send extra headers
|
|
658
698
|
|
|
@@ -60,12 +60,13 @@ class ProjectsResource(SyncAPIResource):
|
|
|
60
60
|
extra_body: Body | None = None,
|
|
61
61
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
62
62
|
) -> Project:
|
|
63
|
-
"""Create project
|
|
63
|
+
"""Create a new project for a client.
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
Project management must be enabled to perform
|
|
66
|
+
this operation.
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Args:
|
|
69
|
+
name: Unique project name for a client. Each client always has one "default" project.
|
|
69
70
|
|
|
70
71
|
client_id: ID associated with the client.
|
|
71
72
|
|
|
@@ -114,8 +115,10 @@ class ProjectsResource(SyncAPIResource):
|
|
|
114
115
|
extra_body: Body | None = None,
|
|
115
116
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
116
117
|
) -> SyncOffsetPage[Project]:
|
|
117
|
-
"""
|
|
118
|
-
|
|
118
|
+
"""Retrieve a list of projects for a client.
|
|
119
|
+
|
|
120
|
+
Results can be filtered by name and
|
|
121
|
+
ordered by various fields.
|
|
119
122
|
|
|
120
123
|
Args:
|
|
121
124
|
client_id: Client ID filter for administrators.
|
|
@@ -172,9 +175,11 @@ class ProjectsResource(SyncAPIResource):
|
|
|
172
175
|
extra_body: Body | None = None,
|
|
173
176
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
174
177
|
) -> TaskIDList:
|
|
175
|
-
"""
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
"""Delete a project and all its associated cloud resources across all regions.
|
|
179
|
+
|
|
180
|
+
This
|
|
181
|
+
operation is irreversible and cannot be undone. Default projects cannot be
|
|
182
|
+
deleted.
|
|
178
183
|
|
|
179
184
|
Args:
|
|
180
185
|
extra_headers: Send extra headers
|
|
@@ -207,7 +212,7 @@ class ProjectsResource(SyncAPIResource):
|
|
|
207
212
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
208
213
|
) -> Project:
|
|
209
214
|
"""
|
|
210
|
-
|
|
215
|
+
Retrieve detailed information about a specific project.
|
|
211
216
|
|
|
212
217
|
Args:
|
|
213
218
|
extra_headers: Send extra headers
|
|
@@ -241,8 +246,10 @@ class ProjectsResource(SyncAPIResource):
|
|
|
241
246
|
extra_body: Body | None = None,
|
|
242
247
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
243
248
|
) -> Project:
|
|
244
|
-
"""
|
|
245
|
-
|
|
249
|
+
"""Update project name and description.
|
|
250
|
+
|
|
251
|
+
Project management must be enabled to
|
|
252
|
+
perform this operation.
|
|
246
253
|
|
|
247
254
|
Args:
|
|
248
255
|
name: Name of the entity, following a specific format.
|
|
@@ -309,12 +316,13 @@ class AsyncProjectsResource(AsyncAPIResource):
|
|
|
309
316
|
extra_body: Body | None = None,
|
|
310
317
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
311
318
|
) -> Project:
|
|
312
|
-
"""Create project
|
|
319
|
+
"""Create a new project for a client.
|
|
313
320
|
|
|
314
|
-
|
|
315
|
-
|
|
321
|
+
Project management must be enabled to perform
|
|
322
|
+
this operation.
|
|
316
323
|
|
|
317
|
-
|
|
324
|
+
Args:
|
|
325
|
+
name: Unique project name for a client. Each client always has one "default" project.
|
|
318
326
|
|
|
319
327
|
client_id: ID associated with the client.
|
|
320
328
|
|
|
@@ -363,8 +371,10 @@ class AsyncProjectsResource(AsyncAPIResource):
|
|
|
363
371
|
extra_body: Body | None = None,
|
|
364
372
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
365
373
|
) -> AsyncPaginator[Project, AsyncOffsetPage[Project]]:
|
|
366
|
-
"""
|
|
367
|
-
|
|
374
|
+
"""Retrieve a list of projects for a client.
|
|
375
|
+
|
|
376
|
+
Results can be filtered by name and
|
|
377
|
+
ordered by various fields.
|
|
368
378
|
|
|
369
379
|
Args:
|
|
370
380
|
client_id: Client ID filter for administrators.
|
|
@@ -421,9 +431,11 @@ class AsyncProjectsResource(AsyncAPIResource):
|
|
|
421
431
|
extra_body: Body | None = None,
|
|
422
432
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
423
433
|
) -> TaskIDList:
|
|
424
|
-
"""
|
|
425
|
-
|
|
426
|
-
|
|
434
|
+
"""Delete a project and all its associated cloud resources across all regions.
|
|
435
|
+
|
|
436
|
+
This
|
|
437
|
+
operation is irreversible and cannot be undone. Default projects cannot be
|
|
438
|
+
deleted.
|
|
427
439
|
|
|
428
440
|
Args:
|
|
429
441
|
extra_headers: Send extra headers
|
|
@@ -456,7 +468,7 @@ class AsyncProjectsResource(AsyncAPIResource):
|
|
|
456
468
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
457
469
|
) -> Project:
|
|
458
470
|
"""
|
|
459
|
-
|
|
471
|
+
Retrieve detailed information about a specific project.
|
|
460
472
|
|
|
461
473
|
Args:
|
|
462
474
|
extra_headers: Send extra headers
|
|
@@ -490,8 +502,10 @@ class AsyncProjectsResource(AsyncAPIResource):
|
|
|
490
502
|
extra_body: Body | None = None,
|
|
491
503
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
492
504
|
) -> Project:
|
|
493
|
-
"""
|
|
494
|
-
|
|
505
|
+
"""Update project name and description.
|
|
506
|
+
|
|
507
|
+
Project management must be enabled to
|
|
508
|
+
perform this operation.
|
|
495
509
|
|
|
496
510
|
Args:
|
|
497
511
|
name: Name of the entity, following a specific format.
|