gcore 0.1.0a2__py3-none-any.whl → 0.2.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 (78) hide show
  1. gcore/__init__.py +5 -0
  2. gcore/_client.py +9 -0
  3. gcore/_utils/_proxy.py +4 -1
  4. gcore/_utils/_resources_proxy.py +24 -0
  5. gcore/_version.py +1 -1
  6. gcore/resources/__init__.py +14 -0
  7. gcore/resources/cloud/baremetal/servers.py +234 -0
  8. gcore/resources/cloud/billing_reservations.py +24 -0
  9. gcore/resources/cloud/file_shares/file_shares.py +16 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +352 -2
  11. gcore/resources/cloud/gpu_baremetal_clusters/images.py +204 -0
  12. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +80 -0
  13. gcore/resources/cloud/inference/deployments/deployments.py +322 -4
  14. gcore/resources/cloud/instances/images.py +316 -0
  15. gcore/resources/cloud/instances/instances.py +472 -0
  16. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +282 -0
  17. gcore/resources/cloud/load_balancers/l7_policies/rules.py +326 -0
  18. gcore/resources/cloud/load_balancers/listeners.py +371 -6
  19. gcore/resources/cloud/load_balancers/load_balancers.py +364 -0
  20. gcore/resources/cloud/load_balancers/pools/health_monitors.py +24 -0
  21. gcore/resources/cloud/load_balancers/pools/members.py +28 -0
  22. gcore/resources/cloud/load_balancers/pools/pools.py +388 -8
  23. gcore/resources/cloud/networks/networks.py +72 -16
  24. gcore/resources/cloud/secrets.py +56 -11
  25. gcore/resources/cloud/tasks.py +107 -96
  26. gcore/resources/waap/__init__.py +33 -0
  27. gcore/resources/waap/domains/__init__.py +33 -0
  28. gcore/resources/waap/domains/domains.py +515 -0
  29. gcore/resources/waap/domains/settings.py +271 -0
  30. gcore/resources/waap/waap.py +102 -0
  31. gcore/types/cloud/__init__.py +1 -0
  32. gcore/types/cloud/billing_reservation_list_params.py +5 -0
  33. gcore/types/cloud/container_probe_config_create_param.py +1 -2
  34. gcore/types/cloud/file_share.py +3 -0
  35. gcore/types/cloud/file_share_list_params.py +7 -1
  36. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +20 -0
  37. gcore/types/cloud/inference/deployment_update_params.py +203 -6
  38. gcore/types/cloud/inference/inference.py +3 -1
  39. gcore/types/cloud/load_balancer_listener_detail.py +13 -13
  40. gcore/types/cloud/load_balancer_pool.py +13 -13
  41. gcore/types/cloud/load_balancer_pool_list.py +99 -4
  42. gcore/types/cloud/load_balancers/listener_create_params.py +2 -0
  43. gcore/types/cloud/load_balancers/listener_get_params.py +3 -1
  44. gcore/types/cloud/load_balancers/listener_list_params.py +4 -2
  45. gcore/types/cloud/load_balancers/listener_update_params.py +2 -0
  46. gcore/types/cloud/load_balancers/pool_create_params.py +2 -0
  47. gcore/types/cloud/load_balancers/pool_list_params.py +5 -6
  48. gcore/types/cloud/load_balancers/pool_update_params.py +2 -0
  49. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +2 -0
  50. gcore/types/cloud/load_balancers/pools/member_add_params.py +2 -0
  51. gcore/types/cloud/network.py +21 -21
  52. gcore/types/cloud/network_create_params.py +2 -0
  53. gcore/types/cloud/network_details.py +24 -23
  54. gcore/types/cloud/network_list_params.py +15 -10
  55. gcore/types/cloud/network_update_params.py +2 -0
  56. gcore/types/cloud/quota_get_all_response.py +18 -0
  57. gcore/types/cloud/quota_get_by_region_response.py +18 -0
  58. gcore/types/cloud/quotas/request_create_params.py +9 -0
  59. gcore/types/cloud/quotas/request_get_response.py +9 -0
  60. gcore/types/cloud/quotas/request_list_response.py +9 -0
  61. gcore/types/cloud/secret_list_params.py +24 -0
  62. gcore/types/cloud/task.py +0 -3
  63. gcore/types/cloud/task_list_params.py +8 -2
  64. gcore/types/waap/__init__.py +12 -0
  65. gcore/types/waap/domain_list_params.py +30 -0
  66. gcore/types/waap/domain_update_params.py +12 -0
  67. gcore/types/waap/domains/__init__.py +5 -0
  68. gcore/types/waap/domains/setting_update_params.py +41 -0
  69. gcore/types/waap/waap_api_urls.py +15 -0
  70. gcore/types/waap/waap_detailed_domain.py +37 -0
  71. gcore/types/waap/waap_domain_ddos_settings.py +31 -0
  72. gcore/types/waap/waap_domain_settings.py +15 -0
  73. gcore/types/waap/waap_domain_status.py +7 -0
  74. gcore/types/waap/waap_summary_domain.py +26 -0
  75. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/METADATA +3 -3
  76. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/RECORD +78 -60
  77. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/WHEEL +0 -0
  78. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -11,8 +11,10 @@ __all__ = ["NetworkCreateParams"]
11
11
 
12
12
  class NetworkCreateParams(TypedDict, total=False):
13
13
  project_id: int
14
+ """Project ID"""
14
15
 
15
16
  region_id: int
17
+ """Region ID"""
16
18
 
17
19
  name: Required[str]
18
20
  """Network name"""
@@ -17,9 +17,18 @@ class NetworkDetails(BaseModel):
17
17
  created_at: datetime
18
18
  """Datetime when the network was created"""
19
19
 
20
+ creator_task_id: Optional[str] = None
21
+ """Task that created this entity"""
22
+
23
+ default: Optional[bool] = None
24
+ """True if network has is_default attribute"""
25
+
20
26
  external: bool
21
27
  """True if the network `router:external` attribute"""
22
28
 
29
+ mtu: int
30
+ """MTU (maximum transmission unit). Default value is 1450"""
31
+
23
32
  name: str
24
33
  """Network name"""
25
34
 
@@ -29,15 +38,24 @@ class NetworkDetails(BaseModel):
29
38
  ports.
30
39
  """
31
40
 
41
+ project_id: Optional[int] = None
42
+ """Project ID"""
43
+
32
44
  region: str
33
45
  """Region name"""
34
46
 
35
47
  region_id: int
36
48
  """Region ID"""
37
49
 
50
+ segmentation_id: Optional[int] = None
51
+ """Id of network segment"""
52
+
38
53
  shared: bool
39
54
  """True when the network is shared with your project by external owner"""
40
55
 
56
+ subnets: List[Subnet]
57
+ """List of subnets associated with the network"""
58
+
41
59
  tags: List[Tag]
42
60
  """List of key-value tags associated with the resource.
43
61
 
@@ -48,32 +66,15 @@ class NetworkDetails(BaseModel):
48
66
  values.
49
67
  """
50
68
 
51
- type: str
52
- """Network type (vlan, vxlan)"""
53
-
54
- updated_at: datetime
55
- """Datetime when the network was last updated"""
56
-
57
- creator_task_id: Optional[str] = None
58
- """Task that created this entity"""
59
-
60
- default: Optional[bool] = None
61
- """True if network has is_default attribute"""
62
-
63
- mtu: Optional[int] = None
64
- """MTU (maximum transmission unit). Default value is 1450"""
65
-
66
- project_id: Optional[int] = None
67
- """Project ID"""
68
-
69
- segmentation_id: Optional[int] = None
70
- """Id of network segment"""
71
-
72
- subnets: Optional[List[Subnet]] = None
73
-
74
69
  task_id: Optional[str] = None
75
70
  """The UUID of the active task that currently holds a lock on the resource.
76
71
 
77
72
  This lock prevents concurrent modifications to ensure consistency. If `null`,
78
73
  the resource is not locked.
79
74
  """
75
+
76
+ type: str
77
+ """Network type (vlan, vxlan)"""
78
+
79
+ updated_at: datetime
80
+ """Datetime when the network was last updated"""
@@ -3,34 +3,39 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List
6
- from typing_extensions import TypedDict
6
+ from typing_extensions import Literal, TypedDict
7
7
 
8
8
  __all__ = ["NetworkListParams"]
9
9
 
10
10
 
11
11
  class NetworkListParams(TypedDict, total=False):
12
12
  project_id: int
13
+ """Project ID"""
13
14
 
14
15
  region_id: int
16
+ """Region ID"""
15
17
 
16
18
  limit: int
17
- """Limit the number of returned limit request entities."""
19
+ """Optional. Limit the number of returned items"""
18
20
 
19
21
  offset: int
20
- """Offset value is used to exclude the first set of records from the result."""
22
+ """Optional.
21
23
 
22
- order_by: str
23
- """Order networks by fields and directions (name.asc).
24
+ Offset value is used to exclude the first set of records from the result
25
+ """
24
26
 
25
- Default is `created_at.asc`.
27
+ order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"]
28
+ """
29
+ Ordering networks list result by `name`, `created_at` fields of the network and
30
+ directions (`created_at.desc`).
26
31
  """
27
32
 
28
33
  tag_key: List[str]
29
- """Filter by tag keys."""
34
+ """Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2"""
30
35
 
31
36
  tag_key_value: str
32
- """Filter by tag key-value pairs.
37
+ """Optional.
33
38
 
34
- Must be a valid JSON string. curl -G --data-urlencode "tag_key_value={"key":
35
- "value"}" --url "http://localhost:1111/v1/networks/1/1"
39
+ Filter by tag key-value pairs. curl -G --data-urlencode "tag_key_value={"key":
40
+ "value"}" --url "https://example.com/cloud/v1/resource/1/1"
36
41
  """
@@ -9,8 +9,10 @@ __all__ = ["NetworkUpdateParams"]
9
9
 
10
10
  class NetworkUpdateParams(TypedDict, total=False):
11
11
  project_id: int
12
+ """Project ID"""
12
13
 
13
14
  region_id: int
15
+ """Region ID"""
14
16
 
15
17
  name: Required[str]
16
18
  """Name."""
@@ -58,12 +58,30 @@ class RegionalQuota(BaseModel):
58
58
  baremetal_basic_count_usage: Optional[int] = None
59
59
  """Basic bare metal servers count usage"""
60
60
 
61
+ baremetal_gpu_a100_count_limit: Optional[int] = None
62
+ """Baremetal A100 GPU card count limit"""
63
+
64
+ baremetal_gpu_a100_count_usage: Optional[int] = None
65
+ """Baremetal A100 GPU card count usage"""
66
+
61
67
  baremetal_gpu_count_limit: Optional[int] = None
62
68
  """AI GPU bare metal servers count limit"""
63
69
 
64
70
  baremetal_gpu_count_usage: Optional[int] = None
65
71
  """AI GPU bare metal servers count usage"""
66
72
 
73
+ baremetal_gpu_h100_count_limit: Optional[int] = None
74
+ """Baremetal H100 GPU card count limit"""
75
+
76
+ baremetal_gpu_h100_count_usage: Optional[int] = None
77
+ """Baremetal H100 GPU card count usage"""
78
+
79
+ baremetal_gpu_l40s_count_limit: Optional[int] = None
80
+ """Baremetal L40S GPU card count limit"""
81
+
82
+ baremetal_gpu_l40s_count_usage: Optional[int] = None
83
+ """Baremetal L40S GPU card count usage"""
84
+
67
85
  baremetal_hf_count_limit: Optional[int] = None
68
86
  """High-frequency bare metal servers count limit"""
69
87
 
@@ -14,12 +14,30 @@ class QuotaGetByRegionResponse(BaseModel):
14
14
  baremetal_basic_count_usage: Optional[int] = None
15
15
  """Basic bare metal servers count usage"""
16
16
 
17
+ baremetal_gpu_a100_count_limit: Optional[int] = None
18
+ """Baremetal A100 GPU card count limit"""
19
+
20
+ baremetal_gpu_a100_count_usage: Optional[int] = None
21
+ """Baremetal A100 GPU card count usage"""
22
+
17
23
  baremetal_gpu_count_limit: Optional[int] = None
18
24
  """AI GPU bare metal servers count limit"""
19
25
 
20
26
  baremetal_gpu_count_usage: Optional[int] = None
21
27
  """AI GPU bare metal servers count usage"""
22
28
 
29
+ baremetal_gpu_h100_count_limit: Optional[int] = None
30
+ """Baremetal H100 GPU card count limit"""
31
+
32
+ baremetal_gpu_h100_count_usage: Optional[int] = None
33
+ """Baremetal H100 GPU card count usage"""
34
+
35
+ baremetal_gpu_l40s_count_limit: Optional[int] = None
36
+ """Baremetal L40S GPU card count limit"""
37
+
38
+ baremetal_gpu_l40s_count_usage: Optional[int] = None
39
+ """Baremetal L40S GPU card count usage"""
40
+
23
41
  baremetal_hf_count_limit: Optional[int] = None
24
42
  """High-frequency bare metal servers count limit"""
25
43
 
@@ -46,9 +46,18 @@ class RequestedLimitsRegionalLimit(TypedDict, total=False):
46
46
  baremetal_basic_count_limit: int
47
47
  """Basic bare metal servers count limit"""
48
48
 
49
+ baremetal_gpu_a100_count_limit: int
50
+ """Baremetal A100 GPU card count limit"""
51
+
49
52
  baremetal_gpu_count_limit: int
50
53
  """AI GPU bare metal servers count limit"""
51
54
 
55
+ baremetal_gpu_h100_count_limit: int
56
+ """Baremetal H100 GPU card count limit"""
57
+
58
+ baremetal_gpu_l40s_count_limit: int
59
+ """Baremetal L40S GPU card count limit"""
60
+
52
61
  baremetal_hf_count_limit: int
53
62
  """High-frequency bare metal servers count limit"""
54
63
 
@@ -35,9 +35,18 @@ class RequestedLimitsRegionalLimit(BaseModel):
35
35
  baremetal_basic_count_limit: Optional[int] = None
36
36
  """Basic bare metal servers count limit"""
37
37
 
38
+ baremetal_gpu_a100_count_limit: Optional[int] = None
39
+ """Baremetal A100 GPU card count limit"""
40
+
38
41
  baremetal_gpu_count_limit: Optional[int] = None
39
42
  """AI GPU bare metal servers count limit"""
40
43
 
44
+ baremetal_gpu_h100_count_limit: Optional[int] = None
45
+ """Baremetal H100 GPU card count limit"""
46
+
47
+ baremetal_gpu_l40s_count_limit: Optional[int] = None
48
+ """Baremetal L40S GPU card count limit"""
49
+
41
50
  baremetal_hf_count_limit: Optional[int] = None
42
51
  """High-frequency bare metal servers count limit"""
43
52
 
@@ -35,9 +35,18 @@ class RequestedLimitsRegionalLimit(BaseModel):
35
35
  baremetal_basic_count_limit: Optional[int] = None
36
36
  """Basic bare metal servers count limit"""
37
37
 
38
+ baremetal_gpu_a100_count_limit: Optional[int] = None
39
+ """Baremetal A100 GPU card count limit"""
40
+
38
41
  baremetal_gpu_count_limit: Optional[int] = None
39
42
  """AI GPU bare metal servers count limit"""
40
43
 
44
+ baremetal_gpu_h100_count_limit: Optional[int] = None
45
+ """Baremetal H100 GPU card count limit"""
46
+
47
+ baremetal_gpu_l40s_count_limit: Optional[int] = None
48
+ """Baremetal L40S GPU card count limit"""
49
+
41
50
  baremetal_hf_count_limit: Optional[int] = None
42
51
  """High-frequency bare metal servers count limit"""
43
52
 
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["SecretListParams"]
8
+
9
+
10
+ class SecretListParams(TypedDict, total=False):
11
+ project_id: int
12
+ """Project ID"""
13
+
14
+ region_id: int
15
+ """Region ID"""
16
+
17
+ limit: int
18
+ """Optional. Limit the number of returned items"""
19
+
20
+ offset: int
21
+ """Optional.
22
+
23
+ Offset value is used to exclude the first set of records from the result
24
+ """
gcore/types/cloud/task.py CHANGED
@@ -36,9 +36,6 @@ class CreatedResources(BaseModel):
36
36
  healthmonitors: Optional[List[str]] = None
37
37
  """IDs of created health monitors"""
38
38
 
39
- heat: Optional[List[str]] = None
40
- """IDs of created heat resources"""
41
-
42
39
  images: Optional[List[str]] = None
43
40
  """IDs of created images"""
44
41
 
@@ -30,6 +30,9 @@ class TaskListParams(TypedDict, total=False):
30
30
  offset: int
31
31
  """Offset value is used to exclude the first set of records from the result"""
32
32
 
33
+ order_by: Literal["asc", "desc"]
34
+ """Sorting by creation date. Oldest first, or most recent first"""
35
+
33
36
  project_id: Optional[Iterable[int]]
34
37
  """The project ID to filter the tasks by project.
35
38
 
@@ -42,8 +45,11 @@ class TaskListParams(TypedDict, total=False):
42
45
  Supports multiple values of kind key=value1&key=value2
43
46
  """
44
47
 
45
- sorting: Optional[Literal["asc", "desc"]]
46
- """Sorting by creation date. Oldest first, or most recent first"""
48
+ sorting: Literal["asc", "desc"]
49
+ """(DEPRECATED Use 'order_by' instead) Sorting by creation date.
50
+
51
+ Oldest first, or most recent first
52
+ """
47
53
 
48
54
  state: Optional[List[Literal["ERROR", "FINISHED", "NEW", "RUNNING"]]]
49
55
  """Filter the tasks by state.
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .waap_api_urls import WaapAPIURLs as WaapAPIURLs
6
+ from .domain_list_params import DomainListParams as DomainListParams
7
+ from .waap_domain_status import WaapDomainStatus as WaapDomainStatus
8
+ from .waap_summary_domain import WaapSummaryDomain as WaapSummaryDomain
9
+ from .domain_update_params import DomainUpdateParams as DomainUpdateParams
10
+ from .waap_detailed_domain import WaapDetailedDomain as WaapDetailedDomain
11
+ from .waap_domain_settings import WaapDomainSettings as WaapDomainSettings
12
+ from .waap_domain_ddos_settings import WaapDomainDDOSSettings as WaapDomainDDOSSettings
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Literal, TypedDict
7
+
8
+ from .waap_domain_status import WaapDomainStatus
9
+
10
+ __all__ = ["DomainListParams"]
11
+
12
+
13
+ class DomainListParams(TypedDict, total=False):
14
+ ids: Iterable[int]
15
+ """Filter domains based on their IDs"""
16
+
17
+ limit: int
18
+ """Number of items to return"""
19
+
20
+ name: str
21
+ """Filter domains based on the domain name. Supports '\\**' as a wildcard character"""
22
+
23
+ offset: int
24
+ """Number of items to skip"""
25
+
26
+ ordering: Literal["id", "name", "status", "created_at", "-id", "-name", "-status", "-created_at"]
27
+ """Sort the response by given field."""
28
+
29
+ status: WaapDomainStatus
30
+ """The different statuses a domain can have"""
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, TypedDict
6
+
7
+ __all__ = ["DomainUpdateParams"]
8
+
9
+
10
+ class DomainUpdateParams(TypedDict, total=False):
11
+ status: Literal["active", "monitor"]
12
+ """Domain statuses that can be used when updating a domain"""
@@ -0,0 +1,5 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .setting_update_params import SettingUpdateParams as SettingUpdateParams
@@ -0,0 +1,41 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["SettingUpdateParams", "API", "DDOS"]
9
+
10
+
11
+ class SettingUpdateParams(TypedDict, total=False):
12
+ api: API
13
+ """Editable API settings of a domain"""
14
+
15
+ ddos: DDOS
16
+ """Editable DDoS settings for a domain."""
17
+
18
+
19
+ class API(TypedDict, total=False):
20
+ api_urls: List[str]
21
+ """The API URLs for a domain.
22
+
23
+ If your domain has a common base URL for all API paths, it can be set here
24
+ """
25
+
26
+
27
+ class DDOS(TypedDict, total=False):
28
+ burst_threshold: int
29
+ """The burst threshold detects sudden rises in traffic.
30
+
31
+ If it is met and the number of requests is at least five times the last 2-second
32
+ interval, DDoS protection will activate. Default is 1000.
33
+ """
34
+
35
+ global_threshold: int
36
+ """
37
+ The global threshold is responsible for identifying DDoS attacks with a slow
38
+ rise in traffic. If the threshold is met and the current number of requests is
39
+ at least double that of the previous 10-second window, DDoS protection will
40
+ activate. Default is 5000.
41
+ """
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["WaapAPIURLs"]
8
+
9
+
10
+ class WaapAPIURLs(BaseModel):
11
+ api_urls: Optional[List[str]] = None
12
+ """The API URLs for a domain.
13
+
14
+ If your domain has a common base URL for all API paths, it can be set here
15
+ """
@@ -0,0 +1,37 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, Optional
4
+ from datetime import datetime
5
+
6
+ from ..._models import BaseModel
7
+ from .waap_domain_status import WaapDomainStatus
8
+
9
+ __all__ = ["WaapDetailedDomain", "Quotas"]
10
+
11
+
12
+ class Quotas(BaseModel):
13
+ allowed: int
14
+ """The maximum allowed number of this resource"""
15
+
16
+ current: int
17
+ """The current number of this resource"""
18
+
19
+
20
+ class WaapDetailedDomain(BaseModel):
21
+ id: int
22
+ """The domain ID"""
23
+
24
+ created_at: datetime
25
+ """The date and time the domain was created in ISO 8601 format"""
26
+
27
+ custom_page_set: Optional[int] = None
28
+ """The ID of the custom page set"""
29
+
30
+ name: str
31
+ """The domain name"""
32
+
33
+ status: WaapDomainStatus
34
+ """The different statuses a domain can have"""
35
+
36
+ quotas: Optional[Dict[str, Quotas]] = None
37
+ """Domain level quotas"""
@@ -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
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["WaapDomainDDOSSettings"]
8
+
9
+
10
+ class WaapDomainDDOSSettings(BaseModel):
11
+ burst_threshold: Optional[int] = None
12
+ """The burst threshold detects sudden rises in traffic.
13
+
14
+ If it is met and the number of requests is at least five times the last 2-second
15
+ interval, DDoS protection will activate. Default is 1000.
16
+ """
17
+
18
+ global_threshold: Optional[int] = None
19
+ """
20
+ The global threshold is responsible for identifying DDoS attacks with a slow
21
+ rise in traffic. If the threshold is met and the current number of requests is
22
+ at least double that of the previous 10-second window, DDoS protection will
23
+ activate. Default is 5000.
24
+ """
25
+
26
+ sub_second_threshold: Optional[int] = None
27
+ """
28
+ The sub-second threshold protects WAAP servers against attacks from traffic
29
+ bursts. When this threshold is reached, the DDoS mode will activate on the
30
+ affected WAAP server, not the whole WAAP cluster. Default is 50.
31
+ """
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ..._models import BaseModel
4
+ from .waap_api_urls import WaapAPIURLs
5
+ from .waap_domain_ddos_settings import WaapDomainDDOSSettings
6
+
7
+ __all__ = ["WaapDomainSettings"]
8
+
9
+
10
+ class WaapDomainSettings(BaseModel):
11
+ api: WaapAPIURLs
12
+ """API settings of a domain"""
13
+
14
+ ddos: WaapDomainDDOSSettings
15
+ """DDoS settings for a domain."""
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["WaapDomainStatus"]
6
+
7
+ WaapDomainStatus: TypeAlias = Literal["active", "bypass", "monitor", "locked"]
@@ -0,0 +1,26 @@
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
+ from .waap_domain_status import WaapDomainStatus
8
+
9
+ __all__ = ["WaapSummaryDomain"]
10
+
11
+
12
+ class WaapSummaryDomain(BaseModel):
13
+ id: int
14
+ """The domain ID"""
15
+
16
+ created_at: datetime
17
+ """The date and time the domain was created in ISO 8601 format"""
18
+
19
+ custom_page_set: Optional[int] = None
20
+ """The ID of the custom page set"""
21
+
22
+ name: str
23
+ """The domain name"""
24
+
25
+ status: WaapDomainStatus
26
+ """The different statuses a domain can have"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gcore
3
- Version: 0.1.0a2
3
+ Version: 0.2.0
4
4
  Summary: The official Python library for the gcore API
5
5
  Project-URL: Homepage, https://github.com/G-Core/gcore-python
6
6
  Project-URL: Repository, https://github.com/G-Core/gcore-python
@@ -47,7 +47,7 @@ The REST API documentation can be found on [api.gcore.com](https://api.gcore.com
47
47
 
48
48
  ```sh
49
49
  # install from PyPI
50
- pip install --pre gcore
50
+ pip install gcore
51
51
  ```
52
52
 
53
53
  ## Usage
@@ -196,7 +196,7 @@ task_id_list = client.cloud.instances.create(
196
196
  flavor="g2-standard-4-8",
197
197
  interfaces=[{"type": "external"}],
198
198
  volumes=[
199
- {
199
+ {
200
200
  "source": "image",
201
201
  "image_id": "your-image-uuid",
202
202
  "size": 50,