gcore 0.1.0a1__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.
- gcore/__init__.py +5 -0
- gcore/_client.py +9 -0
- gcore/_utils/_proxy.py +4 -1
- gcore/_utils/_resources_proxy.py +24 -0
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/servers.py +234 -0
- gcore/resources/cloud/billing_reservations.py +24 -0
- gcore/resources/cloud/file_shares/file_shares.py +16 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +352 -2
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +204 -0
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +80 -0
- gcore/resources/cloud/inference/deployments/deployments.py +322 -4
- gcore/resources/cloud/instances/images.py +316 -0
- gcore/resources/cloud/instances/instances.py +472 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +282 -0
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +326 -0
- gcore/resources/cloud/load_balancers/listeners.py +371 -6
- gcore/resources/cloud/load_balancers/load_balancers.py +364 -0
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +24 -0
- gcore/resources/cloud/load_balancers/pools/members.py +28 -0
- gcore/resources/cloud/load_balancers/pools/pools.py +388 -8
- gcore/resources/cloud/networks/networks.py +72 -16
- gcore/resources/cloud/secrets.py +56 -11
- gcore/resources/cloud/tasks.py +107 -96
- gcore/resources/waap/__init__.py +33 -0
- gcore/resources/waap/domains/__init__.py +33 -0
- gcore/resources/waap/domains/domains.py +515 -0
- gcore/resources/waap/domains/settings.py +271 -0
- gcore/resources/waap/waap.py +102 -0
- gcore/types/cloud/__init__.py +1 -0
- gcore/types/cloud/billing_reservation_list_params.py +5 -0
- gcore/types/cloud/container_probe_config_create_param.py +1 -2
- gcore/types/cloud/file_share.py +3 -0
- gcore/types/cloud/file_share_list_params.py +7 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +20 -0
- gcore/types/cloud/inference/deployment_update_params.py +203 -6
- gcore/types/cloud/inference/inference.py +3 -1
- gcore/types/cloud/load_balancer_listener_detail.py +13 -13
- gcore/types/cloud/load_balancer_pool.py +13 -13
- gcore/types/cloud/load_balancer_pool_list.py +99 -4
- gcore/types/cloud/load_balancers/listener_create_params.py +2 -0
- gcore/types/cloud/load_balancers/listener_get_params.py +3 -1
- gcore/types/cloud/load_balancers/listener_list_params.py +4 -2
- gcore/types/cloud/load_balancers/listener_update_params.py +2 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +2 -0
- gcore/types/cloud/load_balancers/pool_list_params.py +5 -6
- gcore/types/cloud/load_balancers/pool_update_params.py +2 -0
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +2 -0
- gcore/types/cloud/load_balancers/pools/member_add_params.py +2 -0
- gcore/types/cloud/network.py +21 -21
- gcore/types/cloud/network_create_params.py +2 -0
- gcore/types/cloud/network_details.py +24 -23
- gcore/types/cloud/network_list_params.py +15 -10
- gcore/types/cloud/network_update_params.py +2 -0
- gcore/types/cloud/quota_get_all_response.py +18 -0
- gcore/types/cloud/quota_get_by_region_response.py +18 -0
- gcore/types/cloud/quotas/request_create_params.py +9 -0
- gcore/types/cloud/quotas/request_get_response.py +9 -0
- gcore/types/cloud/quotas/request_list_response.py +9 -0
- gcore/types/cloud/secret_list_params.py +24 -0
- gcore/types/cloud/task.py +0 -3
- gcore/types/cloud/task_list_params.py +8 -2
- gcore/types/waap/__init__.py +12 -0
- gcore/types/waap/domain_list_params.py +30 -0
- gcore/types/waap/domain_update_params.py +12 -0
- gcore/types/waap/domains/__init__.py +5 -0
- gcore/types/waap/domains/setting_update_params.py +41 -0
- gcore/types/waap/waap_api_urls.py +15 -0
- gcore/types/waap/waap_detailed_domain.py +37 -0
- gcore/types/waap/waap_domain_ddos_settings.py +31 -0
- gcore/types/waap/waap_domain_settings.py +15 -0
- gcore/types/waap/waap_domain_status.py +7 -0
- gcore/types/waap/waap_summary_domain.py +26 -0
- {gcore-0.1.0a1.dist-info → gcore-0.2.0.dist-info}/METADATA +4 -7
- {gcore-0.1.0a1.dist-info → gcore-0.2.0.dist-info}/RECORD +78 -60
- {gcore-0.1.0a1.dist-info → gcore-0.2.0.dist-info}/WHEEL +0 -0
- {gcore-0.1.0a1.dist-info → gcore-0.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,515 @@
|
|
|
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
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from .settings import (
|
|
11
|
+
SettingsResource,
|
|
12
|
+
AsyncSettingsResource,
|
|
13
|
+
SettingsResourceWithRawResponse,
|
|
14
|
+
AsyncSettingsResourceWithRawResponse,
|
|
15
|
+
SettingsResourceWithStreamingResponse,
|
|
16
|
+
AsyncSettingsResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
19
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
20
|
+
from ...._compat import cached_property
|
|
21
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
+
from ...._response import (
|
|
23
|
+
to_raw_response_wrapper,
|
|
24
|
+
to_streamed_response_wrapper,
|
|
25
|
+
async_to_raw_response_wrapper,
|
|
26
|
+
async_to_streamed_response_wrapper,
|
|
27
|
+
)
|
|
28
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
29
|
+
from ....types.waap import WaapDomainStatus, domain_list_params, domain_update_params
|
|
30
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
31
|
+
from ....types.waap.waap_domain_status import WaapDomainStatus
|
|
32
|
+
from ....types.waap.waap_summary_domain import WaapSummaryDomain
|
|
33
|
+
from ....types.waap.waap_detailed_domain import WaapDetailedDomain
|
|
34
|
+
|
|
35
|
+
__all__ = ["DomainsResource", "AsyncDomainsResource"]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DomainsResource(SyncAPIResource):
|
|
39
|
+
@cached_property
|
|
40
|
+
def settings(self) -> SettingsResource:
|
|
41
|
+
return SettingsResource(self._client)
|
|
42
|
+
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_raw_response(self) -> DomainsResourceWithRawResponse:
|
|
45
|
+
"""
|
|
46
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
47
|
+
the raw response object instead of the parsed content.
|
|
48
|
+
|
|
49
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
50
|
+
"""
|
|
51
|
+
return DomainsResourceWithRawResponse(self)
|
|
52
|
+
|
|
53
|
+
@cached_property
|
|
54
|
+
def with_streaming_response(self) -> DomainsResourceWithStreamingResponse:
|
|
55
|
+
"""
|
|
56
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
57
|
+
|
|
58
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
59
|
+
"""
|
|
60
|
+
return DomainsResourceWithStreamingResponse(self)
|
|
61
|
+
|
|
62
|
+
def update(
|
|
63
|
+
self,
|
|
64
|
+
domain_id: int,
|
|
65
|
+
*,
|
|
66
|
+
status: Literal["active", "monitor"] | NotGiven = NOT_GIVEN,
|
|
67
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
68
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
69
|
+
extra_headers: Headers | None = None,
|
|
70
|
+
extra_query: Query | None = None,
|
|
71
|
+
extra_body: Body | None = None,
|
|
72
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
73
|
+
) -> None:
|
|
74
|
+
"""
|
|
75
|
+
Update Domain
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
domain_id: The domain ID
|
|
79
|
+
|
|
80
|
+
status: Domain statuses that can be used when updating a domain
|
|
81
|
+
|
|
82
|
+
extra_headers: Send extra headers
|
|
83
|
+
|
|
84
|
+
extra_query: Add additional query parameters to the request
|
|
85
|
+
|
|
86
|
+
extra_body: Add additional JSON properties to the request
|
|
87
|
+
|
|
88
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
89
|
+
"""
|
|
90
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
91
|
+
return self._patch(
|
|
92
|
+
f"/waap/v1/domains/{domain_id}",
|
|
93
|
+
body=maybe_transform({"status": status}, domain_update_params.DomainUpdateParams),
|
|
94
|
+
options=make_request_options(
|
|
95
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
96
|
+
),
|
|
97
|
+
cast_to=NoneType,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def list(
|
|
101
|
+
self,
|
|
102
|
+
*,
|
|
103
|
+
ids: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
104
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
105
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
106
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
107
|
+
ordering: Literal["id", "name", "status", "created_at", "-id", "-name", "-status", "-created_at"]
|
|
108
|
+
| NotGiven = NOT_GIVEN,
|
|
109
|
+
status: WaapDomainStatus | NotGiven = NOT_GIVEN,
|
|
110
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
|
+
extra_headers: Headers | None = None,
|
|
113
|
+
extra_query: Query | None = None,
|
|
114
|
+
extra_body: Body | None = None,
|
|
115
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
116
|
+
) -> SyncOffsetPage[WaapSummaryDomain]:
|
|
117
|
+
"""
|
|
118
|
+
Retrieve a list of domains associated with the client
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
ids: Filter domains based on their IDs
|
|
122
|
+
|
|
123
|
+
limit: Number of items to return
|
|
124
|
+
|
|
125
|
+
name: Filter domains based on the domain name. Supports '\\**' as a wildcard character
|
|
126
|
+
|
|
127
|
+
offset: Number of items to skip
|
|
128
|
+
|
|
129
|
+
ordering: Sort the response by given field.
|
|
130
|
+
|
|
131
|
+
status: The different statuses a domain can have
|
|
132
|
+
|
|
133
|
+
extra_headers: Send extra headers
|
|
134
|
+
|
|
135
|
+
extra_query: Add additional query parameters to the request
|
|
136
|
+
|
|
137
|
+
extra_body: Add additional JSON properties to the request
|
|
138
|
+
|
|
139
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
140
|
+
"""
|
|
141
|
+
return self._get_api_list(
|
|
142
|
+
"/waap/v1/domains",
|
|
143
|
+
page=SyncOffsetPage[WaapSummaryDomain],
|
|
144
|
+
options=make_request_options(
|
|
145
|
+
extra_headers=extra_headers,
|
|
146
|
+
extra_query=extra_query,
|
|
147
|
+
extra_body=extra_body,
|
|
148
|
+
timeout=timeout,
|
|
149
|
+
query=maybe_transform(
|
|
150
|
+
{
|
|
151
|
+
"ids": ids,
|
|
152
|
+
"limit": limit,
|
|
153
|
+
"name": name,
|
|
154
|
+
"offset": offset,
|
|
155
|
+
"ordering": ordering,
|
|
156
|
+
"status": status,
|
|
157
|
+
},
|
|
158
|
+
domain_list_params.DomainListParams,
|
|
159
|
+
),
|
|
160
|
+
),
|
|
161
|
+
model=WaapSummaryDomain,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
def delete(
|
|
165
|
+
self,
|
|
166
|
+
domain_id: int,
|
|
167
|
+
*,
|
|
168
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
169
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
170
|
+
extra_headers: Headers | None = None,
|
|
171
|
+
extra_query: Query | None = None,
|
|
172
|
+
extra_body: Body | None = None,
|
|
173
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
174
|
+
) -> None:
|
|
175
|
+
"""Delete an inactive domain by ID.
|
|
176
|
+
|
|
177
|
+
Only domains with status 'bypass' can be
|
|
178
|
+
deleted.
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
domain_id: The domain ID
|
|
182
|
+
|
|
183
|
+
extra_headers: Send extra headers
|
|
184
|
+
|
|
185
|
+
extra_query: Add additional query parameters to the request
|
|
186
|
+
|
|
187
|
+
extra_body: Add additional JSON properties to the request
|
|
188
|
+
|
|
189
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
190
|
+
"""
|
|
191
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
192
|
+
return self._delete(
|
|
193
|
+
f"/waap/v1/domains/{domain_id}",
|
|
194
|
+
options=make_request_options(
|
|
195
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
196
|
+
),
|
|
197
|
+
cast_to=NoneType,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
def get(
|
|
201
|
+
self,
|
|
202
|
+
domain_id: int,
|
|
203
|
+
*,
|
|
204
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
205
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
206
|
+
extra_headers: Headers | None = None,
|
|
207
|
+
extra_query: Query | None = None,
|
|
208
|
+
extra_body: Body | None = None,
|
|
209
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
210
|
+
) -> WaapDetailedDomain:
|
|
211
|
+
"""
|
|
212
|
+
Retrieve detailed information about a specific domain
|
|
213
|
+
|
|
214
|
+
Args:
|
|
215
|
+
domain_id: The domain ID
|
|
216
|
+
|
|
217
|
+
extra_headers: Send extra headers
|
|
218
|
+
|
|
219
|
+
extra_query: Add additional query parameters to the request
|
|
220
|
+
|
|
221
|
+
extra_body: Add additional JSON properties to the request
|
|
222
|
+
|
|
223
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
224
|
+
"""
|
|
225
|
+
return self._get(
|
|
226
|
+
f"/waap/v1/domains/{domain_id}",
|
|
227
|
+
options=make_request_options(
|
|
228
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
229
|
+
),
|
|
230
|
+
cast_to=WaapDetailedDomain,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
class AsyncDomainsResource(AsyncAPIResource):
|
|
235
|
+
@cached_property
|
|
236
|
+
def settings(self) -> AsyncSettingsResource:
|
|
237
|
+
return AsyncSettingsResource(self._client)
|
|
238
|
+
|
|
239
|
+
@cached_property
|
|
240
|
+
def with_raw_response(self) -> AsyncDomainsResourceWithRawResponse:
|
|
241
|
+
"""
|
|
242
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
243
|
+
the raw response object instead of the parsed content.
|
|
244
|
+
|
|
245
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
246
|
+
"""
|
|
247
|
+
return AsyncDomainsResourceWithRawResponse(self)
|
|
248
|
+
|
|
249
|
+
@cached_property
|
|
250
|
+
def with_streaming_response(self) -> AsyncDomainsResourceWithStreamingResponse:
|
|
251
|
+
"""
|
|
252
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
253
|
+
|
|
254
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
255
|
+
"""
|
|
256
|
+
return AsyncDomainsResourceWithStreamingResponse(self)
|
|
257
|
+
|
|
258
|
+
async def update(
|
|
259
|
+
self,
|
|
260
|
+
domain_id: int,
|
|
261
|
+
*,
|
|
262
|
+
status: Literal["active", "monitor"] | NotGiven = NOT_GIVEN,
|
|
263
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
264
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
265
|
+
extra_headers: Headers | None = None,
|
|
266
|
+
extra_query: Query | None = None,
|
|
267
|
+
extra_body: Body | None = None,
|
|
268
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
269
|
+
) -> None:
|
|
270
|
+
"""
|
|
271
|
+
Update Domain
|
|
272
|
+
|
|
273
|
+
Args:
|
|
274
|
+
domain_id: The domain ID
|
|
275
|
+
|
|
276
|
+
status: Domain statuses that can be used when updating a domain
|
|
277
|
+
|
|
278
|
+
extra_headers: Send extra headers
|
|
279
|
+
|
|
280
|
+
extra_query: Add additional query parameters to the request
|
|
281
|
+
|
|
282
|
+
extra_body: Add additional JSON properties to the request
|
|
283
|
+
|
|
284
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
285
|
+
"""
|
|
286
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
287
|
+
return await self._patch(
|
|
288
|
+
f"/waap/v1/domains/{domain_id}",
|
|
289
|
+
body=await async_maybe_transform({"status": status}, domain_update_params.DomainUpdateParams),
|
|
290
|
+
options=make_request_options(
|
|
291
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
292
|
+
),
|
|
293
|
+
cast_to=NoneType,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
def list(
|
|
297
|
+
self,
|
|
298
|
+
*,
|
|
299
|
+
ids: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
300
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
301
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
302
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
303
|
+
ordering: Literal["id", "name", "status", "created_at", "-id", "-name", "-status", "-created_at"]
|
|
304
|
+
| NotGiven = NOT_GIVEN,
|
|
305
|
+
status: WaapDomainStatus | NotGiven = NOT_GIVEN,
|
|
306
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
307
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
308
|
+
extra_headers: Headers | None = None,
|
|
309
|
+
extra_query: Query | None = None,
|
|
310
|
+
extra_body: Body | None = None,
|
|
311
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
312
|
+
) -> AsyncPaginator[WaapSummaryDomain, AsyncOffsetPage[WaapSummaryDomain]]:
|
|
313
|
+
"""
|
|
314
|
+
Retrieve a list of domains associated with the client
|
|
315
|
+
|
|
316
|
+
Args:
|
|
317
|
+
ids: Filter domains based on their IDs
|
|
318
|
+
|
|
319
|
+
limit: Number of items to return
|
|
320
|
+
|
|
321
|
+
name: Filter domains based on the domain name. Supports '\\**' as a wildcard character
|
|
322
|
+
|
|
323
|
+
offset: Number of items to skip
|
|
324
|
+
|
|
325
|
+
ordering: Sort the response by given field.
|
|
326
|
+
|
|
327
|
+
status: The different statuses a domain can have
|
|
328
|
+
|
|
329
|
+
extra_headers: Send extra headers
|
|
330
|
+
|
|
331
|
+
extra_query: Add additional query parameters to the request
|
|
332
|
+
|
|
333
|
+
extra_body: Add additional JSON properties to the request
|
|
334
|
+
|
|
335
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
336
|
+
"""
|
|
337
|
+
return self._get_api_list(
|
|
338
|
+
"/waap/v1/domains",
|
|
339
|
+
page=AsyncOffsetPage[WaapSummaryDomain],
|
|
340
|
+
options=make_request_options(
|
|
341
|
+
extra_headers=extra_headers,
|
|
342
|
+
extra_query=extra_query,
|
|
343
|
+
extra_body=extra_body,
|
|
344
|
+
timeout=timeout,
|
|
345
|
+
query=maybe_transform(
|
|
346
|
+
{
|
|
347
|
+
"ids": ids,
|
|
348
|
+
"limit": limit,
|
|
349
|
+
"name": name,
|
|
350
|
+
"offset": offset,
|
|
351
|
+
"ordering": ordering,
|
|
352
|
+
"status": status,
|
|
353
|
+
},
|
|
354
|
+
domain_list_params.DomainListParams,
|
|
355
|
+
),
|
|
356
|
+
),
|
|
357
|
+
model=WaapSummaryDomain,
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
async def delete(
|
|
361
|
+
self,
|
|
362
|
+
domain_id: int,
|
|
363
|
+
*,
|
|
364
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
365
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
366
|
+
extra_headers: Headers | None = None,
|
|
367
|
+
extra_query: Query | None = None,
|
|
368
|
+
extra_body: Body | None = None,
|
|
369
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
370
|
+
) -> None:
|
|
371
|
+
"""Delete an inactive domain by ID.
|
|
372
|
+
|
|
373
|
+
Only domains with status 'bypass' can be
|
|
374
|
+
deleted.
|
|
375
|
+
|
|
376
|
+
Args:
|
|
377
|
+
domain_id: The domain ID
|
|
378
|
+
|
|
379
|
+
extra_headers: Send extra headers
|
|
380
|
+
|
|
381
|
+
extra_query: Add additional query parameters to the request
|
|
382
|
+
|
|
383
|
+
extra_body: Add additional JSON properties to the request
|
|
384
|
+
|
|
385
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
386
|
+
"""
|
|
387
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
388
|
+
return await self._delete(
|
|
389
|
+
f"/waap/v1/domains/{domain_id}",
|
|
390
|
+
options=make_request_options(
|
|
391
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
392
|
+
),
|
|
393
|
+
cast_to=NoneType,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
async def get(
|
|
397
|
+
self,
|
|
398
|
+
domain_id: int,
|
|
399
|
+
*,
|
|
400
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
401
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
402
|
+
extra_headers: Headers | None = None,
|
|
403
|
+
extra_query: Query | None = None,
|
|
404
|
+
extra_body: Body | None = None,
|
|
405
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
406
|
+
) -> WaapDetailedDomain:
|
|
407
|
+
"""
|
|
408
|
+
Retrieve detailed information about a specific domain
|
|
409
|
+
|
|
410
|
+
Args:
|
|
411
|
+
domain_id: The domain ID
|
|
412
|
+
|
|
413
|
+
extra_headers: Send extra headers
|
|
414
|
+
|
|
415
|
+
extra_query: Add additional query parameters to the request
|
|
416
|
+
|
|
417
|
+
extra_body: Add additional JSON properties to the request
|
|
418
|
+
|
|
419
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
420
|
+
"""
|
|
421
|
+
return await self._get(
|
|
422
|
+
f"/waap/v1/domains/{domain_id}",
|
|
423
|
+
options=make_request_options(
|
|
424
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
425
|
+
),
|
|
426
|
+
cast_to=WaapDetailedDomain,
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
class DomainsResourceWithRawResponse:
|
|
431
|
+
def __init__(self, domains: DomainsResource) -> None:
|
|
432
|
+
self._domains = domains
|
|
433
|
+
|
|
434
|
+
self.update = to_raw_response_wrapper(
|
|
435
|
+
domains.update,
|
|
436
|
+
)
|
|
437
|
+
self.list = to_raw_response_wrapper(
|
|
438
|
+
domains.list,
|
|
439
|
+
)
|
|
440
|
+
self.delete = to_raw_response_wrapper(
|
|
441
|
+
domains.delete,
|
|
442
|
+
)
|
|
443
|
+
self.get = to_raw_response_wrapper(
|
|
444
|
+
domains.get,
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
@cached_property
|
|
448
|
+
def settings(self) -> SettingsResourceWithRawResponse:
|
|
449
|
+
return SettingsResourceWithRawResponse(self._domains.settings)
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
class AsyncDomainsResourceWithRawResponse:
|
|
453
|
+
def __init__(self, domains: AsyncDomainsResource) -> None:
|
|
454
|
+
self._domains = domains
|
|
455
|
+
|
|
456
|
+
self.update = async_to_raw_response_wrapper(
|
|
457
|
+
domains.update,
|
|
458
|
+
)
|
|
459
|
+
self.list = async_to_raw_response_wrapper(
|
|
460
|
+
domains.list,
|
|
461
|
+
)
|
|
462
|
+
self.delete = async_to_raw_response_wrapper(
|
|
463
|
+
domains.delete,
|
|
464
|
+
)
|
|
465
|
+
self.get = async_to_raw_response_wrapper(
|
|
466
|
+
domains.get,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
@cached_property
|
|
470
|
+
def settings(self) -> AsyncSettingsResourceWithRawResponse:
|
|
471
|
+
return AsyncSettingsResourceWithRawResponse(self._domains.settings)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
class DomainsResourceWithStreamingResponse:
|
|
475
|
+
def __init__(self, domains: DomainsResource) -> None:
|
|
476
|
+
self._domains = domains
|
|
477
|
+
|
|
478
|
+
self.update = to_streamed_response_wrapper(
|
|
479
|
+
domains.update,
|
|
480
|
+
)
|
|
481
|
+
self.list = to_streamed_response_wrapper(
|
|
482
|
+
domains.list,
|
|
483
|
+
)
|
|
484
|
+
self.delete = to_streamed_response_wrapper(
|
|
485
|
+
domains.delete,
|
|
486
|
+
)
|
|
487
|
+
self.get = to_streamed_response_wrapper(
|
|
488
|
+
domains.get,
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
@cached_property
|
|
492
|
+
def settings(self) -> SettingsResourceWithStreamingResponse:
|
|
493
|
+
return SettingsResourceWithStreamingResponse(self._domains.settings)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
class AsyncDomainsResourceWithStreamingResponse:
|
|
497
|
+
def __init__(self, domains: AsyncDomainsResource) -> None:
|
|
498
|
+
self._domains = domains
|
|
499
|
+
|
|
500
|
+
self.update = async_to_streamed_response_wrapper(
|
|
501
|
+
domains.update,
|
|
502
|
+
)
|
|
503
|
+
self.list = async_to_streamed_response_wrapper(
|
|
504
|
+
domains.list,
|
|
505
|
+
)
|
|
506
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
507
|
+
domains.delete,
|
|
508
|
+
)
|
|
509
|
+
self.get = async_to_streamed_response_wrapper(
|
|
510
|
+
domains.get,
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
@cached_property
|
|
514
|
+
def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
|
|
515
|
+
return AsyncSettingsResourceWithStreamingResponse(self._domains.settings)
|