gcore 0.7.0__py3-none-any.whl → 0.9.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.
- gcore/_base_client.py +4 -1
- gcore/_client.py +9 -0
- gcore/_files.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +0 -62
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/cost_reports.py +24 -0
- gcore/resources/cloud/quotas/requests.py +7 -15
- gcore/resources/fastedge/binaries.py +81 -1
- gcore/resources/iam/users.py +5 -5
- gcore/resources/security/__init__.py +75 -0
- gcore/resources/security/bgp_announces.py +308 -0
- gcore/resources/security/events.py +234 -0
- gcore/resources/security/profile_templates.py +143 -0
- gcore/resources/security/profiles.py +661 -0
- gcore/resources/security/security.py +198 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +3 -0
- gcore/types/cloud/cost_report_get_aggregated_params.py +3 -0
- gcore/types/cloud/cost_report_get_detailed_params.py +3 -0
- gcore/types/cloud/floating_ip.py +0 -9
- gcore/types/cloud/floating_ip_detailed.py +0 -9
- gcore/types/cloud/gpu_baremetal_flavor.py +16 -0
- gcore/types/cloud/quotas/request_list_params.py +2 -2
- gcore/types/cloud/region.py +6 -3
- gcore/types/cloud/subnet.py +1 -1
- gcore/types/fastedge/__init__.py +1 -0
- gcore/types/fastedge/binary_create_params.py +11 -0
- gcore/types/security/__init__.py +18 -0
- gcore/types/security/bgp_announce_change_params.py +16 -0
- gcore/types/security/bgp_announce_list_params.py +18 -0
- gcore/types/security/bgp_announce_list_response.py +10 -0
- gcore/types/security/client_announce.py +15 -0
- gcore/types/security/client_profile.py +56 -0
- gcore/types/security/client_profile_template.py +43 -0
- gcore/types/security/client_view.py +29 -0
- gcore/types/security/event_list_params.py +38 -0
- gcore/types/security/profile_create_params.py +24 -0
- gcore/types/security/profile_list_params.py +17 -0
- gcore/types/security/profile_list_response.py +10 -0
- gcore/types/security/profile_recreate_params.py +24 -0
- gcore/types/security/profile_replace_params.py +24 -0
- gcore/types/security/profile_template_list_response.py +10 -0
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/METADATA +1 -1
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/RECORD +46 -24
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/WHEEL +0 -0
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .events import (
|
|
6
|
+
EventsResource,
|
|
7
|
+
AsyncEventsResource,
|
|
8
|
+
EventsResourceWithRawResponse,
|
|
9
|
+
AsyncEventsResourceWithRawResponse,
|
|
10
|
+
EventsResourceWithStreamingResponse,
|
|
11
|
+
AsyncEventsResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from .profiles import (
|
|
14
|
+
ProfilesResource,
|
|
15
|
+
AsyncProfilesResource,
|
|
16
|
+
ProfilesResourceWithRawResponse,
|
|
17
|
+
AsyncProfilesResourceWithRawResponse,
|
|
18
|
+
ProfilesResourceWithStreamingResponse,
|
|
19
|
+
AsyncProfilesResourceWithStreamingResponse,
|
|
20
|
+
)
|
|
21
|
+
from ..._compat import cached_property
|
|
22
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
23
|
+
from .bgp_announces import (
|
|
24
|
+
BgpAnnouncesResource,
|
|
25
|
+
AsyncBgpAnnouncesResource,
|
|
26
|
+
BgpAnnouncesResourceWithRawResponse,
|
|
27
|
+
AsyncBgpAnnouncesResourceWithRawResponse,
|
|
28
|
+
BgpAnnouncesResourceWithStreamingResponse,
|
|
29
|
+
AsyncBgpAnnouncesResourceWithStreamingResponse,
|
|
30
|
+
)
|
|
31
|
+
from .profile_templates import (
|
|
32
|
+
ProfileTemplatesResource,
|
|
33
|
+
AsyncProfileTemplatesResource,
|
|
34
|
+
ProfileTemplatesResourceWithRawResponse,
|
|
35
|
+
AsyncProfileTemplatesResourceWithRawResponse,
|
|
36
|
+
ProfileTemplatesResourceWithStreamingResponse,
|
|
37
|
+
AsyncProfileTemplatesResourceWithStreamingResponse,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
__all__ = ["SecurityResource", "AsyncSecurityResource"]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class SecurityResource(SyncAPIResource):
|
|
44
|
+
@cached_property
|
|
45
|
+
def events(self) -> EventsResource:
|
|
46
|
+
return EventsResource(self._client)
|
|
47
|
+
|
|
48
|
+
@cached_property
|
|
49
|
+
def bgp_announces(self) -> BgpAnnouncesResource:
|
|
50
|
+
return BgpAnnouncesResource(self._client)
|
|
51
|
+
|
|
52
|
+
@cached_property
|
|
53
|
+
def profile_templates(self) -> ProfileTemplatesResource:
|
|
54
|
+
return ProfileTemplatesResource(self._client)
|
|
55
|
+
|
|
56
|
+
@cached_property
|
|
57
|
+
def profiles(self) -> ProfilesResource:
|
|
58
|
+
return ProfilesResource(self._client)
|
|
59
|
+
|
|
60
|
+
@cached_property
|
|
61
|
+
def with_raw_response(self) -> SecurityResourceWithRawResponse:
|
|
62
|
+
"""
|
|
63
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
64
|
+
the raw response object instead of the parsed content.
|
|
65
|
+
|
|
66
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
67
|
+
"""
|
|
68
|
+
return SecurityResourceWithRawResponse(self)
|
|
69
|
+
|
|
70
|
+
@cached_property
|
|
71
|
+
def with_streaming_response(self) -> SecurityResourceWithStreamingResponse:
|
|
72
|
+
"""
|
|
73
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
74
|
+
|
|
75
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
76
|
+
"""
|
|
77
|
+
return SecurityResourceWithStreamingResponse(self)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class AsyncSecurityResource(AsyncAPIResource):
|
|
81
|
+
@cached_property
|
|
82
|
+
def events(self) -> AsyncEventsResource:
|
|
83
|
+
return AsyncEventsResource(self._client)
|
|
84
|
+
|
|
85
|
+
@cached_property
|
|
86
|
+
def bgp_announces(self) -> AsyncBgpAnnouncesResource:
|
|
87
|
+
return AsyncBgpAnnouncesResource(self._client)
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def profile_templates(self) -> AsyncProfileTemplatesResource:
|
|
91
|
+
return AsyncProfileTemplatesResource(self._client)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def profiles(self) -> AsyncProfilesResource:
|
|
95
|
+
return AsyncProfilesResource(self._client)
|
|
96
|
+
|
|
97
|
+
@cached_property
|
|
98
|
+
def with_raw_response(self) -> AsyncSecurityResourceWithRawResponse:
|
|
99
|
+
"""
|
|
100
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
101
|
+
the raw response object instead of the parsed content.
|
|
102
|
+
|
|
103
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
104
|
+
"""
|
|
105
|
+
return AsyncSecurityResourceWithRawResponse(self)
|
|
106
|
+
|
|
107
|
+
@cached_property
|
|
108
|
+
def with_streaming_response(self) -> AsyncSecurityResourceWithStreamingResponse:
|
|
109
|
+
"""
|
|
110
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
111
|
+
|
|
112
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
113
|
+
"""
|
|
114
|
+
return AsyncSecurityResourceWithStreamingResponse(self)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class SecurityResourceWithRawResponse:
|
|
118
|
+
def __init__(self, security: SecurityResource) -> None:
|
|
119
|
+
self._security = security
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def events(self) -> EventsResourceWithRawResponse:
|
|
123
|
+
return EventsResourceWithRawResponse(self._security.events)
|
|
124
|
+
|
|
125
|
+
@cached_property
|
|
126
|
+
def bgp_announces(self) -> BgpAnnouncesResourceWithRawResponse:
|
|
127
|
+
return BgpAnnouncesResourceWithRawResponse(self._security.bgp_announces)
|
|
128
|
+
|
|
129
|
+
@cached_property
|
|
130
|
+
def profile_templates(self) -> ProfileTemplatesResourceWithRawResponse:
|
|
131
|
+
return ProfileTemplatesResourceWithRawResponse(self._security.profile_templates)
|
|
132
|
+
|
|
133
|
+
@cached_property
|
|
134
|
+
def profiles(self) -> ProfilesResourceWithRawResponse:
|
|
135
|
+
return ProfilesResourceWithRawResponse(self._security.profiles)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class AsyncSecurityResourceWithRawResponse:
|
|
139
|
+
def __init__(self, security: AsyncSecurityResource) -> None:
|
|
140
|
+
self._security = security
|
|
141
|
+
|
|
142
|
+
@cached_property
|
|
143
|
+
def events(self) -> AsyncEventsResourceWithRawResponse:
|
|
144
|
+
return AsyncEventsResourceWithRawResponse(self._security.events)
|
|
145
|
+
|
|
146
|
+
@cached_property
|
|
147
|
+
def bgp_announces(self) -> AsyncBgpAnnouncesResourceWithRawResponse:
|
|
148
|
+
return AsyncBgpAnnouncesResourceWithRawResponse(self._security.bgp_announces)
|
|
149
|
+
|
|
150
|
+
@cached_property
|
|
151
|
+
def profile_templates(self) -> AsyncProfileTemplatesResourceWithRawResponse:
|
|
152
|
+
return AsyncProfileTemplatesResourceWithRawResponse(self._security.profile_templates)
|
|
153
|
+
|
|
154
|
+
@cached_property
|
|
155
|
+
def profiles(self) -> AsyncProfilesResourceWithRawResponse:
|
|
156
|
+
return AsyncProfilesResourceWithRawResponse(self._security.profiles)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class SecurityResourceWithStreamingResponse:
|
|
160
|
+
def __init__(self, security: SecurityResource) -> None:
|
|
161
|
+
self._security = security
|
|
162
|
+
|
|
163
|
+
@cached_property
|
|
164
|
+
def events(self) -> EventsResourceWithStreamingResponse:
|
|
165
|
+
return EventsResourceWithStreamingResponse(self._security.events)
|
|
166
|
+
|
|
167
|
+
@cached_property
|
|
168
|
+
def bgp_announces(self) -> BgpAnnouncesResourceWithStreamingResponse:
|
|
169
|
+
return BgpAnnouncesResourceWithStreamingResponse(self._security.bgp_announces)
|
|
170
|
+
|
|
171
|
+
@cached_property
|
|
172
|
+
def profile_templates(self) -> ProfileTemplatesResourceWithStreamingResponse:
|
|
173
|
+
return ProfileTemplatesResourceWithStreamingResponse(self._security.profile_templates)
|
|
174
|
+
|
|
175
|
+
@cached_property
|
|
176
|
+
def profiles(self) -> ProfilesResourceWithStreamingResponse:
|
|
177
|
+
return ProfilesResourceWithStreamingResponse(self._security.profiles)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class AsyncSecurityResourceWithStreamingResponse:
|
|
181
|
+
def __init__(self, security: AsyncSecurityResource) -> None:
|
|
182
|
+
self._security = security
|
|
183
|
+
|
|
184
|
+
@cached_property
|
|
185
|
+
def events(self) -> AsyncEventsResourceWithStreamingResponse:
|
|
186
|
+
return AsyncEventsResourceWithStreamingResponse(self._security.events)
|
|
187
|
+
|
|
188
|
+
@cached_property
|
|
189
|
+
def bgp_announces(self) -> AsyncBgpAnnouncesResourceWithStreamingResponse:
|
|
190
|
+
return AsyncBgpAnnouncesResourceWithStreamingResponse(self._security.bgp_announces)
|
|
191
|
+
|
|
192
|
+
@cached_property
|
|
193
|
+
def profile_templates(self) -> AsyncProfileTemplatesResourceWithStreamingResponse:
|
|
194
|
+
return AsyncProfileTemplatesResourceWithStreamingResponse(self._security.profile_templates)
|
|
195
|
+
|
|
196
|
+
@cached_property
|
|
197
|
+
def profiles(self) -> AsyncProfilesResourceWithStreamingResponse:
|
|
198
|
+
return AsyncProfilesResourceWithStreamingResponse(self._security.profiles)
|
|
@@ -54,6 +54,9 @@ class CostReportGetAggregatedMonthlyParams(TypedDict, total=False):
|
|
|
54
54
|
response_format: Literal["csv_totals", "json"]
|
|
55
55
|
"""Format of the response (`csv_totals` or json)."""
|
|
56
56
|
|
|
57
|
+
rounding: bool
|
|
58
|
+
"""Round cost values to 5 decimal places. When false, returns full precision."""
|
|
59
|
+
|
|
57
60
|
schema_filter: SchemaFilter
|
|
58
61
|
"""Extended filter for field filtering."""
|
|
59
62
|
|
|
@@ -69,6 +69,9 @@ class CostReportGetAggregatedParams(TypedDict, total=False):
|
|
|
69
69
|
response_format: Literal["csv_totals", "json"]
|
|
70
70
|
"""Format of the response (csv or json)."""
|
|
71
71
|
|
|
72
|
+
rounding: bool
|
|
73
|
+
"""Round cost values to 5 decimal places. When false, returns full precision."""
|
|
74
|
+
|
|
72
75
|
schema_filter: SchemaFilter
|
|
73
76
|
"""Extended filter for field filtering."""
|
|
74
77
|
|
|
@@ -76,6 +76,9 @@ class CostReportGetDetailedParams(TypedDict, total=False):
|
|
|
76
76
|
response_format: Literal["csv_records", "json"]
|
|
77
77
|
"""Format of the response (csv or json)."""
|
|
78
78
|
|
|
79
|
+
rounding: bool
|
|
80
|
+
"""Round cost values to 5 decimal places. When false, returns full precision."""
|
|
81
|
+
|
|
79
82
|
schema_filter: SchemaFilter
|
|
80
83
|
"""Extended filter for field filtering."""
|
|
81
84
|
|
gcore/types/cloud/floating_ip.py
CHANGED
|
@@ -20,12 +20,6 @@ class FloatingIP(BaseModel):
|
|
|
20
20
|
creator_task_id: Optional[str] = None
|
|
21
21
|
"""Task that created this entity"""
|
|
22
22
|
|
|
23
|
-
dns_domain: Optional[str] = None
|
|
24
|
-
"""This field is deprecated and can be ignored"""
|
|
25
|
-
|
|
26
|
-
dns_name: Optional[str] = None
|
|
27
|
-
"""This field is deprecated and can be ignored"""
|
|
28
|
-
|
|
29
23
|
fixed_ip_address: Optional[str] = None
|
|
30
24
|
"""IP address of the port the floating IP is attached to"""
|
|
31
25
|
|
|
@@ -53,9 +47,6 @@ class FloatingIP(BaseModel):
|
|
|
53
47
|
status: Optional[FloatingIPStatus] = None
|
|
54
48
|
"""Floating IP status"""
|
|
55
49
|
|
|
56
|
-
subnet_id: Optional[str] = None
|
|
57
|
-
"""This field is deprecated and can be ignored"""
|
|
58
|
-
|
|
59
50
|
tags: List[Tag]
|
|
60
51
|
"""List of key-value tags associated with the resource.
|
|
61
52
|
|
|
@@ -162,12 +162,6 @@ class FloatingIPDetailed(BaseModel):
|
|
|
162
162
|
creator_task_id: Optional[str] = None
|
|
163
163
|
"""Task that created this entity"""
|
|
164
164
|
|
|
165
|
-
dns_domain: Optional[str] = None
|
|
166
|
-
"""This field is deprecated and can be ignored"""
|
|
167
|
-
|
|
168
|
-
dns_name: Optional[str] = None
|
|
169
|
-
"""This field is deprecated and can be ignored"""
|
|
170
|
-
|
|
171
165
|
fixed_ip_address: Optional[str] = None
|
|
172
166
|
"""IP address of the port the floating IP is attached to"""
|
|
173
167
|
|
|
@@ -198,9 +192,6 @@ class FloatingIPDetailed(BaseModel):
|
|
|
198
192
|
status: Optional[FloatingIPStatus] = None
|
|
199
193
|
"""Floating IP status"""
|
|
200
194
|
|
|
201
|
-
subnet_id: Optional[str] = None
|
|
202
|
-
"""This field is deprecated and can be ignored"""
|
|
203
|
-
|
|
204
195
|
tags: List[Tag]
|
|
205
196
|
"""List of key-value tags associated with the resource.
|
|
206
197
|
|
|
@@ -10,10 +10,12 @@ __all__ = [
|
|
|
10
10
|
"GPUBaremetalFlavorSerializerWithoutPrice",
|
|
11
11
|
"GPUBaremetalFlavorSerializerWithoutPriceHardwareDescription",
|
|
12
12
|
"GPUBaremetalFlavorSerializerWithoutPriceHardwareProperties",
|
|
13
|
+
"GPUBaremetalFlavorSerializerWithoutPriceSupportedFeatures",
|
|
13
14
|
"GPUBaremetalFlavorSerializerWithPrices",
|
|
14
15
|
"GPUBaremetalFlavorSerializerWithPricesHardwareDescription",
|
|
15
16
|
"GPUBaremetalFlavorSerializerWithPricesHardwareProperties",
|
|
16
17
|
"GPUBaremetalFlavorSerializerWithPricesPrice",
|
|
18
|
+
"GPUBaremetalFlavorSerializerWithPricesSupportedFeatures",
|
|
17
19
|
]
|
|
18
20
|
|
|
19
21
|
|
|
@@ -45,6 +47,10 @@ class GPUBaremetalFlavorSerializerWithoutPriceHardwareProperties(BaseModel):
|
|
|
45
47
|
"""GPU model"""
|
|
46
48
|
|
|
47
49
|
|
|
50
|
+
class GPUBaremetalFlavorSerializerWithoutPriceSupportedFeatures(BaseModel):
|
|
51
|
+
security_groups: bool
|
|
52
|
+
|
|
53
|
+
|
|
48
54
|
class GPUBaremetalFlavorSerializerWithoutPrice(BaseModel):
|
|
49
55
|
architecture: Optional[str] = None
|
|
50
56
|
"""Flavor architecture type"""
|
|
@@ -64,6 +70,9 @@ class GPUBaremetalFlavorSerializerWithoutPrice(BaseModel):
|
|
|
64
70
|
name: str
|
|
65
71
|
"""Flavor name"""
|
|
66
72
|
|
|
73
|
+
supported_features: GPUBaremetalFlavorSerializerWithoutPriceSupportedFeatures
|
|
74
|
+
"""Set of enabled features based on the flavor's type and configuration"""
|
|
75
|
+
|
|
67
76
|
|
|
68
77
|
class GPUBaremetalFlavorSerializerWithPricesHardwareDescription(BaseModel):
|
|
69
78
|
cpu: str
|
|
@@ -107,6 +116,10 @@ class GPUBaremetalFlavorSerializerWithPricesPrice(BaseModel):
|
|
|
107
116
|
"""Price status for the UI"""
|
|
108
117
|
|
|
109
118
|
|
|
119
|
+
class GPUBaremetalFlavorSerializerWithPricesSupportedFeatures(BaseModel):
|
|
120
|
+
security_groups: bool
|
|
121
|
+
|
|
122
|
+
|
|
110
123
|
class GPUBaremetalFlavorSerializerWithPrices(BaseModel):
|
|
111
124
|
architecture: Optional[str] = None
|
|
112
125
|
"""Flavor architecture type"""
|
|
@@ -129,5 +142,8 @@ class GPUBaremetalFlavorSerializerWithPrices(BaseModel):
|
|
|
129
142
|
price: GPUBaremetalFlavorSerializerWithPricesPrice
|
|
130
143
|
"""Flavor price"""
|
|
131
144
|
|
|
145
|
+
supported_features: GPUBaremetalFlavorSerializerWithPricesSupportedFeatures
|
|
146
|
+
"""Set of enabled features based on the flavor's type and configuration"""
|
|
147
|
+
|
|
132
148
|
|
|
133
149
|
GPUBaremetalFlavor: TypeAlias = Union[GPUBaremetalFlavorSerializerWithoutPrice, GPUBaremetalFlavorSerializerWithPrices]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List
|
|
5
|
+
from typing import List
|
|
6
6
|
from typing_extensions import Literal, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["RequestListParams"]
|
|
@@ -18,5 +18,5 @@ class RequestListParams(TypedDict, total=False):
|
|
|
18
18
|
Offset value is used to exclude the first set of records from the result
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
status:
|
|
21
|
+
status: List[Literal["done", "in progress", "rejected"]]
|
|
22
22
|
"""List of limit requests statuses for filtering"""
|
gcore/types/cloud/region.py
CHANGED
|
@@ -40,9 +40,6 @@ class Region(BaseModel):
|
|
|
40
40
|
created_on: datetime
|
|
41
41
|
"""This field is deprecated. Use `created_at` instead."""
|
|
42
42
|
|
|
43
|
-
ddos_endpoint_id: Optional[int] = None
|
|
44
|
-
"""DDoS endpoint ID"""
|
|
45
|
-
|
|
46
43
|
display_name: str
|
|
47
44
|
"""Human-readable region name"""
|
|
48
45
|
|
|
@@ -70,6 +67,9 @@ class Region(BaseModel):
|
|
|
70
67
|
has_dbaas: bool
|
|
71
68
|
"""Region has DBAAS service"""
|
|
72
69
|
|
|
70
|
+
has_ddos: bool
|
|
71
|
+
"""Region has Advanced DDoS Protection capability"""
|
|
72
|
+
|
|
73
73
|
has_k8s: bool
|
|
74
74
|
"""Region has managed kubernetes capability"""
|
|
75
75
|
|
|
@@ -99,3 +99,6 @@ class Region(BaseModel):
|
|
|
99
99
|
|
|
100
100
|
zone: Optional[Literal["AMERICAS", "APAC", "EMEA", "RUSSIA_AND_CIS"]] = None
|
|
101
101
|
"""Geographical zone"""
|
|
102
|
+
|
|
103
|
+
ddos_endpoint_id: Optional[int] = None
|
|
104
|
+
"""DDoS endpoint ID"""
|
gcore/types/cloud/subnet.py
CHANGED
|
@@ -71,7 +71,7 @@ class Subnet(BaseModel):
|
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
73
|
has_router: Optional[bool] = None
|
|
74
|
-
"""
|
|
74
|
+
"""Deprecated. Always returns `false`."""
|
|
75
75
|
|
|
76
76
|
host_routes: Optional[List[Route]] = None
|
|
77
77
|
"""List of custom static routes to advertise via DHCP."""
|
gcore/types/fastedge/__init__.py
CHANGED
|
@@ -23,6 +23,7 @@ from .app_update_params import AppUpdateParams as AppUpdateParams
|
|
|
23
23
|
from .app_replace_params import AppReplaceParams as AppReplaceParams
|
|
24
24
|
from .secret_list_params import SecretListParams as SecretListParams
|
|
25
25
|
from .template_parameter import TemplateParameter as TemplateParameter
|
|
26
|
+
from .binary_create_params import BinaryCreateParams as BinaryCreateParams
|
|
26
27
|
from .binary_list_response import BinaryListResponse as BinaryListResponse
|
|
27
28
|
from .kv_store_list_params import KvStoreListParams as KvStoreListParams
|
|
28
29
|
from .secret_create_params import SecretCreateParams as SecretCreateParams
|
|
@@ -0,0 +1,11 @@
|
|
|
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__ = ["BinaryCreateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BinaryCreateParams(TypedDict, total=False):
|
|
11
|
+
pass
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .client_view import ClientView as ClientView
|
|
6
|
+
from .client_profile import ClientProfile as ClientProfile
|
|
7
|
+
from .client_announce import ClientAnnounce as ClientAnnounce
|
|
8
|
+
from .event_list_params import EventListParams as EventListParams
|
|
9
|
+
from .profile_list_params import ProfileListParams as ProfileListParams
|
|
10
|
+
from .profile_create_params import ProfileCreateParams as ProfileCreateParams
|
|
11
|
+
from .profile_list_response import ProfileListResponse as ProfileListResponse
|
|
12
|
+
from .profile_replace_params import ProfileReplaceParams as ProfileReplaceParams
|
|
13
|
+
from .client_profile_template import ClientProfileTemplate as ClientProfileTemplate
|
|
14
|
+
from .profile_recreate_params import ProfileRecreateParams as ProfileRecreateParams
|
|
15
|
+
from .bgp_announce_list_params import BgpAnnounceListParams as BgpAnnounceListParams
|
|
16
|
+
from .bgp_announce_change_params import BgpAnnounceChangeParams as BgpAnnounceChangeParams
|
|
17
|
+
from .bgp_announce_list_response import BgpAnnounceListResponse as BgpAnnounceListResponse
|
|
18
|
+
from .profile_template_list_response import ProfileTemplateListResponse as ProfileTemplateListResponse
|
|
@@ -0,0 +1,16 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["BgpAnnounceChangeParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BgpAnnounceChangeParams(TypedDict, total=False):
|
|
12
|
+
announce: Required[str]
|
|
13
|
+
|
|
14
|
+
enabled: Required[bool]
|
|
15
|
+
|
|
16
|
+
client_id: Optional[int]
|
|
@@ -0,0 +1,18 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["BgpAnnounceListParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BgpAnnounceListParams(TypedDict, total=False):
|
|
12
|
+
announced: Optional[bool]
|
|
13
|
+
|
|
14
|
+
client_id: Optional[int]
|
|
15
|
+
|
|
16
|
+
origin: Optional[Literal["STATIC", "DYNAMIC"]]
|
|
17
|
+
|
|
18
|
+
site: Optional[str]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .client_announce import ClientAnnounce
|
|
7
|
+
|
|
8
|
+
__all__ = ["BgpAnnounceListResponse"]
|
|
9
|
+
|
|
10
|
+
BgpAnnounceListResponse: TypeAlias = List[ClientAnnounce]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ClientAnnounce"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ClientAnnounce(BaseModel):
|
|
11
|
+
announced: List[str]
|
|
12
|
+
|
|
13
|
+
client_id: int
|
|
14
|
+
|
|
15
|
+
not_announced: List[str]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from .client_profile_template import ClientProfileTemplate
|
|
7
|
+
|
|
8
|
+
__all__ = ["ClientProfile", "Field", "Options"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Field(BaseModel):
|
|
12
|
+
id: int
|
|
13
|
+
|
|
14
|
+
base_field: int
|
|
15
|
+
|
|
16
|
+
default: str
|
|
17
|
+
|
|
18
|
+
description: str
|
|
19
|
+
|
|
20
|
+
field_type: str
|
|
21
|
+
|
|
22
|
+
name: str
|
|
23
|
+
|
|
24
|
+
required: bool
|
|
25
|
+
|
|
26
|
+
validation_schema: Dict[str, object]
|
|
27
|
+
|
|
28
|
+
field_value: Optional[Dict[str, object]] = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Options(BaseModel):
|
|
32
|
+
active: bool
|
|
33
|
+
|
|
34
|
+
bgp: bool
|
|
35
|
+
|
|
36
|
+
price: str
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ClientProfile(BaseModel):
|
|
40
|
+
id: int
|
|
41
|
+
|
|
42
|
+
fields: List[Field]
|
|
43
|
+
|
|
44
|
+
options: Options
|
|
45
|
+
|
|
46
|
+
plan: str
|
|
47
|
+
|
|
48
|
+
profile_template: ClientProfileTemplate
|
|
49
|
+
|
|
50
|
+
protocols: List[Dict[str, object]]
|
|
51
|
+
|
|
52
|
+
site: str
|
|
53
|
+
|
|
54
|
+
status: Dict[str, object]
|
|
55
|
+
|
|
56
|
+
ip_address: Optional[str] = None
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ClientProfileTemplate", "Field"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Field(BaseModel):
|
|
13
|
+
id: int
|
|
14
|
+
|
|
15
|
+
name: str
|
|
16
|
+
|
|
17
|
+
default: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
description: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
field_type: Optional[Literal["int", "bool", "str"]] = None
|
|
22
|
+
|
|
23
|
+
required: Optional[bool] = None
|
|
24
|
+
|
|
25
|
+
validation_schema: Optional[Dict[str, object]] = None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ClientProfileTemplate(BaseModel):
|
|
29
|
+
id: int
|
|
30
|
+
|
|
31
|
+
created: datetime
|
|
32
|
+
|
|
33
|
+
fields: List[Field]
|
|
34
|
+
|
|
35
|
+
name: str
|
|
36
|
+
|
|
37
|
+
version: str
|
|
38
|
+
|
|
39
|
+
base_template: Optional[int] = None
|
|
40
|
+
|
|
41
|
+
description: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
template_sifter: Optional[str] = None
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ClientView"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ClientView(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
alert_type: Optional[Literal["ddos_alert", "rtbh_alert"]] = None
|
|
16
|
+
|
|
17
|
+
attack_power_bps: Optional[float] = None
|
|
18
|
+
|
|
19
|
+
attack_power_pps: Optional[float] = None
|
|
20
|
+
|
|
21
|
+
attack_start_time: Optional[datetime] = None
|
|
22
|
+
|
|
23
|
+
client_id: Optional[int] = None
|
|
24
|
+
|
|
25
|
+
notification_type: Optional[str] = None
|
|
26
|
+
|
|
27
|
+
number_of_ip_involved_in_attack: Optional[int] = None
|
|
28
|
+
|
|
29
|
+
targeted_ip_addresses: Optional[str] = None
|
|
@@ -0,0 +1,38 @@
|
|
|
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 Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from ..._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["EventListParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EventListParams(TypedDict, total=False):
|
|
15
|
+
alert_type: Optional[Literal["ddos_alert", "rtbh_alert"]]
|
|
16
|
+
|
|
17
|
+
date_from: Annotated[Union[Union[str, datetime], str], PropertyInfo(format="iso8601")]
|
|
18
|
+
|
|
19
|
+
date_to: Annotated[Union[Union[str, datetime], str], PropertyInfo(format="iso8601")]
|
|
20
|
+
|
|
21
|
+
limit: int
|
|
22
|
+
|
|
23
|
+
offset: int
|
|
24
|
+
|
|
25
|
+
ordering: Literal[
|
|
26
|
+
"attack_start_time",
|
|
27
|
+
"-attack_start_time",
|
|
28
|
+
"attack_power_bps",
|
|
29
|
+
"-attack_power_bps",
|
|
30
|
+
"attack_power_pps",
|
|
31
|
+
"-attack_power_pps",
|
|
32
|
+
"number_of_ip_involved_in_attack",
|
|
33
|
+
"-number_of_ip_involved_in_attack",
|
|
34
|
+
"alert_type",
|
|
35
|
+
"-alert_type",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
targeted_ip_addresses: Optional[str]
|