Skip to content

Commit 556c393

Browse files
feat(api): api update
1 parent 938848f commit 556c393

File tree

11 files changed

+34
-323
lines changed

11 files changed

+34
-323
lines changed

.stats.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1713
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-27adcd4b160b0701a34b49d045d624f5a88fd893bbdebc363433ede03b31758f.yml
3-
openapi_spec_hash: f0a1bfe65b921a255db4b01b1149e550
1+
configured_endpoints: 1712
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02cb7bd8a1baed68b87e707819810166d401aa56e91a9725fe7f0db76d810f82.yml
3+
openapi_spec_hash: 4e8d05399b256732a2d70c35c4950c56
44
config_hash: 4a6de620bf46745e17466ceac26f41d4

api.md

-6
Original file line numberDiff line numberDiff line change
@@ -6642,12 +6642,6 @@ Methods:
66426642
- <code title="patch /accounts/{account_id}/gateway/configuration">client.zero_trust.gateway.configurations.<a href="./src/cloudflare/resources/zero_trust/gateway/configurations/configurations.py">edit</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/gateway/configuration_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/gateway/configuration_edit_response.py">Optional[ConfigurationEditResponse]</a></code>
66436643
- <code title="get /accounts/{account_id}/gateway/configuration">client.zero_trust.gateway.configurations.<a href="./src/cloudflare/resources/zero_trust/gateway/configurations/configurations.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/gateway/configuration_get_response.py">Optional[ConfigurationGetResponse]</a></code>
66446644

6645-
#### CustomCertificate
6646-
6647-
Methods:
6648-
6649-
- <code title="get /accounts/{account_id}/gateway/configuration/custom_certificate">client.zero_trust.gateway.configurations.custom_certificate.<a href="./src/cloudflare/resources/zero_trust/gateway/configurations/custom_certificate.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/gateway/custom_certificate_settings.py">Optional[CustomCertificateSettings]</a></code>
6650-
66516645
### Lists
66526646

66536647
Types:

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def create(
7171
7272
Args:
7373
validity_period_days: Number of days the generated certificate will be valid, minimum 1 day and
74-
maximum 30 years. Defaults to 5 years.
74+
maximum 30 years. Defaults to 5 years. In terraform, validity_period_days can
75+
only be used while creating a certificate, and this CAN NOT be used to extend
76+
the validity of an already generated certificate.
7577
7678
extra_headers: Send extra headers
7779
@@ -344,7 +346,9 @@ async def create(
344346
345347
Args:
346348
validity_period_days: Number of days the generated certificate will be valid, minimum 1 day and
347-
maximum 30 years. Defaults to 5 years.
349+
maximum 30 years. Defaults to 5 years. In terraform, validity_period_days can
350+
only be used while creating a certificate, and this CAN NOT be used to extend
351+
the validity of an already generated certificate.
348352
349353
extra_headers: Send extra headers
350354

src/cloudflare/resources/zero_trust/gateway/configurations/__init__.py

-14
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@
88
ConfigurationsResourceWithStreamingResponse,
99
AsyncConfigurationsResourceWithStreamingResponse,
1010
)
11-
from .custom_certificate import (
12-
CustomCertificateResource,
13-
AsyncCustomCertificateResource,
14-
CustomCertificateResourceWithRawResponse,
15-
AsyncCustomCertificateResourceWithRawResponse,
16-
CustomCertificateResourceWithStreamingResponse,
17-
AsyncCustomCertificateResourceWithStreamingResponse,
18-
)
1911

2012
__all__ = [
21-
"CustomCertificateResource",
22-
"AsyncCustomCertificateResource",
23-
"CustomCertificateResourceWithRawResponse",
24-
"AsyncCustomCertificateResourceWithRawResponse",
25-
"CustomCertificateResourceWithStreamingResponse",
26-
"AsyncCustomCertificateResourceWithStreamingResponse",
2713
"ConfigurationsResource",
2814
"AsyncConfigurationsResource",
2915
"ConfigurationsResourceWithRawResponse",

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

-32
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
)
1919
from ....._wrappers import ResultWrapper
2020
from ....._base_client import make_request_options
21-
from .custom_certificate import (
22-
CustomCertificateResource,
23-
AsyncCustomCertificateResource,
24-
CustomCertificateResourceWithRawResponse,
25-
AsyncCustomCertificateResourceWithRawResponse,
26-
CustomCertificateResourceWithStreamingResponse,
27-
AsyncCustomCertificateResourceWithStreamingResponse,
28-
)
2921
from .....types.zero_trust.gateway import (
3022
configuration_edit_params,
3123
configuration_update_params,
@@ -39,10 +31,6 @@
3931

4032

4133
class ConfigurationsResource(SyncAPIResource):
42-
@cached_property
43-
def custom_certificate(self) -> CustomCertificateResource:
44-
return CustomCertificateResource(self._client)
45-
4634
@cached_property
4735
def with_raw_response(self) -> ConfigurationsResourceWithRawResponse:
4836
"""
@@ -188,10 +176,6 @@ def get(
188176

189177

190178
class AsyncConfigurationsResource(AsyncAPIResource):
191-
@cached_property
192-
def custom_certificate(self) -> AsyncCustomCertificateResource:
193-
return AsyncCustomCertificateResource(self._client)
194-
195179
@cached_property
196180
def with_raw_response(self) -> AsyncConfigurationsResourceWithRawResponse:
197181
"""
@@ -352,10 +336,6 @@ def __init__(self, configurations: ConfigurationsResource) -> None:
352336
configurations.get,
353337
)
354338

355-
@cached_property
356-
def custom_certificate(self) -> CustomCertificateResourceWithRawResponse:
357-
return CustomCertificateResourceWithRawResponse(self._configurations.custom_certificate)
358-
359339

360340
class AsyncConfigurationsResourceWithRawResponse:
361341
def __init__(self, configurations: AsyncConfigurationsResource) -> None:
@@ -371,10 +351,6 @@ def __init__(self, configurations: AsyncConfigurationsResource) -> None:
371351
configurations.get,
372352
)
373353

374-
@cached_property
375-
def custom_certificate(self) -> AsyncCustomCertificateResourceWithRawResponse:
376-
return AsyncCustomCertificateResourceWithRawResponse(self._configurations.custom_certificate)
377-
378354

379355
class ConfigurationsResourceWithStreamingResponse:
380356
def __init__(self, configurations: ConfigurationsResource) -> None:
@@ -390,10 +366,6 @@ def __init__(self, configurations: ConfigurationsResource) -> None:
390366
configurations.get,
391367
)
392368

393-
@cached_property
394-
def custom_certificate(self) -> CustomCertificateResourceWithStreamingResponse:
395-
return CustomCertificateResourceWithStreamingResponse(self._configurations.custom_certificate)
396-
397369

398370
class AsyncConfigurationsResourceWithStreamingResponse:
399371
def __init__(self, configurations: AsyncConfigurationsResource) -> None:
@@ -408,7 +380,3 @@ def __init__(self, configurations: AsyncConfigurationsResource) -> None:
408380
self.get = async_to_streamed_response_wrapper(
409381
configurations.get,
410382
)
411-
412-
@cached_property
413-
def custom_certificate(self) -> AsyncCustomCertificateResourceWithStreamingResponse:
414-
return AsyncCustomCertificateResourceWithStreamingResponse(self._configurations.custom_certificate)

src/cloudflare/resources/zero_trust/gateway/configurations/custom_certificate.py

-165
This file was deleted.

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ class CertificateCreateParams(TypedDict, total=False):
1313
validity_period_days: int
1414
"""
1515
Number of days the generated certificate will be valid, minimum 1 day and
16-
maximum 30 years. Defaults to 5 years.
16+
maximum 30 years. Defaults to 5 years. In terraform, validity_period_days can
17+
only be used while creating a certificate, and this CAN NOT be used to extend
18+
the validity of an already generated certificate.
1719
"""

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .browser_isolation_settings import BrowserIsolationSettings
1616
from .custom_certificate_settings import CustomCertificateSettings
1717

18-
__all__ = ["GatewayConfigurationSettings", "Certificate", "Sandbox"]
18+
__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Sandbox"]
1919

2020

2121
class Certificate(BaseModel):
@@ -27,6 +27,11 @@ class Certificate(BaseModel):
2727
"""
2828

2929

30+
class HostSelector(BaseModel):
31+
enabled: Optional[bool] = None
32+
"""Enable filtering via hosts for egress policies."""
33+
34+
3035
class Sandbox(BaseModel):
3136
enabled: Optional[bool] = None
3237
"""Enable sandbox."""
@@ -69,6 +74,9 @@ class GatewayConfigurationSettings(BaseModel):
6974
fips: Optional[FipsSettings] = None
7075
"""FIPS settings."""
7176

77+
host_selector: Optional[HostSelector] = None
78+
"""Setting to enable host selector in egress policies."""
79+
7280
protocol_detection: Optional[ProtocolDetection] = None
7381
"""Protocol Detection settings."""
7482

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .browser_isolation_settings_param import BrowserIsolationSettingsParam
1717
from .custom_certificate_settings_param import CustomCertificateSettingsParam
1818

19-
__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "Sandbox"]
19+
__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Sandbox"]
2020

2121

2222
class Certificate(TypedDict, total=False):
@@ -28,6 +28,11 @@ class Certificate(TypedDict, total=False):
2828
"""
2929

3030

31+
class HostSelector(TypedDict, total=False):
32+
enabled: bool
33+
"""Enable filtering via hosts for egress policies."""
34+
35+
3136
class Sandbox(TypedDict, total=False):
3237
enabled: bool
3338
"""Enable sandbox."""
@@ -70,6 +75,9 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
7075
fips: Optional[FipsSettingsParam]
7176
"""FIPS settings."""
7277

78+
host_selector: Optional[HostSelector]
79+
"""Setting to enable host selector in egress policies."""
80+
7381
protocol_detection: Optional[ProtocolDetectionParam]
7482
"""Protocol Detection settings."""
7583

0 commit comments

Comments
 (0)