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.

Files changed (120) hide show
  1. gcore/__init__.py +2 -1
  2. gcore/_base_client.py +22 -0
  3. gcore/_client.py +9 -0
  4. gcore/_version.py +1 -1
  5. gcore/pagination.py +61 -1
  6. gcore/resources/__init__.py +14 -0
  7. gcore/resources/cloud/baremetal/flavors.py +11 -137
  8. gcore/resources/cloud/baremetal/images.py +10 -12
  9. gcore/resources/cloud/baremetal/servers.py +31 -28
  10. gcore/resources/cloud/billing_reservations.py +2 -2
  11. gcore/resources/cloud/file_shares/file_shares.py +7 -8
  12. gcore/resources/cloud/floating_ips.py +7 -12
  13. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +31 -20
  14. gcore/resources/cloud/gpu_baremetal_clusters/images.py +9 -10
  15. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
  16. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +8 -4
  17. gcore/resources/cloud/inference/deployments/deployments.py +10 -2
  18. gcore/resources/cloud/inference/registry_credentials.py +2 -2
  19. gcore/resources/cloud/inference/secrets.py +8 -8
  20. gcore/resources/cloud/instances/flavors.py +9 -233
  21. gcore/resources/cloud/instances/images.py +47 -37
  22. gcore/resources/cloud/instances/instances.py +47 -32
  23. gcore/resources/cloud/instances/interfaces.py +2 -2
  24. gcore/resources/cloud/ip_ranges.py +34 -2
  25. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -2
  26. gcore/resources/cloud/load_balancers/listeners.py +17 -8
  27. gcore/resources/cloud/load_balancers/load_balancers.py +73 -21
  28. gcore/resources/cloud/load_balancers/metrics.py +2 -2
  29. gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
  30. gcore/resources/cloud/load_balancers/pools/members.py +6 -2
  31. gcore/resources/cloud/networks/networks.py +81 -17
  32. gcore/resources/cloud/networks/routers.py +18 -18
  33. gcore/resources/cloud/networks/subnets.py +51 -11
  34. gcore/resources/cloud/projects.py +38 -24
  35. gcore/resources/cloud/quotas/quotas.py +6 -6
  36. gcore/resources/cloud/quotas/requests.py +8 -8
  37. gcore/resources/cloud/registries/artifacts.py +4 -4
  38. gcore/resources/cloud/registries/registries.py +14 -16
  39. gcore/resources/cloud/registries/repositories.py +4 -4
  40. gcore/resources/cloud/registries/tags.py +2 -2
  41. gcore/resources/cloud/registries/users.py +21 -22
  42. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +20 -20
  43. gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
  44. gcore/resources/cloud/security_groups/rules.py +6 -6
  45. gcore/resources/cloud/security_groups/security_groups.py +70 -31
  46. gcore/resources/cloud/tasks.py +4 -4
  47. gcore/resources/cloud/users/role_assignments.py +12 -14
  48. gcore/resources/cloud/volumes.py +139 -49
  49. gcore/resources/iam/__init__.py +47 -0
  50. gcore/resources/iam/api_tokens.py +521 -0
  51. gcore/resources/iam/iam.py +199 -0
  52. gcore/resources/iam/users.py +642 -0
  53. gcore/resources/waap/__init__.py +0 -14
  54. gcore/resources/waap/waap.py +0 -32
  55. gcore/types/cloud/baremetal/__init__.py +0 -1
  56. gcore/types/cloud/baremetal/image_list_params.py +1 -5
  57. gcore/types/cloud/baremetal/server_create_params.py +4 -8
  58. gcore/types/cloud/baremetal/server_list_params.py +1 -5
  59. gcore/types/cloud/ddos_profile.py +9 -3
  60. gcore/types/cloud/file_share_create_params.py +3 -5
  61. gcore/types/cloud/floating_ip_create_params.py +2 -4
  62. gcore/types/cloud/floating_ip_list_params.py +1 -5
  63. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +2 -3
  64. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +2 -4
  65. gcore/types/cloud/health_monitor.py +6 -1
  66. gcore/types/cloud/instance_create_params.py +7 -8
  67. gcore/types/cloud/instance_list_params.py +1 -5
  68. gcore/types/cloud/instances/__init__.py +0 -2
  69. gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
  70. gcore/types/cloud/instances/image_list_params.py +1 -5
  71. gcore/types/cloud/instances/image_upload_params.py +2 -4
  72. gcore/types/cloud/load_balancer_create_params.py +8 -4
  73. gcore/types/cloud/load_balancer_list_params.py +1 -5
  74. gcore/types/cloud/load_balancer_update_params.py +24 -0
  75. gcore/types/cloud/load_balancers/pool_create_params.py +6 -1
  76. gcore/types/cloud/load_balancers/pool_update_params.py +6 -1
  77. gcore/types/cloud/load_balancers/pools/member_add_params.py +6 -1
  78. gcore/types/cloud/member.py +6 -1
  79. gcore/types/cloud/network_create_params.py +2 -3
  80. gcore/types/cloud/network_list_params.py +4 -5
  81. gcore/types/cloud/network_update_params.py +28 -2
  82. gcore/types/cloud/networks/router_list_params.py +2 -2
  83. gcore/types/cloud/networks/subnet_create_params.py +2 -3
  84. gcore/types/cloud/networks/subnet_list_params.py +1 -5
  85. gcore/types/cloud/networks/subnet_update_params.py +25 -0
  86. gcore/types/cloud/registries/__init__.py +1 -0
  87. gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
  88. gcore/types/cloud/reserved_fixed_ip_list_params.py +2 -2
  89. gcore/types/cloud/security_group_list_params.py +3 -7
  90. gcore/types/cloud/security_group_update_params.py +25 -0
  91. gcore/types/cloud/tag_update_map_param.py +2 -2
  92. gcore/types/cloud/volume_list_params.py +1 -5
  93. gcore/types/cloud/volume_update_params.py +29 -3
  94. gcore/types/iam/__init__.py +17 -0
  95. gcore/types/iam/account_overview.py +488 -0
  96. gcore/types/iam/api_token.py +78 -0
  97. gcore/types/iam/api_token_create.py +15 -0
  98. gcore/types/iam/api_token_create_params.py +42 -0
  99. gcore/types/iam/api_token_list.py +81 -0
  100. gcore/types/iam/api_token_list_params.py +41 -0
  101. gcore/types/iam/user.py +86 -0
  102. gcore/types/iam/user_detailed.py +104 -0
  103. gcore/types/iam/user_invite.py +15 -0
  104. gcore/types/iam/user_invite_params.py +37 -0
  105. gcore/types/iam/user_list_params.py +15 -0
  106. gcore/types/iam/user_update.py +104 -0
  107. gcore/types/iam/user_update_params.py +52 -0
  108. gcore/types/waap/__init__.py +0 -1
  109. gcore/types/waap/domains/custom_rule_create_params.py +7 -3
  110. gcore/types/waap/domains/custom_rule_update_params.py +7 -3
  111. gcore/types/waap/waap_custom_rule.py +7 -3
  112. {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
  113. {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/RECORD +115 -101
  114. gcore/resources/waap/clients.py +0 -135
  115. gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
  116. gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
  117. gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -59
  118. gcore/types/waap/client_me_response.py +0 -34
  119. {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
  120. {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ from .tag_update_map_param import TagUpdateMapParam
6
9
 
7
10
  __all__ = ["NetworkUpdateParams"]
8
11
 
@@ -14,5 +17,28 @@ class NetworkUpdateParams(TypedDict, total=False):
14
17
  region_id: int
15
18
  """Region ID"""
16
19
 
17
- name: Required[str]
20
+ name: str
18
21
  """Name."""
22
+
23
+ tags: Optional[TagUpdateMapParam]
24
+ """Update key-value tags using JSON Merge Patch semantics (RFC 7386).
25
+
26
+ Provide key-value pairs to add or update tags. Set tag values to `null` to
27
+ remove tags. Unspecified tags remain unchanged. Read-only tags are always
28
+ preserved and cannot be modified. **Examples:**
29
+
30
+ - **Add/update tags:**
31
+ `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
32
+ updates existing ones.
33
+ - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
34
+ - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
35
+ tags are preserved).
36
+ - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
37
+ specified tags.
38
+ - **Mixed operations:**
39
+ `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
40
+ adds/updates 'environment' and '`cost_center`' while removing
41
+ '`deprecated_tag`', preserving other existing tags.
42
+ - **Replace all:** first delete existing tags with null values, then add new
43
+ ones in the same request.
44
+ """
@@ -13,7 +13,7 @@ class RouterListParams(TypedDict, total=False):
13
13
  region_id: int
14
14
 
15
15
  limit: int
16
- """Limit the number of returned limit request entities."""
16
+ """Limit the number of returned routers"""
17
17
 
18
18
  offset: int
19
- """Offset value is used to exclude the first set of records from the result."""
19
+ """Offset value is used to exclude the first set of records from the result"""
@@ -2,11 +2,10 @@
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 Required, TypedDict
7
7
 
8
8
  from ..ip_version import IPVersion
9
- from ..tag_update_map_param import TagUpdateMapParam
10
9
 
11
10
  __all__ = ["SubnetCreateParams", "HostRoute"]
12
11
 
@@ -60,7 +59,7 @@ class SubnetCreateParams(TypedDict, total=False):
60
59
  find a router created during network creation.
61
60
  """
62
61
 
63
- tags: TagUpdateMapParam
62
+ tags: Dict[str, str]
64
63
  """Key-value tags to associate with the resource.
65
64
 
66
65
  A tag is a key-value pair that can be associated with a resource, enabling
@@ -51,8 +51,4 @@ class SubnetListParams(TypedDict, total=False):
51
51
  """Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2"""
52
52
 
53
53
  tag_key_value: str
54
- """Optional.
55
-
56
- Filter by tag key-value pairs. curl -G --data-urlencode "`tag_key_value`={"key":
57
- "value"}" --url "https://example.com/cloud/v1/resource/1/1"
58
- """
54
+ """Optional. Filter by tag key-value pairs."""
@@ -5,6 +5,8 @@ from __future__ import annotations
5
5
  from typing import List, Iterable, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
+ from ..tag_update_map_param import TagUpdateMapParam
9
+
8
10
  __all__ = ["SubnetUpdateParams", "HostRoute"]
9
11
 
10
12
 
@@ -35,6 +37,29 @@ class SubnetUpdateParams(TypedDict, total=False):
35
37
  name: Optional[str]
36
38
  """Name"""
37
39
 
40
+ tags: Optional[TagUpdateMapParam]
41
+ """Update key-value tags using JSON Merge Patch semantics (RFC 7386).
42
+
43
+ Provide key-value pairs to add or update tags. Set tag values to `null` to
44
+ remove tags. Unspecified tags remain unchanged. Read-only tags are always
45
+ preserved and cannot be modified. **Examples:**
46
+
47
+ - **Add/update tags:**
48
+ `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
49
+ updates existing ones.
50
+ - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
51
+ - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
52
+ tags are preserved).
53
+ - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
54
+ specified tags.
55
+ - **Mixed operations:**
56
+ `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
57
+ adds/updates 'environment' and '`cost_center`' while removing
58
+ '`deprecated_tag`', preserving other existing tags.
59
+ - **Replace all:** first delete existing tags with null values, then add new
60
+ ones in the same request.
61
+ """
62
+
38
63
 
39
64
  class HostRoute(TypedDict, total=False):
40
65
  destination: Required[str]
@@ -12,3 +12,4 @@ from .registry_user_created import RegistryUserCreated as RegistryUserCreated
12
12
  from .registry_artifact_list import RegistryArtifactList as RegistryArtifactList
13
13
  from .registry_repository_list import RegistryRepositoryList as RegistryRepositoryList
14
14
  from .user_create_multiple_params import UserCreateMultipleParams as UserCreateMultipleParams
15
+ from .user_refresh_secret_response import UserRefreshSecretResponse as UserRefreshSecretResponse
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from ...._models import BaseModel
7
+
8
+ __all__ = ["UserRefreshSecretResponse"]
9
+
10
+
11
+ class UserRefreshSecretResponse(BaseModel):
12
+ id: int
13
+ """User ID"""
14
+
15
+ created_at: datetime
16
+ """User creation date-time"""
17
+
18
+ duration: int
19
+ """User account operating time, days"""
20
+
21
+ expires_at: datetime
22
+ """User operation end date-time"""
23
+
24
+ name: str
25
+ """User name"""
26
+
27
+ read_only: Optional[bool] = None
28
+ """Read-only user"""
29
+
30
+ secret: Optional[str] = None
31
+ """User secret"""
@@ -39,8 +39,8 @@ class ReservedFixedIPListParams(TypedDict, total=False):
39
39
  order_by: str
40
40
  """
41
41
  Ordering reserved fixed IP list result by name, status, `updated_at`,
42
- `created_at` or `fixed_ip_address` fields of the reserved fixed IP and
43
- directions (status.asc), default is "`fixed_ip_address`.asc"
42
+ `created_at` or `fixed_ip_address` fields and directions (status.asc), default
43
+ is "`fixed_ip_address`.asc"
44
44
  """
45
45
 
46
46
  vip_only: bool
@@ -14,17 +14,13 @@ class SecurityGroupListParams(TypedDict, total=False):
14
14
  region_id: int
15
15
 
16
16
  limit: int
17
- """Limit the number of returned limit request entities."""
17
+ """Limit the number of returned security groups"""
18
18
 
19
19
  offset: int
20
- """Offset value is used to exclude the first set of records from the result."""
20
+ """Offset value is used to exclude the first set of records from the result"""
21
21
 
22
22
  tag_key: List[str]
23
23
  """Filter by tag keys."""
24
24
 
25
25
  tag_key_value: str
26
- """Filter by tag key-value pairs.
27
-
28
- Must be a valid JSON string. curl -G --data-urlencode "`tag_key_value`={"key":
29
- "value"}" --url "http://localhost:1111/v1/securitygroups/1/1"
30
- """
26
+ """Filter by tag key-value pairs. Must be a valid JSON string."""
@@ -5,6 +5,8 @@ from __future__ import annotations
5
5
  from typing import Iterable, Optional
6
6
  from typing_extensions import Literal, Required, TypedDict
7
7
 
8
+ from .tag_update_map_param import TagUpdateMapParam
9
+
8
10
  __all__ = ["SecurityGroupUpdateParams", "ChangedRule"]
9
11
 
10
12
 
@@ -19,6 +21,29 @@ class SecurityGroupUpdateParams(TypedDict, total=False):
19
21
  name: str
20
22
  """Name"""
21
23
 
24
+ tags: Optional[TagUpdateMapParam]
25
+ """Update key-value tags using JSON Merge Patch semantics (RFC 7386).
26
+
27
+ Provide key-value pairs to add or update tags. Set tag values to `null` to
28
+ remove tags. Unspecified tags remain unchanged. Read-only tags are always
29
+ preserved and cannot be modified. **Examples:**
30
+
31
+ - **Add/update tags:**
32
+ `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
33
+ updates existing ones.
34
+ - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
35
+ - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
36
+ tags are preserved).
37
+ - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
38
+ specified tags.
39
+ - **Mixed operations:**
40
+ `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
41
+ adds/updates 'environment' and '`cost_center`' while removing
42
+ '`deprecated_tag`', preserving other existing tags.
43
+ - **Replace all:** first delete existing tags with null values, then add new
44
+ ones in the same request.
45
+ """
46
+
22
47
 
23
48
  class ChangedRule(TypedDict, total=False):
24
49
  action: Required[Literal["create", "delete"]]
@@ -2,9 +2,9 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
  from typing_extensions import TypeAlias
7
7
 
8
8
  __all__ = ["TagUpdateMapParam"]
9
9
 
10
- TagUpdateMapParam: TypeAlias = Dict[str, str]
10
+ TagUpdateMapParam: TypeAlias = Dict[str, Optional[str]]
@@ -49,8 +49,4 @@ class VolumeListParams(TypedDict, total=False):
49
49
  """Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2"""
50
50
 
51
51
  tag_key_value: str
52
- """Optional.
53
-
54
- Filter by tag key-value pairs. curl -G --data-urlencode "`tag_key_value`={"key":
55
- "value"}" --url "https://example.com/cloud/v1/resource/1/1"
56
- """
52
+ """Optional. Filter by tag key-value pairs."""
@@ -2,7 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ from .tag_update_map_param import TagUpdateMapParam
6
9
 
7
10
  __all__ = ["VolumeUpdateParams"]
8
11
 
@@ -14,5 +17,28 @@ class VolumeUpdateParams(TypedDict, total=False):
14
17
  region_id: int
15
18
  """Region ID"""
16
19
 
17
- name: Required[str]
18
- """Name."""
20
+ name: str
21
+ """Name"""
22
+
23
+ tags: Optional[TagUpdateMapParam]
24
+ """Update key-value tags using JSON Merge Patch semantics (RFC 7386).
25
+
26
+ Provide key-value pairs to add or update tags. Set tag values to `null` to
27
+ remove tags. Unspecified tags remain unchanged. Read-only tags are always
28
+ preserved and cannot be modified. **Examples:**
29
+
30
+ - **Add/update tags:**
31
+ `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
32
+ updates existing ones.
33
+ - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
34
+ - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
35
+ tags are preserved).
36
+ - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
37
+ specified tags.
38
+ - **Mixed operations:**
39
+ `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
40
+ adds/updates 'environment' and '`cost_center`' while removing
41
+ '`deprecated_tag`', preserving other existing tags.
42
+ - **Replace all:** first delete existing tags with null values, then add new
43
+ ones in the same request.
44
+ """
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .user import User as User
6
+ from .api_token import APIToken as APIToken
7
+ from .user_invite import UserInvite as UserInvite
8
+ from .user_update import UserUpdate as UserUpdate
9
+ from .user_detailed import UserDetailed as UserDetailed
10
+ from .api_token_list import APITokenList as APITokenList
11
+ from .account_overview import AccountOverview as AccountOverview
12
+ from .api_token_create import APITokenCreate as APITokenCreate
13
+ from .user_list_params import UserListParams as UserListParams
14
+ from .user_invite_params import UserInviteParams as UserInviteParams
15
+ from .user_update_params import UserUpdateParams as UserUpdateParams
16
+ from .api_token_list_params import APITokenListParams as APITokenListParams
17
+ from .api_token_create_params import APITokenCreateParams as APITokenCreateParams