Skip to content

Commit dd6a5b7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#229)
1 parent c774af3 commit dd6a5b7

File tree

372 files changed

+8107
-13529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+8107
-13529
lines changed

api.md

+241-136
Large diffs are not rendered by default.

src/cloudflare/resources/healthchecks/healthchecks.py

+21-139
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
from __future__ import annotations
44

55
from typing import List, Type, Optional, cast
6-
from typing_extensions import Literal
76

87
import httpx
98

109
from ...types import (
1110
Healthcheck,
11+
CheckRegionItem,
12+
TcpConfigurationParam,
13+
HTTPConfigurationParam,
1214
HealthcheckDeleteResponse,
1315
healthcheck_edit_params,
1416
healthcheck_create_params,
@@ -65,35 +67,15 @@ def create(
6567
zone_id: str,
6668
address: str,
6769
name: str,
68-
check_regions: Optional[
69-
List[
70-
Literal[
71-
"WNAM",
72-
"ENAM",
73-
"WEU",
74-
"EEU",
75-
"NSAM",
76-
"SSAM",
77-
"OC",
78-
"ME",
79-
"NAF",
80-
"SAF",
81-
"IN",
82-
"SEAS",
83-
"NEAS",
84-
"ALL_REGIONS",
85-
]
86-
]
87-
]
88-
| NotGiven = NOT_GIVEN,
70+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
8971
consecutive_fails: int | NotGiven = NOT_GIVEN,
9072
consecutive_successes: int | NotGiven = NOT_GIVEN,
9173
description: str | NotGiven = NOT_GIVEN,
92-
http_config: Optional[healthcheck_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
74+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
9375
interval: int | NotGiven = NOT_GIVEN,
9476
retries: int | NotGiven = NOT_GIVEN,
9577
suspended: bool | NotGiven = NOT_GIVEN,
96-
tcp_config: Optional[healthcheck_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
78+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
9779
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
9880
type: str | NotGiven = NOT_GIVEN,
9981
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -190,35 +172,15 @@ def update(
190172
zone_id: str,
191173
address: str,
192174
name: str,
193-
check_regions: Optional[
194-
List[
195-
Literal[
196-
"WNAM",
197-
"ENAM",
198-
"WEU",
199-
"EEU",
200-
"NSAM",
201-
"SSAM",
202-
"OC",
203-
"ME",
204-
"NAF",
205-
"SAF",
206-
"IN",
207-
"SEAS",
208-
"NEAS",
209-
"ALL_REGIONS",
210-
]
211-
]
212-
]
213-
| NotGiven = NOT_GIVEN,
175+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
214176
consecutive_fails: int | NotGiven = NOT_GIVEN,
215177
consecutive_successes: int | NotGiven = NOT_GIVEN,
216178
description: str | NotGiven = NOT_GIVEN,
217-
http_config: Optional[healthcheck_update_params.HTTPConfig] | NotGiven = NOT_GIVEN,
179+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
218180
interval: int | NotGiven = NOT_GIVEN,
219181
retries: int | NotGiven = NOT_GIVEN,
220182
suspended: bool | NotGiven = NOT_GIVEN,
221-
tcp_config: Optional[healthcheck_update_params.TcpConfig] | NotGiven = NOT_GIVEN,
183+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
222184
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
223185
type: str | NotGiven = NOT_GIVEN,
224186
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -401,35 +363,15 @@ def edit(
401363
zone_id: str,
402364
address: str,
403365
name: str,
404-
check_regions: Optional[
405-
List[
406-
Literal[
407-
"WNAM",
408-
"ENAM",
409-
"WEU",
410-
"EEU",
411-
"NSAM",
412-
"SSAM",
413-
"OC",
414-
"ME",
415-
"NAF",
416-
"SAF",
417-
"IN",
418-
"SEAS",
419-
"NEAS",
420-
"ALL_REGIONS",
421-
]
422-
]
423-
]
424-
| NotGiven = NOT_GIVEN,
366+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
425367
consecutive_fails: int | NotGiven = NOT_GIVEN,
426368
consecutive_successes: int | NotGiven = NOT_GIVEN,
427369
description: str | NotGiven = NOT_GIVEN,
428-
http_config: Optional[healthcheck_edit_params.HTTPConfig] | NotGiven = NOT_GIVEN,
370+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
429371
interval: int | NotGiven = NOT_GIVEN,
430372
retries: int | NotGiven = NOT_GIVEN,
431373
suspended: bool | NotGiven = NOT_GIVEN,
432-
tcp_config: Optional[healthcheck_edit_params.TcpConfig] | NotGiven = NOT_GIVEN,
374+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
433375
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
434376
type: str | NotGiven = NOT_GIVEN,
435377
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -587,35 +529,15 @@ async def create(
587529
zone_id: str,
588530
address: str,
589531
name: str,
590-
check_regions: Optional[
591-
List[
592-
Literal[
593-
"WNAM",
594-
"ENAM",
595-
"WEU",
596-
"EEU",
597-
"NSAM",
598-
"SSAM",
599-
"OC",
600-
"ME",
601-
"NAF",
602-
"SAF",
603-
"IN",
604-
"SEAS",
605-
"NEAS",
606-
"ALL_REGIONS",
607-
]
608-
]
609-
]
610-
| NotGiven = NOT_GIVEN,
532+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
611533
consecutive_fails: int | NotGiven = NOT_GIVEN,
612534
consecutive_successes: int | NotGiven = NOT_GIVEN,
613535
description: str | NotGiven = NOT_GIVEN,
614-
http_config: Optional[healthcheck_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
536+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
615537
interval: int | NotGiven = NOT_GIVEN,
616538
retries: int | NotGiven = NOT_GIVEN,
617539
suspended: bool | NotGiven = NOT_GIVEN,
618-
tcp_config: Optional[healthcheck_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
540+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
619541
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
620542
type: str | NotGiven = NOT_GIVEN,
621543
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -712,35 +634,15 @@ async def update(
712634
zone_id: str,
713635
address: str,
714636
name: str,
715-
check_regions: Optional[
716-
List[
717-
Literal[
718-
"WNAM",
719-
"ENAM",
720-
"WEU",
721-
"EEU",
722-
"NSAM",
723-
"SSAM",
724-
"OC",
725-
"ME",
726-
"NAF",
727-
"SAF",
728-
"IN",
729-
"SEAS",
730-
"NEAS",
731-
"ALL_REGIONS",
732-
]
733-
]
734-
]
735-
| NotGiven = NOT_GIVEN,
637+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
736638
consecutive_fails: int | NotGiven = NOT_GIVEN,
737639
consecutive_successes: int | NotGiven = NOT_GIVEN,
738640
description: str | NotGiven = NOT_GIVEN,
739-
http_config: Optional[healthcheck_update_params.HTTPConfig] | NotGiven = NOT_GIVEN,
641+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
740642
interval: int | NotGiven = NOT_GIVEN,
741643
retries: int | NotGiven = NOT_GIVEN,
742644
suspended: bool | NotGiven = NOT_GIVEN,
743-
tcp_config: Optional[healthcheck_update_params.TcpConfig] | NotGiven = NOT_GIVEN,
645+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
744646
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
745647
type: str | NotGiven = NOT_GIVEN,
746648
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -923,35 +825,15 @@ async def edit(
923825
zone_id: str,
924826
address: str,
925827
name: str,
926-
check_regions: Optional[
927-
List[
928-
Literal[
929-
"WNAM",
930-
"ENAM",
931-
"WEU",
932-
"EEU",
933-
"NSAM",
934-
"SSAM",
935-
"OC",
936-
"ME",
937-
"NAF",
938-
"SAF",
939-
"IN",
940-
"SEAS",
941-
"NEAS",
942-
"ALL_REGIONS",
943-
]
944-
]
945-
]
946-
| NotGiven = NOT_GIVEN,
828+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
947829
consecutive_fails: int | NotGiven = NOT_GIVEN,
948830
consecutive_successes: int | NotGiven = NOT_GIVEN,
949831
description: str | NotGiven = NOT_GIVEN,
950-
http_config: Optional[healthcheck_edit_params.HTTPConfig] | NotGiven = NOT_GIVEN,
832+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
951833
interval: int | NotGiven = NOT_GIVEN,
952834
retries: int | NotGiven = NOT_GIVEN,
953835
suspended: bool | NotGiven = NOT_GIVEN,
954-
tcp_config: Optional[healthcheck_edit_params.TcpConfig] | NotGiven = NOT_GIVEN,
836+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
955837
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
956838
type: str | NotGiven = NOT_GIVEN,
957839
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/cloudflare/resources/healthchecks/previews.py

+12-49
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
from __future__ import annotations
44

55
from typing import List, Type, Optional, cast
6-
from typing_extensions import Literal
76

87
import httpx
98

10-
from ...types import Healthcheck
9+
from ...types import (
10+
Healthcheck,
11+
TcpConfigurationParam,
12+
HTTPConfigurationParam,
13+
)
1114
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1215
from ..._utils import (
1316
maybe_transform,
@@ -25,7 +28,7 @@
2528
from ..._base_client import (
2629
make_request_options,
2730
)
28-
from ...types.healthchecks import PreviewDeleteResponse, preview_create_params, preview_delete_params
31+
from ...types.healthchecks import CheckRegionItem, PreviewDeleteResponse, preview_create_params, preview_delete_params
2932

3033
__all__ = ["Previews", "AsyncPreviews"]
3134

@@ -45,35 +48,15 @@ def create(
4548
zone_id: str,
4649
address: str,
4750
name: str,
48-
check_regions: Optional[
49-
List[
50-
Literal[
51-
"WNAM",
52-
"ENAM",
53-
"WEU",
54-
"EEU",
55-
"NSAM",
56-
"SSAM",
57-
"OC",
58-
"ME",
59-
"NAF",
60-
"SAF",
61-
"IN",
62-
"SEAS",
63-
"NEAS",
64-
"ALL_REGIONS",
65-
]
66-
]
67-
]
68-
| NotGiven = NOT_GIVEN,
51+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
6952
consecutive_fails: int | NotGiven = NOT_GIVEN,
7053
consecutive_successes: int | NotGiven = NOT_GIVEN,
7154
description: str | NotGiven = NOT_GIVEN,
72-
http_config: Optional[preview_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
55+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
7356
interval: int | NotGiven = NOT_GIVEN,
7457
retries: int | NotGiven = NOT_GIVEN,
7558
suspended: bool | NotGiven = NOT_GIVEN,
76-
tcp_config: Optional[preview_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
59+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
7760
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
7861
type: str | NotGiven = NOT_GIVEN,
7962
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -269,35 +252,15 @@ async def create(
269252
zone_id: str,
270253
address: str,
271254
name: str,
272-
check_regions: Optional[
273-
List[
274-
Literal[
275-
"WNAM",
276-
"ENAM",
277-
"WEU",
278-
"EEU",
279-
"NSAM",
280-
"SSAM",
281-
"OC",
282-
"ME",
283-
"NAF",
284-
"SAF",
285-
"IN",
286-
"SEAS",
287-
"NEAS",
288-
"ALL_REGIONS",
289-
]
290-
]
291-
]
292-
| NotGiven = NOT_GIVEN,
255+
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
293256
consecutive_fails: int | NotGiven = NOT_GIVEN,
294257
consecutive_successes: int | NotGiven = NOT_GIVEN,
295258
description: str | NotGiven = NOT_GIVEN,
296-
http_config: Optional[preview_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
259+
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
297260
interval: int | NotGiven = NOT_GIVEN,
298261
retries: int | NotGiven = NOT_GIVEN,
299262
suspended: bool | NotGiven = NOT_GIVEN,
300-
tcp_config: Optional[preview_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
263+
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
301264
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
302265
type: str | NotGiven = NOT_GIVEN,
303266
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

0 commit comments

Comments
 (0)