Skip to content

Commit 4e63fa0

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1200)
1 parent cd6be1a commit 4e63fa0

File tree

12 files changed

+353
-13
lines changed

12 files changed

+353
-13
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1258
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ac180c47ed9fe592a3b6dd8635623b4419a73968e580eacd342734e0a383fb7.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90a35461612450a99cbc7456efed147532b3bbd683a18535b759d9c02742c835.yml

src/cloudflare/resources/zero_trust/gateway/certificates.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ def delete(
130130
extra_body: Body | None = None,
131131
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
132132
) -> Optional[CertificateDeleteResponse]:
133-
"""
134-
Deletes a gateway-managed Zero Trust certificate.
133+
"""Deletes a gateway-managed Zero Trust certificate.
134+
135+
A certificate must be
136+
deactivated from the edge (inactive) before it is deleted.
135137
136138
Args:
137139
certificate_id: Certificate UUID tag.
@@ -302,8 +304,10 @@ async def delete(
302304
extra_body: Body | None = None,
303305
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
304306
) -> Optional[CertificateDeleteResponse]:
305-
"""
306-
Deletes a gateway-managed Zero Trust certificate.
307+
"""Deletes a gateway-managed Zero Trust certificate.
308+
309+
A certificate must be
310+
deactivated from the edge (inactive) before it is deleted.
307311
308312
Args:
309313
certificate_id: Certificate UUID tag.

src/cloudflare/resources/zero_trust/gateway/locations.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def create(
4646
client_default: bool | NotGiven = NOT_GIVEN,
4747
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
4848
ecs_support: bool | NotGiven = NOT_GIVEN,
49+
endpoints: location_create_params.Endpoints | NotGiven = NOT_GIVEN,
4950
networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN,
5051
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5152
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -70,6 +71,10 @@ def create(
7071
7172
ecs_support: True if the location needs to resolve EDNS queries.
7273
74+
endpoints: The destination endpoints configured for this location. When updating a
75+
location, if this field is absent or set with null, the endpoints configuration
76+
remains unchanged.
77+
7378
networks: A list of network ranges that requests from this location would originate from.
7479
A non-empty list is only effective if the ipv4 endpoint is enabled for this
7580
location.
@@ -92,6 +97,7 @@ def create(
9297
"client_default": client_default,
9398
"dns_destination_ips_id": dns_destination_ips_id,
9499
"ecs_support": ecs_support,
100+
"endpoints": endpoints,
95101
"networks": networks,
96102
},
97103
location_create_params.LocationCreateParams,
@@ -115,6 +121,7 @@ def update(
115121
client_default: bool | NotGiven = NOT_GIVEN,
116122
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
117123
ecs_support: bool | NotGiven = NOT_GIVEN,
124+
endpoints: location_update_params.Endpoints | NotGiven = NOT_GIVEN,
118125
networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN,
119126
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120127
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -139,6 +146,10 @@ def update(
139146
140147
ecs_support: True if the location needs to resolve EDNS queries.
141148
149+
endpoints: The destination endpoints configured for this location. When updating a
150+
location, if this field is absent or set with null, the endpoints configuration
151+
remains unchanged.
152+
142153
networks: A list of network ranges that requests from this location would originate from.
143154
A non-empty list is only effective if the ipv4 endpoint is enabled for this
144155
location.
@@ -163,6 +174,7 @@ def update(
163174
"client_default": client_default,
164175
"dns_destination_ips_id": dns_destination_ips_id,
165176
"ecs_support": ecs_support,
177+
"endpoints": endpoints,
166178
"networks": networks,
167179
},
168180
location_update_params.LocationUpdateParams,
@@ -314,6 +326,7 @@ async def create(
314326
client_default: bool | NotGiven = NOT_GIVEN,
315327
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
316328
ecs_support: bool | NotGiven = NOT_GIVEN,
329+
endpoints: location_create_params.Endpoints | NotGiven = NOT_GIVEN,
317330
networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN,
318331
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
319332
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -338,6 +351,10 @@ async def create(
338351
339352
ecs_support: True if the location needs to resolve EDNS queries.
340353
354+
endpoints: The destination endpoints configured for this location. When updating a
355+
location, if this field is absent or set with null, the endpoints configuration
356+
remains unchanged.
357+
341358
networks: A list of network ranges that requests from this location would originate from.
342359
A non-empty list is only effective if the ipv4 endpoint is enabled for this
343360
location.
@@ -360,6 +377,7 @@ async def create(
360377
"client_default": client_default,
361378
"dns_destination_ips_id": dns_destination_ips_id,
362379
"ecs_support": ecs_support,
380+
"endpoints": endpoints,
363381
"networks": networks,
364382
},
365383
location_create_params.LocationCreateParams,
@@ -383,6 +401,7 @@ async def update(
383401
client_default: bool | NotGiven = NOT_GIVEN,
384402
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
385403
ecs_support: bool | NotGiven = NOT_GIVEN,
404+
endpoints: location_update_params.Endpoints | NotGiven = NOT_GIVEN,
386405
networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN,
387406
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
388407
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -407,6 +426,10 @@ async def update(
407426
408427
ecs_support: True if the location needs to resolve EDNS queries.
409428
429+
endpoints: The destination endpoints configured for this location. When updating a
430+
location, if this field is absent or set with null, the endpoints configuration
431+
remains unchanged.
432+
410433
networks: A list of network ranges that requests from this location would originate from.
411434
A non-empty list is only effective if the ipv4 endpoint is enabled for this
412435
location.
@@ -431,6 +454,7 @@ async def update(
431454
"client_default": client_default,
432455
"dns_destination_ips_id": dns_destination_ips_id,
433456
"ecs_support": ecs_support,
457+
"endpoints": endpoints,
434458
"networks": networks,
435459
},
436460
location_update_params.LocationUpdateParams,

src/cloudflare/types/zero_trust/gateway/certificate_create_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class CertificateCreateResponse(BaseModel):
1414
"""Certificate UUID tag."""
1515

1616
binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
17-
"""The deployment status of the certificate on Cloudflare's edge."""
17+
"""The deployment status of the certificate on Cloudflare's edge.
18+
19+
Certificates in the 'active' state may be used for Gateway TLS interception.
20+
"""
1821

1922
created_at: Optional[datetime] = None
2023

src/cloudflare/types/zero_trust/gateway/certificate_delete_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class CertificateDeleteResponse(BaseModel):
1414
"""Certificate UUID tag."""
1515

1616
binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
17-
"""The deployment status of the certificate on Cloudflare's edge."""
17+
"""The deployment status of the certificate on Cloudflare's edge.
18+
19+
Certificates in the 'active' state may be used for Gateway TLS interception.
20+
"""
1821

1922
created_at: Optional[datetime] = None
2023

src/cloudflare/types/zero_trust/gateway/certificate_get_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class CertificateGetResponse(BaseModel):
1414
"""Certificate UUID tag."""
1515

1616
binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
17-
"""The deployment status of the certificate on Cloudflare's edge."""
17+
"""The deployment status of the certificate on Cloudflare's edge.
18+
19+
Certificates in the 'active' state may be used for Gateway TLS interception.
20+
"""
1821

1922
created_at: Optional[datetime] = None
2023

src/cloudflare/types/zero_trust/gateway/certificate_list_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class CertificateListResponse(BaseModel):
1414
"""Certificate UUID tag."""
1515

1616
binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
17-
"""The deployment status of the certificate on Cloudflare's edge."""
17+
"""The deployment status of the certificate on Cloudflare's edge.
18+
19+
Certificates in the 'active' state may be used for Gateway TLS interception.
20+
"""
1821

1922
created_at: Optional[datetime] = None
2023

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919

2020
class Certificate(BaseModel):
2121
id: str
22-
"""UUID of certificate to be used for interception."""
22+
"""UUID of certificate to be used for interception.
23+
24+
Certificate must be active on the edge.
25+
"""
2326

2427

2528
class GatewayConfigurationSettings(BaseModel):

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020

2121
class Certificate(TypedDict, total=False):
2222
id: Required[str]
23-
"""UUID of certificate to be used for interception."""
23+
"""UUID of certificate to be used for interception.
24+
25+
Certificate must be active on the edge.
26+
"""
2427

2528

2629
class GatewayConfigurationSettingsParam(TypedDict, total=False):

src/cloudflare/types/zero_trust/gateway/location_create_params.py

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

8-
__all__ = ["LocationCreateParams", "Network"]
8+
__all__ = [
9+
"LocationCreateParams",
10+
"Endpoints",
11+
"EndpointsDOH",
12+
"EndpointsDOHNetwork",
13+
"EndpointsDOT",
14+
"EndpointsDOTNetwork",
15+
"EndpointsIPV4",
16+
"EndpointsIPV6",
17+
"EndpointsIPV6Network",
18+
"Network",
19+
]
920

1021

1122
class LocationCreateParams(TypedDict, total=False):
@@ -29,6 +40,13 @@ class LocationCreateParams(TypedDict, total=False):
2940
ecs_support: bool
3041
"""True if the location needs to resolve EDNS queries."""
3142

43+
endpoints: Endpoints
44+
"""The destination endpoints configured for this location.
45+
46+
When updating a location, if this field is absent or set with null, the
47+
endpoints configuration remains unchanged.
48+
"""
49+
3250
networks: Iterable[Network]
3351
"""A list of network ranges that requests from this location would originate from.
3452
@@ -37,6 +55,79 @@ class LocationCreateParams(TypedDict, total=False):
3755
"""
3856

3957

58+
class EndpointsDOHNetwork(TypedDict, total=False):
59+
network: Required[str]
60+
"""The IP address or IP CIDR."""
61+
62+
63+
class EndpointsDOH(TypedDict, total=False):
64+
enabled: bool
65+
"""True if the endpoint is enabled for this location."""
66+
67+
networks: Iterable[EndpointsDOHNetwork]
68+
"""A list of allowed source IP network ranges for this endpoint.
69+
70+
When empty, all source IPs are allowed. A non-empty list is only effective if
71+
the endpoint is enabled for this location.
72+
"""
73+
74+
require_token: bool
75+
"""
76+
True if the endpoint requires
77+
[user identity](https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/agentless/dns/dns-over-https/#filter-doh-requests-by-user)
78+
authentication.
79+
"""
80+
81+
82+
class EndpointsDOTNetwork(TypedDict, total=False):
83+
network: Required[str]
84+
"""The IP address or IP CIDR."""
85+
86+
87+
class EndpointsDOT(TypedDict, total=False):
88+
enabled: bool
89+
"""True if the endpoint is enabled for this location."""
90+
91+
networks: Iterable[EndpointsDOTNetwork]
92+
"""A list of allowed source IP network ranges for this endpoint.
93+
94+
When empty, all source IPs are allowed. A non-empty list is only effective if
95+
the endpoint is enabled for this location.
96+
"""
97+
98+
99+
class EndpointsIPV4(TypedDict, total=False):
100+
enabled: bool
101+
"""True if the endpoint is enabled for this location."""
102+
103+
104+
class EndpointsIPV6Network(TypedDict, total=False):
105+
network: Required[str]
106+
"""The IPv6 address or IPv6 CIDR."""
107+
108+
109+
class EndpointsIPV6(TypedDict, total=False):
110+
enabled: bool
111+
"""True if the endpoint is enabled for this location."""
112+
113+
networks: Iterable[EndpointsIPV6Network]
114+
"""A list of allowed source IPv6 network ranges for this endpoint.
115+
116+
When empty, all source IPs are allowed. A non-empty list is only effective if
117+
the endpoint is enabled for this location.
118+
"""
119+
120+
121+
class Endpoints(TypedDict, total=False):
122+
doh: EndpointsDOH
123+
124+
dot: EndpointsDOT
125+
126+
ipv4: EndpointsIPV4
127+
128+
ipv6: EndpointsIPV6
129+
130+
40131
class Network(TypedDict, total=False):
41132
network: Required[str]
42133
"""The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24."""

0 commit comments

Comments
 (0)