Skip to content

Commit 1384b2c

Browse files
authored
Merge pull request #2714 from cloudflare/release-please--branches--main--changes--next
release: 5.1.0
2 parents 0b8edd4 + 0036f16 commit 1384b2c

72 files changed

Lines changed: 3994 additions & 282 deletions

File tree

Some content is hidden

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

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.0.0"
2+
".": "5.1.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2195
1+
configured_endpoints: 2204
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: aa452e4dfaec546a7e50ef8665bd39f4
4-
config_hash: d3379006654eb5479a62d9576648acc5
3+
openapi_spec_hash: e722ad1f58e3dfb3a928cf9890d48da4
4+
config_hash: ff549978909de2badc92845fea964f4b

CHANGELOG-v5.0.0-beta.2.md

Lines changed: 0 additions & 177 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
11
# Changelog
22

3+
## 5.1.0 (2026-05-06)
4+
5+
Full Changelog: [v5.0.0...v5.1.0](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0...v5.1.0)
6+
7+
### Features
8+
9+
* **security_center:** add `audit_logs`, `classification`, and `context` sub-resources to insights ([ed7d261](https://github.com/cloudflare/cloudflare-python/commit/ed7d261e6))
10+
* **zero_trust:** add `deployment_groups` sub-resource to devices ([7121a55](https://github.com/cloudflare/cloudflare-python/commit/7121a55d3))
11+
* **aisearch:** update generated types and methods ([54b87759](https://github.com/cloudflare/cloudflare-python/commit/54b87759b))
12+
* **email_security:** update generated types and methods ([23a979df](https://github.com/cloudflare/cloudflare-python/commit/23a979df2))
13+
* **radar:** update generated types and methods ([b48274ef](https://github.com/cloudflare/cloudflare-python/commit/b48274ef7))
14+
* **zones:** update generated types and methods ([f0a54099](https://github.com/cloudflare/cloudflare-python/commit/f0a540997))
15+
16+
#### Security Center - New Insights Sub-Resources
17+
18+
**AuditLogs** (`client.security_center.insights.audit_logs`)
19+
20+
- `list(*, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListResponse]`
21+
- `list_by_insight(issue_id, *, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListByInsightResponse]`
22+
23+
New types:
24+
```python
25+
from cloudflare.types.security_center.insights import (
26+
AuditLogListResponse,
27+
AuditLogListByInsightResponse,
28+
)
29+
```
30+
31+
**Classification** (`client.security_center.insights.classification`)
32+
33+
- `update(issue_id, *, account_id, zone_id, **params) -> ClassificationUpdateResponse`
34+
35+
New types:
36+
```python
37+
from cloudflare.types.security_center.insights import ClassificationUpdateResponse
38+
```
39+
40+
**Context** (`client.security_center.insights.context`)
41+
42+
- `get(issue_id, *, account_id) -> Optional[ContextGetResponse]`
43+
44+
New types:
45+
```python
46+
from cloudflare.types.security_center.insights import ContextGetResponse
47+
```
48+
49+
#### Zero Trust - Device Deployment Groups
50+
51+
New sub-resource `client.zero_trust.devices.deployment_groups`:
52+
53+
- `create(*, account_id, **params) -> DeploymentGroup`
54+
- `list(*, account_id, **params) -> SyncV4PagePaginationArray[DeploymentGroup]`
55+
- `delete(group_id, *, account_id) -> DeploymentGroupDeleteResponse`
56+
- `edit(group_id, *, account_id, **params) -> DeploymentGroup`
57+
- `get(group_id, *, account_id) -> DeploymentGroup`
58+
59+
New types:
60+
```python
61+
from cloudflare.types.zero_trust.devices import DeploymentGroup, DeploymentGroupDeleteResponse
62+
```
63+
364
## 5.0.0 (2026-04-30)
465

566
Full Changelog: [v4.3.1...v5.0.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cloudflare"
3-
version = "5.0.0"
3+
version = "5.1.0"
44
description = "The official Python library for the cloudflare API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/cloudflare/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "cloudflare"
4-
__version__ = "5.0.0" # x-release-please-version
4+
__version__ = "5.1.0" # x-release-please-version

src/cloudflare/resources/aisearch/instances/instances.py

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def create(
115115
cache: bool | Omit = omit,
116116
cache_threshold: Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]
117117
| Omit = omit,
118+
cache_ttl: Literal[600, 1800, 3600, 7200, 21600, 43200, 86400, 172800, 259200, 518400] | Omit = omit,
118119
chunk: bool | Omit = omit,
119120
chunk_overlap: int | Omit = omit,
120121
chunk_size: int | Omit = omit,
@@ -199,6 +200,10 @@ def create(
199200
200201
Lowercase alphanumeric, hyphens, and underscores.
201202
203+
cache_ttl: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
204+
(1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
205+
(72h), 518400 (6d).
206+
202207
hybrid_search_enabled: Deprecated — use index_method instead.
203208
204209
index_method: Controls which storage backends are used during indexing. Defaults to
@@ -226,6 +231,7 @@ def create(
226231
"aisearch_model": aisearch_model,
227232
"cache": cache,
228233
"cache_threshold": cache_threshold,
234+
"cache_ttl": cache_ttl,
229235
"chunk": chunk,
230236
"chunk_overlap": chunk_overlap,
231237
"chunk_size": chunk_size,
@@ -306,6 +312,7 @@ def update(
306312
cache: bool | Omit = omit,
307313
cache_threshold: Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]
308314
| Omit = omit,
315+
cache_ttl: Literal[600, 1800, 3600, 7200, 21600, 43200, 86400, 172800, 259200, 518400] | Omit = omit,
309316
chunk: bool | Omit = omit,
310317
chunk_overlap: int | Omit = omit,
311318
chunk_size: int | Omit = omit,
@@ -420,10 +427,15 @@ def update(
420427
extra_body: Body | None = None,
421428
timeout: float | httpx.Timeout | None | NotGiven = not_given,
422429
) -> InstanceUpdateResponse:
423-
"""
424-
Update instance.
430+
"""Update instance.
425431
426432
Args:
433+
cache_ttl: Cache entry TTL in seconds.
434+
435+
Allowed values: 600 (10min), 1800 (30min), 3600
436+
(1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
437+
(72h), 518400 (6d).
438+
427439
index_method: Controls which storage backends are used during indexing. Defaults to
428440
vector-only.
429441
@@ -450,6 +462,7 @@ def update(
450462
"aisearch_model": aisearch_model,
451463
"cache": cache,
452464
"cache_threshold": cache_threshold,
465+
"cache_ttl": cache_ttl,
453466
"chunk": chunk,
454467
"chunk_overlap": chunk_overlap,
455468
"chunk_size": chunk_size,
@@ -889,6 +902,7 @@ async def create(
889902
cache: bool | Omit = omit,
890903
cache_threshold: Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]
891904
| Omit = omit,
905+
cache_ttl: Literal[600, 1800, 3600, 7200, 21600, 43200, 86400, 172800, 259200, 518400] | Omit = omit,
892906
chunk: bool | Omit = omit,
893907
chunk_overlap: int | Omit = omit,
894908
chunk_size: int | Omit = omit,
@@ -973,6 +987,10 @@ async def create(
973987
974988
Lowercase alphanumeric, hyphens, and underscores.
975989
990+
cache_ttl: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
991+
(1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
992+
(72h), 518400 (6d).
993+
976994
hybrid_search_enabled: Deprecated — use index_method instead.
977995
978996
index_method: Controls which storage backends are used during indexing. Defaults to
@@ -1000,6 +1018,7 @@ async def create(
10001018
"aisearch_model": aisearch_model,
10011019
"cache": cache,
10021020
"cache_threshold": cache_threshold,
1021+
"cache_ttl": cache_ttl,
10031022
"chunk": chunk,
10041023
"chunk_overlap": chunk_overlap,
10051024
"chunk_size": chunk_size,
@@ -1080,6 +1099,7 @@ async def update(
10801099
cache: bool | Omit = omit,
10811100
cache_threshold: Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]
10821101
| Omit = omit,
1102+
cache_ttl: Literal[600, 1800, 3600, 7200, 21600, 43200, 86400, 172800, 259200, 518400] | Omit = omit,
10831103
chunk: bool | Omit = omit,
10841104
chunk_overlap: int | Omit = omit,
10851105
chunk_size: int | Omit = omit,
@@ -1194,10 +1214,15 @@ async def update(
11941214
extra_body: Body | None = None,
11951215
timeout: float | httpx.Timeout | None | NotGiven = not_given,
11961216
) -> InstanceUpdateResponse:
1197-
"""
1198-
Update instance.
1217+
"""Update instance.
11991218
12001219
Args:
1220+
cache_ttl: Cache entry TTL in seconds.
1221+
1222+
Allowed values: 600 (10min), 1800 (30min), 3600
1223+
(1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
1224+
(72h), 518400 (6d).
1225+
12011226
index_method: Controls which storage backends are used during indexing. Defaults to
12021227
vector-only.
12031228
@@ -1224,6 +1249,7 @@ async def update(
12241249
"aisearch_model": aisearch_model,
12251250
"cache": cache,
12261251
"cache_threshold": cache_threshold,
1252+
"cache_ttl": cache_ttl,
12271253
"chunk": chunk,
12281254
"chunk_overlap": chunk_overlap,
12291255
"chunk_size": chunk_size,

0 commit comments

Comments
 (0)