diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index ac9a2e75218..ff261bad783 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
USER vscode
-RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash
+RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
ENV PATH=/home/vscode/.rye/shims:$PATH
-RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc
+RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index bbeb30b148c..c17fdc169fc 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -24,6 +24,9 @@
}
}
}
+ },
+ "features": {
+ "ghcr.io/devcontainers/features/node:1": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d8463e3a020..a2426e86d82 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
- RYE_VERSION: '0.35.0'
+ RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Install dependencies
@@ -35,6 +35,7 @@ jobs:
- name: Run lints
run: ./scripts/lint
+
test:
name: test
runs-on: ubuntu-latest
@@ -48,7 +49,7 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
- RYE_VERSION: '0.35.0'
+ RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Bootstrap
@@ -56,6 +57,7 @@ jobs:
- name: Run tests
run: ./scripts/test
+
examples:
name: examples
runs-on: ubuntu-latest
@@ -69,7 +71,7 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
- RYE_VERSION: '0.35.0'
+ RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Install dependencies
run: |
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
index 60c0cde4031..afdcd266e4b 100644
--- a/.github/workflows/publish-pypi.yml
+++ b/.github/workflows/publish-pypi.yml
@@ -21,7 +21,7 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
- RYE_VERSION: '0.35.0'
+ RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Publish to PyPI
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 127ac87b532..3b4c2d4ba94 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.0.0"
+ ".": "4.1.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 0858e86c2f0..025f3a2867d 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 1493
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d78f855257b55bbb80884f99c3802cae877968d140eed3557fcb2cdd5f937b3.yml
+configured_endpoints: 1655
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ed9f898b31619623e50d660d04beca50e44987bfd3eb3a6ff98d3bca2a9c569.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6de0b896cdb..9c1c116b532 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,95 @@
# Changelog
+## 4.1.0 (2025-03-18)
+
+Full Changelog: [v4.0.0...v4.1.0](https://github.com/cloudflare/cloudflare-python/compare/v4.0.0...v4.1.0)
+
+### Features
+
+* **ai_gateway:** add urls support ([#2539](https://github.com/cloudflare/cloudflare-python/issues/2539)) ([650366e](https://github.com/cloudflare/cloudflare-python/commit/650366eb7f562d7ff3f9cdcdc713a0dac4eef742))
+* **api:** api update ([#2472](https://github.com/cloudflare/cloudflare-python/issues/2472)) ([6b81c50](https://github.com/cloudflare/cloudflare-python/commit/6b81c502a95ebe8973614434039e87fbf7c59bcb))
+* **api:** api update ([#2473](https://github.com/cloudflare/cloudflare-python/issues/2473)) ([eb8ac49](https://github.com/cloudflare/cloudflare-python/commit/eb8ac49d7eed6aa5c5a6ff45aaa8b582013976ea))
+* **api:** api update ([#2474](https://github.com/cloudflare/cloudflare-python/issues/2474)) ([f7a03e2](https://github.com/cloudflare/cloudflare-python/commit/f7a03e224765a2162b5f74ab8ea36eef76fa7237))
+* **api:** api update ([#2476](https://github.com/cloudflare/cloudflare-python/issues/2476)) ([48bdd22](https://github.com/cloudflare/cloudflare-python/commit/48bdd220c6b7ab8ea54853cf6ef7862de9e89e56))
+* **api:** api update ([#2477](https://github.com/cloudflare/cloudflare-python/issues/2477)) ([da2ce0d](https://github.com/cloudflare/cloudflare-python/commit/da2ce0dcaf3806da245f6a9b040d8b5d17d992d3))
+* **api:** api update ([#2478](https://github.com/cloudflare/cloudflare-python/issues/2478)) ([94e997a](https://github.com/cloudflare/cloudflare-python/commit/94e997ac4f6ccf4eeb97726f67139790b6477a95))
+* **api:** api update ([#2479](https://github.com/cloudflare/cloudflare-python/issues/2479)) ([b49f05d](https://github.com/cloudflare/cloudflare-python/commit/b49f05d2186c4166171570236b639f7e77aabd2e))
+* **api:** api update ([#2480](https://github.com/cloudflare/cloudflare-python/issues/2480)) ([b27f1bb](https://github.com/cloudflare/cloudflare-python/commit/b27f1bbc27264c0fe8ee683052e0b698deb91a58))
+* **api:** api update ([#2489](https://github.com/cloudflare/cloudflare-python/issues/2489)) ([7f6d335](https://github.com/cloudflare/cloudflare-python/commit/7f6d33530f1cec482662ad53611ef62d63bcad25))
+* **api:** api update ([#2492](https://github.com/cloudflare/cloudflare-python/issues/2492)) ([12d3ff5](https://github.com/cloudflare/cloudflare-python/commit/12d3ff52795e5da6c30f90ce659f8d4d0bacab18))
+* **api:** api update ([#2493](https://github.com/cloudflare/cloudflare-python/issues/2493)) ([9061b65](https://github.com/cloudflare/cloudflare-python/commit/9061b659bcae3340e18e75eb8178e654a39361a0))
+* **api:** api update ([#2495](https://github.com/cloudflare/cloudflare-python/issues/2495)) ([28d11c6](https://github.com/cloudflare/cloudflare-python/commit/28d11c6027d2ff4546b4f48f929a1140da015740))
+* **api:** api update ([#2496](https://github.com/cloudflare/cloudflare-python/issues/2496)) ([538f71d](https://github.com/cloudflare/cloudflare-python/commit/538f71df81d2181e7724a73b86c181ce3f9b479d))
+* **api:** api update ([#2497](https://github.com/cloudflare/cloudflare-python/issues/2497)) ([e826a02](https://github.com/cloudflare/cloudflare-python/commit/e826a024ab9bad3105cde190ab1e8717ebda80bb))
+* **api:** api update ([#2500](https://github.com/cloudflare/cloudflare-python/issues/2500)) ([b8f02a0](https://github.com/cloudflare/cloudflare-python/commit/b8f02a087be93011eb24532eea5a4c5c0c61dbd1))
+* **api:** api update ([#2501](https://github.com/cloudflare/cloudflare-python/issues/2501)) ([b8b3891](https://github.com/cloudflare/cloudflare-python/commit/b8b3891a42db6f5a1631ceddf5ab581d224e0b40))
+* **api:** api update ([#2502](https://github.com/cloudflare/cloudflare-python/issues/2502)) ([345ac45](https://github.com/cloudflare/cloudflare-python/commit/345ac45b5700bc3d80005c61d716792e39fa4c99))
+* **api:** api update ([#2503](https://github.com/cloudflare/cloudflare-python/issues/2503)) ([80fdb8f](https://github.com/cloudflare/cloudflare-python/commit/80fdb8f78726e093afbfb6e966df4a5b74ded3c9))
+* **api:** api update ([#2516](https://github.com/cloudflare/cloudflare-python/issues/2516)) ([b6adc14](https://github.com/cloudflare/cloudflare-python/commit/b6adc142da1c6f6693c6c41ff3fde485aedd588d))
+* **api:** api update ([#2517](https://github.com/cloudflare/cloudflare-python/issues/2517)) ([401b717](https://github.com/cloudflare/cloudflare-python/commit/401b717505df1746f6ffbbf7f111e7c93e6fae4a))
+* **api:** api update ([#2518](https://github.com/cloudflare/cloudflare-python/issues/2518)) ([e1a2474](https://github.com/cloudflare/cloudflare-python/commit/e1a2474555a21af53b67e13be76d4c99dfbe4814))
+* **api:** api update ([#2520](https://github.com/cloudflare/cloudflare-python/issues/2520)) ([151a44a](https://github.com/cloudflare/cloudflare-python/commit/151a44a584d21d4acbf2459513c585ef937eb984))
+* **api:** api update ([#2522](https://github.com/cloudflare/cloudflare-python/issues/2522)) ([fc6d9d6](https://github.com/cloudflare/cloudflare-python/commit/fc6d9d6359390476e531499034ab114baeb1bcfe))
+* **api:** api update ([#2523](https://github.com/cloudflare/cloudflare-python/issues/2523)) ([43ebeee](https://github.com/cloudflare/cloudflare-python/commit/43ebeee56dea63a55d23665e70ae2a0391d9e66b))
+* **api:** api update ([#2528](https://github.com/cloudflare/cloudflare-python/issues/2528)) ([cc14467](https://github.com/cloudflare/cloudflare-python/commit/cc14467fce380ffe7d1baddb678415b319d48e22))
+* **api:** api update ([#2530](https://github.com/cloudflare/cloudflare-python/issues/2530)) ([4def3c7](https://github.com/cloudflare/cloudflare-python/commit/4def3c7bb1f0fa1189fb0d0e644f54e6453f27ad))
+* **api:** api update ([#2531](https://github.com/cloudflare/cloudflare-python/issues/2531)) ([4aef71e](https://github.com/cloudflare/cloudflare-python/commit/4aef71e490884d29a3e3d8f5cdd97101a464bc3b))
+* **api:** api update ([#2533](https://github.com/cloudflare/cloudflare-python/issues/2533)) ([d231762](https://github.com/cloudflare/cloudflare-python/commit/d23176293003e4788c907ff0417f5470aaa4a31b))
+* **api:** api update ([#2534](https://github.com/cloudflare/cloudflare-python/issues/2534)) ([6bae2c2](https://github.com/cloudflare/cloudflare-python/commit/6bae2c2223a2047270110c8d1cd934e69ef306a9))
+* **api:** api update ([#2535](https://github.com/cloudflare/cloudflare-python/issues/2535)) ([d3821d2](https://github.com/cloudflare/cloudflare-python/commit/d3821d225922bf8bae3484c498e440d4e90dc194))
+* **api:** api update ([#2537](https://github.com/cloudflare/cloudflare-python/issues/2537)) ([7cace87](https://github.com/cloudflare/cloudflare-python/commit/7cace874090689ada3ea6b099e7f304e6b7da6a1))
+* **api:** api update ([#2544](https://github.com/cloudflare/cloudflare-python/issues/2544)) ([7ea429d](https://github.com/cloudflare/cloudflare-python/commit/7ea429d47d7741d1062eded3374c25f6f5965868))
+* **api:** api update ([#2547](https://github.com/cloudflare/cloudflare-python/issues/2547)) ([7b0ce60](https://github.com/cloudflare/cloudflare-python/commit/7b0ce60f9a2ea2b7b7560cbc7da733247f31d63b))
+* **api:** api update ([#2549](https://github.com/cloudflare/cloudflare-python/issues/2549)) ([aca2b76](https://github.com/cloudflare/cloudflare-python/commit/aca2b76e0daa7bef7936aee794b9cbf173ac4e4d))
+* **api:** manual updates ([#2491](https://github.com/cloudflare/cloudflare-python/issues/2491)) ([e93ce12](https://github.com/cloudflare/cloudflare-python/commit/e93ce12a62dc48376a2fafba968a2eeff7f83345))
+* **api:** manual updates ([#2513](https://github.com/cloudflare/cloudflare-python/issues/2513)) ([71e522b](https://github.com/cloudflare/cloudflare-python/commit/71e522b756012338f5909c2644b18c62b430cc0f))
+* **api:** manual updates ([#2526](https://github.com/cloudflare/cloudflare-python/issues/2526)) ([f0b7af9](https://github.com/cloudflare/cloudflare-python/commit/f0b7af9d7cbad933520d3e50657d4762c2ca156d))
+* **api:** manual updates ([#2527](https://github.com/cloudflare/cloudflare-python/issues/2527)) ([aa892cc](https://github.com/cloudflare/cloudflare-python/commit/aa892cc55f7fb177521c2b2010bf760a9975c7cd))
+* **api:** rename browsing_rendering to browser_rendering ([#2488](https://github.com/cloudflare/cloudflare-python/issues/2488)) ([6b3425f](https://github.com/cloudflare/cloudflare-python/commit/6b3425fe978466d1536f77212c4ac36c93aa6105))
+* **browser_rendering:** move methods to top level ([#2490](https://github.com/cloudflare/cloudflare-python/issues/2490)) ([19e4cb0](https://github.com/cloudflare/cloudflare-python/commit/19e4cb01cff0811129fbac3e0f474f04532be483))
+* **browsing_rendering:** add support for subresources ([#2484](https://github.com/cloudflare/cloudflare-python/issues/2484)) ([6739a41](https://github.com/cloudflare/cloudflare-python/commit/6739a4123bcf82fe58143ac51e69f590be8c1822))
+* **cloudforce_one:** fix scans model ([#2504](https://github.com/cloudflare/cloudflare-python/issues/2504)) ([23e94c9](https://github.com/cloudflare/cloudflare-python/commit/23e94c9ee7ae82bc2931d077874a9a17dd8bfec3))
+* **dns_settings:** fix hierarchy ([#2514](https://github.com/cloudflare/cloudflare-python/issues/2514)) ([a95d254](https://github.com/cloudflare/cloudflare-python/commit/a95d254cf22932f9f22e3e27171ae7efe35e6abd))
+* **dns:** split account and zone DNS settings ([#2507](https://github.com/cloudflare/cloudflare-python/issues/2507)) ([6a80948](https://github.com/cloudflare/cloudflare-python/commit/6a809488ff2fd32ef13ad1dc37c1d9a052b79b98))
+* **internal:** group browser rendering ([#2508](https://github.com/cloudflare/cloudflare-python/issues/2508)) ([349e280](https://github.com/cloudflare/cloudflare-python/commit/349e280cd359544242e6c78cacce97f437cf9125))
+* **magic_cloud_networking:** add endpoint mappings ([#2550](https://github.com/cloudflare/cloudflare-python/issues/2550)) ([f0a6a21](https://github.com/cloudflare/cloudflare-python/commit/f0a6a21ceb592b32ea1079abfd42278f1da3d392))
+* **radar:** add compromised credential endpoints ([#2552](https://github.com/cloudflare/cloudflare-python/issues/2552)) ([99c9845](https://github.com/cloudflare/cloudflare-python/commit/99c9845e2548528a5ea0fc1099d3b5c39a165dae))
+* **radar:** add DNS endpoint ([#2487](https://github.com/cloudflare/cloudflare-python/issues/2487)) ([a5d4c51](https://github.com/cloudflare/cloudflare-python/commit/a5d4c51312ec12691f9fa4aa1e5ff3721d927d0a))
+* **threat_events:** fix create endpoint ([#2532](https://github.com/cloudflare/cloudflare-python/issues/2532)) ([0a45fe8](https://github.com/cloudflare/cloudflare-python/commit/0a45fe8002fa64e2dda4fb7e91badb43e0436bcc))
+* **threat_events:** shuffle endpoints from POST => PATCH ([#2525](https://github.com/cloudflare/cloudflare-python/issues/2525)) ([dc037a9](https://github.com/cloudflare/cloudflare-python/commit/dc037a9b9385fc979e11f64e5b576bef3d2a2d0a))
+* **vpc_flows:** add token support ([#2485](https://github.com/cloudflare/cloudflare-python/issues/2485)) ([904614f](https://github.com/cloudflare/cloudflare-python/commit/904614f85526fa63f3eee05532f6285c2c5d0cdd))
+* **waiting_rooms:** add account level list API ([#2524](https://github.com/cloudflare/cloudflare-python/issues/2524)) ([d10fb45](https://github.com/cloudflare/cloudflare-python/commit/d10fb45195b6b6d4b689bc5629877a7dee91a74b))
+* **workers:** add in secrets endpoints ([#2540](https://github.com/cloudflare/cloudflare-python/issues/2540)) ([0f3127d](https://github.com/cloudflare/cloudflare-python/commit/0f3127d57e8675a30f10caf8ba052651e5f75954))
+* **workflows:** add `bulk` support ([#2551](https://github.com/cloudflare/cloudflare-python/issues/2551)) ([45d91e2](https://github.com/cloudflare/cloudflare-python/commit/45d91e2a032aac5b4d1471027dbcd50e873dd0c8))
+
+
+### Bug Fixes
+
+* **api:** missing union discriminator naming ([#2548](https://github.com/cloudflare/cloudflare-python/issues/2548)) ([8c842a3](https://github.com/cloudflare/cloudflare-python/commit/8c842a3fc5e1fb641bb1cb279f5b143ed980bbed))
+* **ci:** ensure pip is always available ([#2543](https://github.com/cloudflare/cloudflare-python/issues/2543)) ([5ab256e](https://github.com/cloudflare/cloudflare-python/commit/5ab256eb4d93222012a808fde8a119a60a4a8bc3))
+* **ci:** remove publishing patch ([#2546](https://github.com/cloudflare/cloudflare-python/issues/2546)) ([2316376](https://github.com/cloudflare/cloudflare-python/commit/2316376a75b6a6ff41e1d1d7510206aa050ece09))
+* **internal:** remove port scans pending path fixes ([#2498](https://github.com/cloudflare/cloudflare-python/issues/2498)) ([f3c8131](https://github.com/cloudflare/cloudflare-python/commit/f3c81313a8878f84abdfcd6b6f9af48126ece4c5))
+* **r2_custom_domain:** update path placeholders to de-duplicate internal values ([#2506](https://github.com/cloudflare/cloudflare-python/issues/2506)) ([1288828](https://github.com/cloudflare/cloudflare-python/commit/1288828790c8cb3ddc38e81fb4e870406a0caab9))
+* **workers_for_platforms:** remove cyclic import due to model ([#2542](https://github.com/cloudflare/cloudflare-python/issues/2542)) ([7d9d338](https://github.com/cloudflare/cloudflare-python/commit/7d9d3381eacc52694d477b388165a26f77bde9b5))
+
+
+### Chores
+
+* **docs:** update client docstring ([#2483](https://github.com/cloudflare/cloudflare-python/issues/2483)) ([e98bd28](https://github.com/cloudflare/cloudflare-python/commit/e98bd2880f1f33083e0ce1e585bcaa635eda4176))
+* **internal:** bump rye to 0.44.0 ([#2536](https://github.com/cloudflare/cloudflare-python/issues/2536)) ([b1a4155](https://github.com/cloudflare/cloudflare-python/commit/b1a4155e83b067684f202159ad4b6f2b1d3c5283))
+* **internal:** codegen related update ([#2475](https://github.com/cloudflare/cloudflare-python/issues/2475)) ([329c314](https://github.com/cloudflare/cloudflare-python/commit/329c314d1756618ef5434817f1077173041a0ebc))
+* **internal:** codegen related update ([#2505](https://github.com/cloudflare/cloudflare-python/issues/2505)) ([ea4d061](https://github.com/cloudflare/cloudflare-python/commit/ea4d06178fa05d7907edd1d2869d566c80a1a567))
+* **internal:** codegen related update ([#2511](https://github.com/cloudflare/cloudflare-python/issues/2511)) ([d8e67ed](https://github.com/cloudflare/cloudflare-python/commit/d8e67ede7ad1363353b09e93d29951df62b87ed5))
+* **internal:** codegen related update ([#2512](https://github.com/cloudflare/cloudflare-python/issues/2512)) ([ee0fa76](https://github.com/cloudflare/cloudflare-python/commit/ee0fa7627138689a4115a9a54e3c504d9ef2d7a9))
+* **internal:** mark VPC and PDF as initialisms ([#2486](https://github.com/cloudflare/cloudflare-python/issues/2486)) ([f0b00be](https://github.com/cloudflare/cloudflare-python/commit/f0b00beeebe149cc989e6c398b5f9ccfd2dce33b))
+* **internal:** remove extra empty newlines ([#2529](https://github.com/cloudflare/cloudflare-python/issues/2529)) ([b1cabe6](https://github.com/cloudflare/cloudflare-python/commit/b1cabe63a9238d0e00cbde50b1a8d1843e26b03b))
+* **internal:** remove unused http client options forwarding ([#2494](https://github.com/cloudflare/cloudflare-python/issues/2494)) ([db37526](https://github.com/cloudflare/cloudflare-python/commit/db375269cd6e68fc5b184384d15f5290e6b63cb7))
+
+
+### Documentation
+
+* update URLs from stainlessapi.com to stainless.com ([#2481](https://github.com/cloudflare/cloudflare-python/issues/2481)) ([fe98b1d](https://github.com/cloudflare/cloudflare-python/commit/fe98b1da5bed21d62ff14cb1c84f8f89da4a03ac))
+
## 4.0.0 (2025-01-13)
Full Changelog: [v3.1.1...v4.0.0](https://github.com/cloudflare/cloudflare-python/compare/v3.1.1...v4.0.0)
diff --git a/README.md b/README.md
index ca473229f1c..44548f084d5 100644
--- a/README.md
+++ b/README.md
@@ -142,6 +142,42 @@ for account in first_page.result:
# Remove `await` for non-async usage.
```
+## Nested params
+
+Nested parameters are dictionaries, typed using `TypedDict`, for example:
+
+```python
+from cloudflare import Cloudflare
+
+client = Cloudflare()
+
+account = client.accounts.create(
+ name="name",
+ type="standard",
+ unit={"id": "f267e341f3dd4697bd3b9f71dd96247f"},
+)
+print(account.unit)
+```
+
+## File uploads
+
+Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
+
+```python
+from pathlib import Path
+from cloudflare import Cloudflare
+
+client = Cloudflare()
+
+client.api_gateway.user_schemas.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=Path("/path/to/file"),
+ kind="openapi_v3",
+)
+```
+
+The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
+
## Handling errors
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `cloudflare.APIConnectionError` is raised.
diff --git a/SECURITY.md b/SECURITY.md
index f04da23d126..0735c892994 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,3 +1,3 @@
# Reporting Security Vulnerabilities
-Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks!
\ No newline at end of file
+Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks!
diff --git a/api.md b/api.md
index 05082cde748..50bdbfeb44b 100644
--- a/api.md
+++ b/api.md
@@ -65,7 +65,7 @@ Methods:
Methods:
-- client.accounts.roles.list(\*, account_id) -> SyncSinglePage[Role]
+- client.accounts.roles.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Role]
- client.accounts.roles.get(role_id, \*, account_id) -> Optional[Role]
## Subscriptions
@@ -77,7 +77,6 @@ from cloudflare.types.accounts import (
SubscriptionCreateResponse,
SubscriptionUpdateResponse,
SubscriptionDeleteResponse,
- SubscriptionGetResponse,
)
```
@@ -86,7 +85,7 @@ Methods:
- client.accounts.subscriptions.create(\*, account_id, \*\*params) -> SubscriptionCreateResponse
- client.accounts.subscriptions.update(subscription_identifier, \*, account_id, \*\*params) -> SubscriptionUpdateResponse
- client.accounts.subscriptions.delete(subscription_identifier, \*, account_id) -> SubscriptionDeleteResponse
-- client.accounts.subscriptions.get(\*, account_id) -> Optional[SubscriptionGetResponse]
+- client.accounts.subscriptions.get(\*, account_id) -> SyncSinglePage[Subscription]
## Tokens
@@ -110,12 +109,13 @@ Methods:
Types:
```python
-from cloudflare.types.accounts.tokens import PermissionGroupListResponse
+from cloudflare.types.accounts.tokens import PermissionGroupListResponse, PermissionGroupGetResponse
```
Methods:
-- client.accounts.tokens.permission_groups.list(\*, account_id) -> SyncSinglePage[object]
+- client.accounts.tokens.permission_groups.list(\*, account_id) -> SyncSinglePage[PermissionGroupListResponse]
+- client.accounts.tokens.permission_groups.get(\*, account_id) -> SyncSinglePage[PermissionGroupGetResponse]
### Value
@@ -265,18 +265,14 @@ Methods:
Types:
```python
-from cloudflare.types.user import (
- SubscriptionUpdateResponse,
- SubscriptionDeleteResponse,
- SubscriptionGetResponse,
-)
+from cloudflare.types.user import SubscriptionUpdateResponse, SubscriptionDeleteResponse
```
Methods:
- client.user.subscriptions.update(identifier, \*\*params) -> SubscriptionUpdateResponse
- client.user.subscriptions.delete(identifier) -> SubscriptionDeleteResponse
-- client.user.subscriptions.get() -> Optional[SubscriptionGetResponse]
+- client.user.subscriptions.get() -> SyncSinglePage[Subscription]
## Tokens
@@ -305,7 +301,7 @@ from cloudflare.types.user.tokens import PermissionGroupListResponse
Methods:
-- client.user.tokens.permission_groups.list() -> SyncSinglePage[object]
+- client.user.tokens.permission_groups.list() -> SyncSinglePage[PermissionGroupListResponse]
### Value
@@ -417,7 +413,7 @@ from cloudflare.types.zones import CustomNameserverUpdateResponse, CustomNameser
Methods:
-- client.zones.custom_nameservers.update(\*, zone_id, \*\*params) -> Optional[CustomNameserverUpdateResponse]
+- client.zones.custom_nameservers.update(\*, zone_id, \*\*params) -> SyncSinglePage[CustomNameserverUpdateResponse]
- client.zones.custom_nameservers.get(\*, zone_id) -> CustomNameserverGetResponse
## Holds
@@ -476,7 +472,7 @@ from cloudflare.types.zones import RatePlanGetResponse
Methods:
-- client.zones.rate_plans.get(\*, zone_id) -> Optional[RatePlanGetResponse]
+- client.zones.rate_plans.get(\*, zone_id) -> SyncSinglePage[RatePlanGetResponse]
# LoadBalancers
@@ -553,14 +549,14 @@ from cloudflare.types.load_balancers.monitors import ReferenceGetResponse
Methods:
-- client.load_balancers.monitors.references.get(monitor_id, \*, account_id) -> ReferenceGetResponse
+- client.load_balancers.monitors.references.get(monitor_id, \*, account_id) -> SyncSinglePage[ReferenceGetResponse]
## Pools
Types:
```python
-from cloudflare.types.load_balancers import Pool, PoolDeleteResponse, PoolBulkEditResponse
+from cloudflare.types.load_balancers import Pool, PoolDeleteResponse
```
Methods:
@@ -569,7 +565,7 @@ Methods:
- client.load_balancers.pools.update(pool_id, \*, account_id, \*\*params) -> Pool
- client.load_balancers.pools.list(\*, account_id, \*\*params) -> SyncSinglePage[Pool]
- client.load_balancers.pools.delete(pool_id, \*, account_id) -> PoolDeleteResponse
-- client.load_balancers.pools.bulk_edit(\*, account_id, \*\*params) -> PoolBulkEditResponse
+- client.load_balancers.pools.bulk_edit(\*, account_id, \*\*params) -> SyncSinglePage[Pool]
- client.load_balancers.pools.edit(pool_id, \*, account_id, \*\*params) -> Pool
- client.load_balancers.pools.get(pool_id, \*, account_id) -> Pool
@@ -596,7 +592,7 @@ from cloudflare.types.load_balancers.pools import ReferenceGetResponse
Methods:
-- client.load_balancers.pools.references.get(pool_id, \*, account_id) -> ReferenceGetResponse
+- client.load_balancers.pools.references.get(pool_id, \*, account_id) -> SyncSinglePage[ReferenceGetResponse]
## Previews
@@ -628,12 +624,12 @@ Methods:
Types:
```python
-from cloudflare.types.load_balancers import SearchGetResponse
+from cloudflare.types.load_balancers import SearchListResponse
```
Methods:
-- client.load_balancers.searches.get(\*, account_id, \*\*params) -> SearchGetResponse
+- client.load_balancers.searches.list(\*, account_id, \*\*params) -> SyncV4PagePagination[SearchListResponse]
# Cache
@@ -786,7 +782,7 @@ from cloudflare.types.ssl import RecommendationGetResponse
Methods:
-- client.ssl.recommendations.get(zone_identifier) -> Optional[RecommendationGetResponse]
+- client.ssl.recommendations.get(\*, zone_id) -> Optional[RecommendationGetResponse]
## Universal
@@ -918,15 +914,9 @@ Methods:
## Prioritize
-Types:
-
-```python
-from cloudflare.types.custom_certificates import PrioritizeUpdateResponse
-```
-
Methods:
-- client.custom_certificates.prioritize.update(\*, zone_id, \*\*params) -> Optional[PrioritizeUpdateResponse]
+- client.custom_certificates.prioritize.update(\*, zone_id, \*\*params) -> SyncSinglePage[CustomCertificate]
# CustomHostnames
@@ -972,6 +962,24 @@ Methods:
- client.custom_hostnames.fallback_origin.delete(\*, zone_id) -> Optional[FallbackOriginDeleteResponse]
- client.custom_hostnames.fallback_origin.get(\*, zone_id) -> Optional[FallbackOriginGetResponse]
+## CertificatePack
+
+### Certificates
+
+Types:
+
+```python
+from cloudflare.types.custom_hostnames.certificate_pack import (
+ CertificateUpdateResponse,
+ CertificateDeleteResponse,
+)
+```
+
+Methods:
+
+- client.custom_hostnames.certificate_pack.certificates.update(certificate_id, \*, zone_id, custom_hostname_id, certificate_pack_id, \*\*params) -> Optional[CertificateUpdateResponse]
+- client.custom_hostnames.certificate_pack.certificates.delete(certificate_id, \*, zone_id, custom_hostname_id, certificate_pack_id) -> CertificateDeleteResponse
+
# CustomNameservers
Types:
@@ -981,16 +989,15 @@ from cloudflare.types.custom_nameservers import (
CustomNameserver,
CustomNameserverDeleteResponse,
CustomNameserverAvailabiltyResponse,
- CustomNameserverGetResponse,
)
```
Methods:
- client.custom_nameservers.create(\*, account_id, \*\*params) -> Optional[CustomNameserver]
-- client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> Optional[CustomNameserverDeleteResponse]
-- client.custom_nameservers.availabilty(\*, account_id) -> Optional[CustomNameserverAvailabiltyResponse]
-- client.custom_nameservers.get(\*, account_id) -> Optional[CustomNameserverGetResponse]
+- client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> SyncSinglePage[CustomNameserverDeleteResponse]
+- client.custom_nameservers.availabilty(\*, account_id) -> SyncSinglePage[CustomNameserverAvailabiltyResponse]
+- client.custom_nameservers.get(\*, account_id) -> SyncSinglePage[CustomNameserver]
# DNSFirewall
@@ -1124,20 +1131,41 @@ Methods:
Types:
```python
-from cloudflare.types.dns import DNSSetting, SettingEditResponse, SettingGetResponse
+from cloudflare.types.dns import DNSSetting
+```
+
+### Zone
+
+Types:
+
+```python
+from cloudflare.types.dns.settings import ZoneEditResponse, ZoneGetResponse
+```
+
+Methods:
+
+- client.dns.settings.zone.edit(\*, zone_id, \*\*params) -> Optional[ZoneEditResponse]
+- client.dns.settings.zone.get(\*, zone_id) -> Optional[ZoneGetResponse]
+
+### Account
+
+Types:
+
+```python
+from cloudflare.types.dns.settings import AccountEditResponse, AccountGetResponse
```
Methods:
-- client.dns.settings.edit(\*, account_id, zone_id, \*\*params) -> Optional[SettingEditResponse]
-- client.dns.settings.get(\*, account_id, zone_id) -> Optional[SettingGetResponse]
+- client.dns.settings.account.edit(\*, account_id, \*\*params) -> Optional[AccountEditResponse]
+- client.dns.settings.account.get(\*, account_id) -> Optional[AccountGetResponse]
-### Views
+#### Views
Types:
```python
-from cloudflare.types.dns.settings import (
+from cloudflare.types.dns.settings.account import (
ViewCreateResponse,
ViewListResponse,
ViewDeleteResponse,
@@ -1148,11 +1176,11 @@ from cloudflare.types.dns.settings import (
Methods:
-- client.dns.settings.views.create(\*, account_id, \*\*params) -> Optional[ViewCreateResponse]
-- client.dns.settings.views.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ViewListResponse]
-- client.dns.settings.views.delete(view_id, \*, account_id) -> Optional[ViewDeleteResponse]
-- client.dns.settings.views.edit(view_id, \*, account_id, \*\*params) -> Optional[ViewEditResponse]
-- client.dns.settings.views.get(view_id, \*, account_id) -> Optional[ViewGetResponse]
+- client.dns.settings.account.views.create(\*, account_id, \*\*params) -> Optional[ViewCreateResponse]
+- client.dns.settings.account.views.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ViewListResponse]
+- client.dns.settings.account.views.delete(view_id, \*, account_id) -> Optional[ViewDeleteResponse]
+- client.dns.settings.account.views.edit(view_id, \*, account_id, \*\*params) -> Optional[ViewEditResponse]
+- client.dns.settings.account.views.get(view_id, \*, account_id) -> Optional[ViewGetResponse]
## Analytics
@@ -1371,8 +1399,8 @@ from cloudflare.types.email_security.investigate import MoveCreateResponse, Move
Methods:
-- client.email_security.investigate.move.create(postfix_id, \*, account_id, \*\*params) -> MoveCreateResponse
-- client.email_security.investigate.move.bulk(\*, account_id, \*\*params) -> MoveBulkResponse
+- client.email_security.investigate.move.create(postfix_id, \*, account_id, \*\*params) -> SyncSinglePage[MoveCreateResponse]
+- client.email_security.investigate.move.bulk(\*, account_id, \*\*params) -> SyncSinglePage[MoveBulkResponse]
### Reclassify
@@ -1396,7 +1424,7 @@ from cloudflare.types.email_security.investigate import ReleaseBulkResponse
Methods:
-- client.email_security.investigate.release.bulk(\*, account_id, \*\*params) -> ReleaseBulkResponse
+- client.email_security.investigate.release.bulk(\*, account_id, \*\*params) -> SyncSinglePage[ReleaseBulkResponse]
## Settings
@@ -1462,7 +1490,7 @@ Methods:
- client.email_security.settings.domains.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DomainListResponse]
- client.email_security.settings.domains.delete(domain_id, \*, account_id) -> DomainDeleteResponse
-- client.email_security.settings.domains.bulk_delete(\*, account_id) -> DomainBulkDeleteResponse
+- client.email_security.settings.domains.bulk_delete(\*, account_id) -> SyncSinglePage[DomainBulkDeleteResponse]
- client.email_security.settings.domains.edit(domain_id, \*, account_id, \*\*params) -> DomainEditResponse
- client.email_security.settings.domains.get(domain_id, \*, account_id) -> DomainGetResponse
@@ -1541,13 +1569,13 @@ Methods:
Types:
```python
-from cloudflare.types.email_routing import DNSRecord, DNSDeleteResponse, DNSGetResponse
+from cloudflare.types.email_routing import DNSRecord, DNSGetResponse
```
Methods:
- client.email_routing.dns.create(\*, zone_id, \*\*params) -> Optional[Settings]
-- client.email_routing.dns.delete(\*, zone_id) -> DNSDeleteResponse
+- client.email_routing.dns.delete(\*, zone_id) -> SyncSinglePage[DNSRecord]
- client.email_routing.dns.edit(\*, zone_id, \*\*params) -> Optional[Settings]
- client.email_routing.dns.get(\*, zone_id, \*\*params) -> DNSGetResponse
@@ -1605,22 +1633,17 @@ Methods:
Types:
```python
-from cloudflare.types.filters import (
- FirewallFilter,
- FilterCreateResponse,
- FilterBulkDeleteResponse,
- FilterBulkUpdateResponse,
-)
+from cloudflare.types.filters import FirewallFilter
```
Methods:
-- client.filters.create(\*, zone_id, \*\*params) -> Optional[FilterCreateResponse]
+- client.filters.create(\*, zone_id, \*\*params) -> SyncSinglePage[FirewallFilter]
- client.filters.update(filter_id, \*, zone_id, \*\*params) -> FirewallFilter
- client.filters.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[FirewallFilter]
- client.filters.delete(filter_id, \*, zone_id) -> FirewallFilter
-- client.filters.bulk_delete(\*, zone_id) -> Optional[FilterBulkDeleteResponse]
-- client.filters.bulk_update(\*, zone_id) -> Optional[FilterBulkUpdateResponse]
+- client.filters.bulk_delete(\*, zone_id) -> SyncSinglePage[FirewallFilter]
+- client.filters.bulk_update(\*, zone_id) -> SyncSinglePage[FirewallFilter]
- client.filters.get(filter_id, \*, zone_id) -> FirewallFilter
# Firewall
@@ -1653,29 +1676,20 @@ Methods:
Types:
```python
-from cloudflare.types.firewall import (
- DeletedFilter,
- FirewallRule,
- Product,
- RuleCreateResponse,
- RuleBulkDeleteResponse,
- RuleBulkEditResponse,
- RuleBulkUpdateResponse,
- RuleEditResponse,
-)
+from cloudflare.types.firewall import DeletedFilter, FirewallRule, Product
```
Methods:
-- client.firewall.rules.create(\*, zone_id, \*\*params) -> Optional[RuleCreateResponse]
+- client.firewall.rules.create(\*, zone_id, \*\*params) -> SyncSinglePage[FirewallRule]
- client.firewall.rules.update(rule_id, \*, zone_id, \*\*params) -> FirewallRule
- client.firewall.rules.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[FirewallRule]
- client.firewall.rules.delete(rule_id, \*, zone_id) -> FirewallRule
-- client.firewall.rules.bulk_delete(\*, zone_id) -> Optional[RuleBulkDeleteResponse]
-- client.firewall.rules.bulk_edit(\*, zone_id, \*\*params) -> Optional[RuleBulkEditResponse]
-- client.firewall.rules.bulk_update(\*, zone_id, \*\*params) -> Optional[RuleBulkUpdateResponse]
-- client.firewall.rules.edit(rule_id, \*, zone_id) -> Optional[RuleEditResponse]
-- client.firewall.rules.get(rule_id, \*, zone_id, \*\*params) -> FirewallRule
+- client.firewall.rules.bulk_delete(\*, zone_id) -> SyncSinglePage[FirewallRule]
+- client.firewall.rules.bulk_edit(\*, zone_id, \*\*params) -> SyncSinglePage[FirewallRule]
+- client.firewall.rules.bulk_update(\*, zone_id, \*\*params) -> SyncSinglePage[FirewallRule]
+- client.firewall.rules.edit(rule_id, \*, zone_id) -> SyncSinglePage[FirewallRule]
+- client.firewall.rules.get(rule_id, \*, zone_id) -> FirewallRule
## AccessRules
@@ -1698,11 +1712,11 @@ from cloudflare.types.firewall import (
Methods:
-- client.firewall.access_rules.create(\*, account_id, zone_id, \*\*params) -> AccessRuleCreateResponse
-- client.firewall.access_rules.list(\*, account_id, zone_id, \*\*params) -> SyncV4PagePaginationArray[AccessRuleListResponse]
-- client.firewall.access_rules.delete(rule_id, \*, account_id, zone_id) -> Optional[AccessRuleDeleteResponse]
-- client.firewall.access_rules.edit(rule_id, \*, account_id, zone_id, \*\*params) -> AccessRuleEditResponse
-- client.firewall.access_rules.get(rule_id, \*, account_id, zone_id) -> AccessRuleGetResponse
+- client.firewall.access_rules.create(\*, account_id, zone_id, \*\*params) -> AccessRuleCreateResponse
+- client.firewall.access_rules.list(\*, account_id, zone_id, \*\*params) -> SyncV4PagePaginationArray[AccessRuleListResponse]
+- client.firewall.access_rules.delete(rule_id, \*, account_id, zone_id) -> Optional[AccessRuleDeleteResponse]
+- client.firewall.access_rules.edit(rule_id, \*, account_id, zone_id, \*\*params) -> AccessRuleEditResponse
+- client.firewall.access_rules.get(rule_id, \*, account_id, zone_id) -> AccessRuleGetResponse
## UARules
@@ -1869,32 +1883,26 @@ from cloudflare.types.logpush.datasets import FieldGetResponse
Methods:
-- client.logpush.datasets.fields.get(dataset_id, \*, account_id, zone_id) -> object
+- client.logpush.datasets.fields.get(dataset_id, \*, account_id, zone_id) -> object
### Jobs
-Types:
-
-```python
-from cloudflare.types.logpush.datasets import JobGetResponse
-```
-
Methods:
-- client.logpush.datasets.jobs.get(dataset_id, \*, account_id, zone_id) -> Optional[JobGetResponse]
+- client.logpush.datasets.jobs.get(dataset_id, \*, account_id, zone_id) -> SyncSinglePage[Optional[LogpushJob]]
## Edge
Types:
```python
-from cloudflare.types.logpush import InstantLogpushJob, EdgeGetResponse
+from cloudflare.types.logpush import InstantLogpushJob
```
Methods:
- client.logpush.edge.create(\*, zone_id, \*\*params) -> Optional[InstantLogpushJob]
-- client.logpush.edge.get(\*, zone_id) -> Optional[EdgeGetResponse]
+- client.logpush.edge.get(\*, zone_id) -> SyncSinglePage[Optional[InstantLogpushJob]]
## Jobs
@@ -1906,11 +1914,11 @@ from cloudflare.types.logpush import LogpushJob, OutputOptions, JobDeleteRespons
Methods:
-- client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional[LogpushJob]
-- client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional[LogpushJob]
-- client.logpush.jobs.list(\*, account_id, zone_id) -> SyncSinglePage[Optional[LogpushJob]]
-- client.logpush.jobs.delete(job_id, \*, account_id, zone_id) -> Optional[JobDeleteResponse]
-- client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional[LogpushJob]
+- client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional[LogpushJob]
+- client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional[LogpushJob]
+- client.logpush.jobs.list(\*, account_id, zone_id) -> SyncSinglePage[Optional[LogpushJob]]
+- client.logpush.jobs.delete(job_id, \*, account_id, zone_id) -> Optional[JobDeleteResponse]
+- client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional[LogpushJob]
## Ownership
@@ -1922,21 +1930,26 @@ from cloudflare.types.logpush import OwnershipValidation, OwnershipCreateRespons
Methods:
-- client.logpush.ownership.create(\*, account_id, zone_id, \*\*params) -> Optional[OwnershipCreateResponse]
-- client.logpush.ownership.validate(\*, account_id, zone_id, \*\*params) -> Optional[OwnershipValidation]
+- client.logpush.ownership.create(\*, account_id, zone_id, \*\*params) -> Optional[OwnershipCreateResponse]
+- client.logpush.ownership.validate(\*, account_id, zone_id, \*\*params) -> Optional[OwnershipValidation]
## Validate
Types:
```python
-from cloudflare.types.logpush import ValidateDestinationResponse, ValidateOriginResponse
+from cloudflare.types.logpush import (
+ ValidateDestinationResponse,
+ ValidateDestinationExistsResponse,
+ ValidateOriginResponse,
+)
```
Methods:
-- client.logpush.validate.destination(\*, account_id, zone_id, \*\*params) -> Optional[ValidateDestinationResponse]
-- client.logpush.validate.origin(\*, account_id, zone_id, \*\*params) -> Optional[ValidateOriginResponse]
+- client.logpush.validate.destination(\*, account_id, zone_id, \*\*params) -> Optional[ValidateDestinationResponse]
+- client.logpush.validate.destination_exists(\*, account_id, zone_id, \*\*params) -> Optional[ValidateDestinationExistsResponse]
+- client.logpush.validate.origin(\*, account_id, zone_id, \*\*params) -> Optional[ValidateOriginResponse]
# Logs
@@ -2038,7 +2051,7 @@ from cloudflare.types.origin_tls_client_auth import AuthenticatedOriginPull, Hos
Methods:
-- client.origin_tls_client_auth.hostnames.update(\*, zone_id, \*\*params) -> Optional[HostnameUpdateResponse]
+- client.origin_tls_client_auth.hostnames.update(\*, zone_id, \*\*params) -> SyncSinglePage[HostnameUpdateResponse]
- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> Optional[AuthenticatedOriginPull]
### Certificates
@@ -2131,7 +2144,7 @@ Methods:
- client.waiting_rooms.create(\*, zone_id, \*\*params) -> WaitingRoom
- client.waiting_rooms.update(waiting_room_id, \*, zone_id, \*\*params) -> WaitingRoom
-- client.waiting_rooms.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[WaitingRoom]
+- client.waiting_rooms.list(\*, account_id, zone_id, \*\*params) -> SyncV4PagePaginationArray[WaitingRoom]
- client.waiting_rooms.delete(waiting_room_id, \*, zone_id) -> WaitingRoomDeleteResponse
- client.waiting_rooms.edit(waiting_room_id, \*, zone_id, \*\*params) -> WaitingRoom
- client.waiting_rooms.get(waiting_room_id, \*, zone_id) -> WaitingRoom
@@ -2182,23 +2195,16 @@ Methods:
Types:
```python
-from cloudflare.types.waiting_rooms import (
- WaitingRoomRule,
- RuleCreateResponse,
- RuleUpdateResponse,
- RuleDeleteResponse,
- RuleEditResponse,
- RuleGetResponse,
-)
+from cloudflare.types.waiting_rooms import WaitingRoomRule
```
Methods:
-- client.waiting_rooms.rules.create(waiting_room_id, \*, zone_id, \*\*params) -> Optional[RuleCreateResponse]
-- client.waiting_rooms.rules.update(waiting_room_id, \*, zone_id, \*\*params) -> Optional[RuleUpdateResponse]
-- client.waiting_rooms.rules.delete(rule_id, \*, zone_id, waiting_room_id) -> Optional[RuleDeleteResponse]
-- client.waiting_rooms.rules.edit(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> Optional[RuleEditResponse]
-- client.waiting_rooms.rules.get(waiting_room_id, \*, zone_id) -> Optional[RuleGetResponse]
+- client.waiting_rooms.rules.create(waiting_room_id, \*, zone_id, \*\*params) -> SyncSinglePage[WaitingRoomRule]
+- client.waiting_rooms.rules.update(waiting_room_id, \*, zone_id, \*\*params) -> SyncSinglePage[WaitingRoomRule]
+- client.waiting_rooms.rules.delete(rule_id, \*, zone_id, waiting_room_id) -> SyncSinglePage[WaitingRoomRule]
+- client.waiting_rooms.rules.edit(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> SyncSinglePage[WaitingRoomRule]
+- client.waiting_rooms.rules.get(waiting_room_id, \*, zone_id) -> SyncSinglePage[WaitingRoomRule]
## Statuses
@@ -2453,6 +2459,26 @@ Methods:
- client.workers.scripts.versions.list(script_name, \*, account_id, \*\*params) -> SyncV4PagePagination[VersionListResponse]
- client.workers.scripts.versions.get(version_id, \*, account_id, script_name) -> Optional[VersionGetResponse]
+### Secrets
+
+Types:
+
+```python
+from cloudflare.types.workers.scripts import (
+ SecretUpdateResponse,
+ SecretListResponse,
+ SecretDeleteResponse,
+ SecretGetResponse,
+)
+```
+
+Methods:
+
+- client.workers.scripts.secrets.update(script_name, \*, account_id, \*\*params) -> Optional[SecretUpdateResponse]
+- client.workers.scripts.secrets.list(script_name, \*, account_id) -> SyncSinglePage[SecretListResponse]
+- client.workers.scripts.secrets.delete(secret_name, \*, account_id, script_name) -> object
+- client.workers.scripts.secrets.get(secret_name, \*, account_id, script_name) -> Optional[SecretGetResponse]
+
## AccountSettings
Types:
@@ -2618,7 +2644,7 @@ Methods:
Types:
```python
-from cloudflare.types.queues import Consumer, ConsumerDeleteResponse, ConsumerGetResponse
+from cloudflare.types.queues import Consumer, ConsumerDeleteResponse
```
Methods:
@@ -2626,7 +2652,7 @@ Methods:
- client.queues.consumers.create(queue_id, \*, account_id, \*\*params) -> Optional[Consumer]
- client.queues.consumers.update(consumer_id, \*, account_id, queue_id, \*\*params) -> Optional[Consumer]
- client.queues.consumers.delete(consumer_id, \*, account_id, queue_id) -> ConsumerDeleteResponse
-- client.queues.consumers.get(queue_id, \*, account_id) -> Optional[ConsumerGetResponse]
+- client.queues.consumers.get(queue_id, \*, account_id) -> SyncSinglePage[Consumer]
## Messages
@@ -2639,7 +2665,7 @@ from cloudflare.types.queues import MessageAckResponse, MessagePullResponse
Methods:
- client.queues.messages.ack(queue_id, \*, account_id, \*\*params) -> Optional[MessageAckResponse]
-- client.queues.messages.pull(queue_id, \*, account_id, \*\*params) -> Optional[MessagePullResponse]
+- client.queues.messages.pull(queue_id, \*, account_id, \*\*params) -> SyncSinglePage[MessagePullResponse]
# APIGateway
@@ -2703,7 +2729,7 @@ Methods:
- client.api_gateway.operations.create(\*, zone_id, \*\*params) -> OperationCreateResponse
- client.api_gateway.operations.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[OperationListResponse]
- client.api_gateway.operations.delete(operation_id, \*, zone_id) -> OperationDeleteResponse
-- client.api_gateway.operations.bulk_create(\*, zone_id, \*\*params) -> OperationBulkCreateResponse
+- client.api_gateway.operations.bulk_create(\*, zone_id, \*\*params) -> SyncSinglePage[OperationBulkCreateResponse]
- client.api_gateway.operations.bulk_delete(\*, zone_id) -> OperationBulkDeleteResponse
- client.api_gateway.operations.get(operation_id, \*, zone_id, \*\*params) -> OperationGetResponse
@@ -2921,11 +2947,11 @@ from cloudflare.types.rulesets import (
Methods:
-- client.rulesets.create(\*, account_id, zone_id, \*\*params) -> RulesetCreateResponse
-- client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetUpdateResponse
-- client.rulesets.list(\*, account_id, zone_id) -> SyncSinglePage[RulesetListResponse]
-- client.rulesets.delete(ruleset_id, \*, account_id, zone_id) -> None
-- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetGetResponse
+- client.rulesets.create(\*, account_id, zone_id, \*\*params) -> RulesetCreateResponse
+- client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetUpdateResponse
+- client.rulesets.list(\*, account_id, zone_id, \*\*params) -> SyncCursorPagination[RulesetListResponse]
+- client.rulesets.delete(ruleset_id, \*, account_id, zone_id) -> None
+- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetGetResponse
## Phases
@@ -2937,8 +2963,8 @@ from cloudflare.types.rulesets import PhaseUpdateResponse, PhaseGetResponse
Methods:
-- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> PhaseUpdateResponse
-- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> PhaseGetResponse
+- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> PhaseUpdateResponse
+- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> PhaseGetResponse
### Versions
@@ -2950,8 +2976,8 @@ from cloudflare.types.rulesets.phases import VersionListResponse, VersionGetResp
Methods:
-- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse]
-- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> VersionGetResponse
+- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse]
+- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> VersionGetResponse
## Rules
@@ -2986,9 +3012,9 @@ from cloudflare.types.rulesets import (
Methods:
-- client.rulesets.rules.create(ruleset_id, \*, account_id, zone_id, \*\*params) -> RuleCreateResponse
-- client.rulesets.rules.delete(rule_id, \*, ruleset_id, account_id, zone_id) -> RuleDeleteResponse
-- client.rulesets.rules.edit(rule_id, \*, ruleset_id, account_id, zone_id, \*\*params) -> RuleEditResponse
+- client.rulesets.rules.create(ruleset_id, \*, account_id, zone_id, \*\*params) -> RuleCreateResponse
+- client.rulesets.rules.delete(rule_id, \*, ruleset_id, account_id, zone_id) -> RuleDeleteResponse
+- client.rulesets.rules.edit(rule_id, \*, ruleset_id, account_id, zone_id, \*\*params) -> RuleEditResponse
## Versions
@@ -3000,9 +3026,9 @@ from cloudflare.types.rulesets import VersionListResponse, VersionGetResponse
Methods:
-- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse]
-- client.rulesets.versions.delete(ruleset_version, \*, ruleset_id, account_id, zone_id) -> None
-- client.rulesets.versions.get(ruleset_version, \*, ruleset_id, account_id, zone_id) -> VersionGetResponse
+- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse]
+- client.rulesets.versions.delete(ruleset_version, \*, ruleset_id, account_id, zone_id) -> None
+- client.rulesets.versions.get(ruleset_version, \*, ruleset_id, account_id, zone_id) -> VersionGetResponse
# URLNormalization
@@ -3343,12 +3369,12 @@ Methods:
Types:
```python
-from cloudflare.types.diagnostics import Traceroute, TracerouteCreateResponse
+from cloudflare.types.diagnostics import Traceroute
```
Methods:
-- client.diagnostics.traceroutes.create(\*, account_id, \*\*params) -> Optional[TracerouteCreateResponse]
+- client.diagnostics.traceroutes.create(\*, account_id, \*\*params) -> SyncSinglePage[Traceroute]
# Images
@@ -3531,12 +3557,12 @@ Methods:
Types:
```python
-from cloudflare.types.intel import IPList, IPListGetResponse
+from cloudflare.types.intel import IPList
```
Methods:
-- client.intel.ip_lists.get(\*, account_id) -> Optional[IPListGetResponse]
+- client.intel.ip_lists.get(\*, account_id) -> SyncSinglePage[IPList]
## Miscategorizations
@@ -3650,7 +3676,7 @@ from cloudflare.types.intel.attack_surface_report import IssueTypeGetResponse
Methods:
-- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> Optional[IssueTypeGetResponse]
+- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> SyncSinglePage[IssueTypeGetResponse]
### Issues
@@ -3848,13 +3874,12 @@ from cloudflare.types.magic_transit.sites import (
LANStaticAddressing,
Nat,
RoutedSubnet,
- LANCreateResponse,
)
```
Methods:
-- client.magic_transit.sites.lans.create(site_id, \*, account_id, \*\*params) -> LANCreateResponse
+- client.magic_transit.sites.lans.create(site_id, \*, account_id, \*\*params) -> SyncSinglePage[LAN]
- client.magic_transit.sites.lans.update(lan_id, \*, account_id, site_id, \*\*params) -> LAN
- client.magic_transit.sites.lans.list(site_id, \*, account_id) -> SyncSinglePage[LAN]
- client.magic_transit.sites.lans.delete(lan_id, \*, account_id, site_id) -> LAN
@@ -3866,12 +3891,12 @@ Methods:
Types:
```python
-from cloudflare.types.magic_transit.sites import WAN, WANStaticAddressing, WANCreateResponse
+from cloudflare.types.magic_transit.sites import WAN, WANStaticAddressing
```
Methods:
-- client.magic_transit.sites.wans.create(site_id, \*, account_id, \*\*params) -> WANCreateResponse
+- client.magic_transit.sites.wans.create(site_id, \*, account_id, \*\*params) -> SyncSinglePage[WAN]
- client.magic_transit.sites.wans.update(wan_id, \*, account_id, site_id, \*\*params) -> WAN
- client.magic_transit.sites.wans.list(site_id, \*, account_id) -> SyncSinglePage[WAN]
- client.magic_transit.sites.wans.delete(wan_id, \*, account_id, site_id) -> WAN
@@ -3893,10 +3918,36 @@ from cloudflare.types.magic_transit import (
Methods:
-- client.magic_transit.connectors.update(connector_id, \*, account_id, \*\*params) -> ConnectorUpdateResponse
-- client.magic_transit.connectors.list(\*, account_id) -> SyncSinglePage[ConnectorListResponse]
-- client.magic_transit.connectors.edit(connector_id, \*, account_id, \*\*params) -> ConnectorEditResponse
-- client.magic_transit.connectors.get(connector_id, \*, account_id) -> ConnectorGetResponse
+- client.magic_transit.connectors.update(connector_id, \*, account_id, \*\*params) -> ConnectorUpdateResponse
+- client.magic_transit.connectors.list(\*, account_id) -> SyncSinglePage[ConnectorListResponse]
+- client.magic_transit.connectors.edit(connector_id, \*, account_id, \*\*params) -> ConnectorEditResponse
+- client.magic_transit.connectors.get(connector_id, \*, account_id) -> ConnectorGetResponse
+
+### Events
+
+Types:
+
+```python
+from cloudflare.types.magic_transit.connectors import EventListResponse, EventGetResponse
+```
+
+Methods:
+
+- client.magic_transit.connectors.events.list(connector_id, \*, account_id, \*\*params) -> EventListResponse
+- client.magic_transit.connectors.events.get(event_n, \*, account_id, connector_id, event_t) -> EventGetResponse
+
+### Snapshots
+
+Types:
+
+```python
+from cloudflare.types.magic_transit.connectors import SnapshotListResponse, SnapshotGetResponse
+```
+
+Methods:
+
+- client.magic_transit.connectors.snapshots.list(connector_id, \*, account_id, \*\*params) -> SnapshotListResponse
+- client.magic_transit.connectors.snapshots.get(snapshot_t, \*, account_id, connector_id) -> SnapshotGetResponse
## PCAPs
@@ -3923,14 +3974,14 @@ Methods:
Types:
```python
-from cloudflare.types.magic_transit.pcaps import Ownership, OwnershipGetResponse
+from cloudflare.types.magic_transit.pcaps import Ownership
```
Methods:
- client.magic_transit.pcaps.ownership.create(\*, account_id, \*\*params) -> Ownership
- client.magic_transit.pcaps.ownership.delete(ownership_id, \*, account_id) -> None
-- client.magic_transit.pcaps.ownership.get(\*, account_id) -> Optional[OwnershipGetResponse]
+- client.magic_transit.pcaps.ownership.get(\*, account_id) -> SyncSinglePage[Ownership]
- client.magic_transit.pcaps.ownership.validate(\*, account_id, \*\*params) -> Ownership
### Download
@@ -3941,6 +3992,20 @@ Methods:
# MagicNetworkMonitoring
+## VPCFlows
+
+### Tokens
+
+Types:
+
+```python
+from cloudflare.types.magic_network_monitoring.vpc_flows import TokenCreateResponse
+```
+
+Methods:
+
+- client.magic_network_monitoring.vpc_flows.tokens.create(\*, account_id) -> str
+
## Configs
Types:
@@ -3992,6 +4057,213 @@ Methods:
- client.magic_network_monitoring.rules.advertisements.edit(rule_id, \*, account_id, \*\*params) -> Optional[Advertisement]
+# MagicCloudNetworking
+
+## CatalogSyncs
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking import (
+ CatalogSyncCreateResponse,
+ CatalogSyncUpdateResponse,
+ CatalogSyncListResponse,
+ CatalogSyncDeleteResponse,
+ CatalogSyncEditResponse,
+ CatalogSyncGetResponse,
+ CatalogSyncRefreshResponse,
+)
+```
+
+Methods:
+
+- client.magic_cloud_networking.catalog_syncs.create(\*, account_id, \*\*params) -> CatalogSyncCreateResponse
+- client.magic_cloud_networking.catalog_syncs.update(sync_id, \*, account_id, \*\*params) -> CatalogSyncUpdateResponse
+- client.magic_cloud_networking.catalog_syncs.list(\*, account_id) -> SyncSinglePage[CatalogSyncListResponse]
+- client.magic_cloud_networking.catalog_syncs.delete(sync_id, \*, account_id, \*\*params) -> CatalogSyncDeleteResponse
+- client.magic_cloud_networking.catalog_syncs.edit(sync_id, \*, account_id, \*\*params) -> CatalogSyncEditResponse
+- client.magic_cloud_networking.catalog_syncs.get(sync_id, \*, account_id) -> CatalogSyncGetResponse
+- client.magic_cloud_networking.catalog_syncs.refresh(sync_id, \*, account_id) -> str
+
+### PrebuiltPolicies
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking.catalog_syncs import PrebuiltPolicyListResponse
+```
+
+Methods:
+
+- client.magic_cloud_networking.catalog_syncs.prebuilt_policies.list(\*, account_id, \*\*params) -> SyncSinglePage[PrebuiltPolicyListResponse]
+
+## OnRamps
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking import (
+ OnRampCreateResponse,
+ OnRampUpdateResponse,
+ OnRampListResponse,
+ OnRampDeleteResponse,
+ OnRampApplyResponse,
+ OnRampEditResponse,
+ OnRampGetResponse,
+ OnRampPlanResponse,
+)
+```
+
+Methods:
+
+- client.magic_cloud_networking.on_ramps.create(\*, account_id, \*\*params) -> OnRampCreateResponse
+- client.magic_cloud_networking.on_ramps.update(onramp_id, \*, account_id, \*\*params) -> OnRampUpdateResponse
+- client.magic_cloud_networking.on_ramps.list(\*, account_id, \*\*params) -> SyncSinglePage[OnRampListResponse]
+- client.magic_cloud_networking.on_ramps.delete(onramp_id, \*, account_id, \*\*params) -> OnRampDeleteResponse
+- client.magic_cloud_networking.on_ramps.apply(onramp_id, \*, account_id) -> OnRampApplyResponse
+- client.magic_cloud_networking.on_ramps.edit(onramp_id, \*, account_id, \*\*params) -> OnRampEditResponse
+- client.magic_cloud_networking.on_ramps.export(onramp_id, \*, account_id) -> BinaryAPIResponse
+- client.magic_cloud_networking.on_ramps.get(onramp_id, \*, account_id, \*\*params) -> OnRampGetResponse
+- client.magic_cloud_networking.on_ramps.plan(onramp_id, \*, account_id) -> OnRampPlanResponse
+
+### AddressSpaces
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking.on_ramps import (
+ AddressSpaceUpdateResponse,
+ AddressSpaceListResponse,
+ AddressSpaceEditResponse,
+)
+```
+
+Methods:
+
+- client.magic_cloud_networking.on_ramps.address_spaces.update(\*, account_id, \*\*params) -> AddressSpaceUpdateResponse
+- client.magic_cloud_networking.on_ramps.address_spaces.list(\*, account_id) -> AddressSpaceListResponse
+- client.magic_cloud_networking.on_ramps.address_spaces.edit(\*, account_id, \*\*params) -> AddressSpaceEditResponse
+
+## CloudIntegrations
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking import (
+ CloudIntegrationCreateResponse,
+ CloudIntegrationUpdateResponse,
+ CloudIntegrationListResponse,
+ CloudIntegrationDeleteResponse,
+ CloudIntegrationDiscoverResponse,
+ CloudIntegrationDiscoverAllResponse,
+ CloudIntegrationEditResponse,
+ CloudIntegrationGetResponse,
+ CloudIntegrationInitialSetupResponse,
+)
+```
+
+Methods:
+
+- client.magic_cloud_networking.cloud_integrations.create(\*, account_id, \*\*params) -> CloudIntegrationCreateResponse
+- client.magic_cloud_networking.cloud_integrations.update(provider_id, \*, account_id, \*\*params) -> CloudIntegrationUpdateResponse
+- client.magic_cloud_networking.cloud_integrations.list(\*, account_id, \*\*params) -> SyncSinglePage[CloudIntegrationListResponse]
+- client.magic_cloud_networking.cloud_integrations.delete(provider_id, \*, account_id) -> CloudIntegrationDeleteResponse
+- client.magic_cloud_networking.cloud_integrations.discover(provider_id, \*, account_id, \*\*params) -> CloudIntegrationDiscoverResponse
+- client.magic_cloud_networking.cloud_integrations.discover_all(\*, account_id) -> CloudIntegrationDiscoverAllResponse
+- client.magic_cloud_networking.cloud_integrations.edit(provider_id, \*, account_id, \*\*params) -> CloudIntegrationEditResponse
+- client.magic_cloud_networking.cloud_integrations.get(provider_id, \*, account_id, \*\*params) -> CloudIntegrationGetResponse
+- client.magic_cloud_networking.cloud_integrations.initial_setup(provider_id, \*, account_id) -> CloudIntegrationInitialSetupResponse
+
+## Resources
+
+Types:
+
+```python
+from cloudflare.types.magic_cloud_networking import (
+ ResourceListResponse,
+ ResourceGetResponse,
+ ResourcePolicyPreviewResponse,
+)
+```
+
+Methods:
+
+- client.magic_cloud_networking.resources.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ResourceListResponse]
+- client.magic_cloud_networking.resources.export(\*, account_id, \*\*params) -> BinaryAPIResponse
+- client.magic_cloud_networking.resources.get(resource_id, \*, account_id, \*\*params) -> ResourceGetResponse
+- client.magic_cloud_networking.resources.policy_preview(\*, account_id, \*\*params) -> str
+
+# NetworkInterconnects
+
+## CNIs
+
+Types:
+
+```python
+from cloudflare.types.network_interconnects import (
+ CNICreateResponse,
+ CNIUpdateResponse,
+ CNIListResponse,
+ CNIGetResponse,
+)
+```
+
+Methods:
+
+- client.network_interconnects.cnis.create(\*, account_id, \*\*params) -> CNICreateResponse
+- client.network_interconnects.cnis.update(cni, \*, account_id, \*\*params) -> CNIUpdateResponse
+- client.network_interconnects.cnis.list(\*, account_id, \*\*params) -> CNIListResponse
+- client.network_interconnects.cnis.delete(cni, \*, account_id) -> None
+- client.network_interconnects.cnis.get(cni, \*, account_id) -> CNIGetResponse
+
+## Interconnects
+
+Types:
+
+```python
+from cloudflare.types.network_interconnects import (
+ InterconnectCreateResponse,
+ InterconnectListResponse,
+ InterconnectGetResponse,
+ InterconnectStatusResponse,
+)
+```
+
+Methods:
+
+- client.network_interconnects.interconnects.create(\*, account_id, \*\*params) -> InterconnectCreateResponse
+- client.network_interconnects.interconnects.list(\*, account_id, \*\*params) -> InterconnectListResponse
+- client.network_interconnects.interconnects.delete(icon, \*, account_id) -> None
+- client.network_interconnects.interconnects.get(icon, \*, account_id) -> InterconnectGetResponse
+- client.network_interconnects.interconnects.loa(icon, \*, account_id) -> None
+- client.network_interconnects.interconnects.status(icon, \*, account_id) -> InterconnectStatusResponse
+
+## Settings
+
+Types:
+
+```python
+from cloudflare.types.network_interconnects import SettingUpdateResponse, SettingGetResponse
+```
+
+Methods:
+
+- client.network_interconnects.settings.update(\*, account_id, \*\*params) -> SettingUpdateResponse
+- client.network_interconnects.settings.get(\*, account_id) -> SettingGetResponse
+
+## Slots
+
+Types:
+
+```python
+from cloudflare.types.network_interconnects import SlotListResponse, SlotGetResponse
+```
+
+Methods:
+
+- client.network_interconnects.slots.list(\*, account_id, \*\*params) -> SlotListResponse
+- client.network_interconnects.slots.get(slot, \*, account_id) -> SlotGetResponse
+
# MTLSCertificates
Types:
@@ -4012,12 +4284,12 @@ Methods:
Types:
```python
-from cloudflare.types.mtls_certificates import CertificateAsssociation, AssociationGetResponse
+from cloudflare.types.mtls_certificates import CertificateAsssociation
```
Methods:
-- client.mtls_certificates.associations.get(mtls_certificate_id, \*, account_id) -> Optional[AssociationGetResponse]
+- client.mtls_certificates.associations.get(mtls_certificate_id, \*, account_id) -> SyncSinglePage[CertificateAsssociation]
# Pages
@@ -4202,7 +4474,7 @@ Methods:
Types:
```python
-from cloudflare.types.stream import Audio, AudioTrackDeleteResponse, AudioTrackGetResponse
+from cloudflare.types.stream import Audio, AudioTrackDeleteResponse
```
Methods:
@@ -4210,7 +4482,7 @@ Methods:
- client.stream.audio_tracks.delete(audio_identifier, \*, account_id, identifier) -> str
- client.stream.audio_tracks.copy(identifier, \*, account_id, \*\*params) -> Optional[Audio]
- client.stream.audio_tracks.edit(audio_identifier, \*, account_id, identifier, \*\*params) -> Optional[Audio]
-- client.stream.audio_tracks.get(identifier, \*, account_id) -> Optional[AudioTrackGetResponse]
+- client.stream.audio_tracks.get(identifier, \*, account_id) -> SyncSinglePage[Audio]
## Videos
@@ -4266,7 +4538,7 @@ Methods:
- client.stream.keys.create(\*, account_id, \*\*params) -> Optional[Keys]
- client.stream.keys.delete(identifier, \*, account_id) -> str
-- client.stream.keys.get(\*, account_id) -> Optional[KeyGetResponse]
+- client.stream.keys.get(\*, account_id) -> SyncSinglePage[KeyGetResponse]
## LiveInputs
@@ -4333,12 +4605,12 @@ Methods:
Types:
```python
-from cloudflare.types.stream import Caption, CaptionGetResponse
+from cloudflare.types.stream import Caption
```
Methods:
-- client.stream.captions.get(identifier, \*, account_id) -> Optional[CaptionGetResponse]
+- client.stream.captions.get(identifier, \*, account_id) -> SyncSinglePage[Caption]
### Language
@@ -4446,7 +4718,6 @@ from cloudflare.types.alerting.destinations import (
Pagerduty,
PagerdutyCreateResponse,
PagerdutyDeleteResponse,
- PagerdutyGetResponse,
PagerdutyLinkResponse,
)
```
@@ -4455,7 +4726,7 @@ Methods:
- client.alerting.destinations.pagerduty.create(\*, account_id) -> Optional[PagerdutyCreateResponse]
- client.alerting.destinations.pagerduty.delete(\*, account_id) -> PagerdutyDeleteResponse
-- client.alerting.destinations.pagerduty.get(\*, account_id) -> Optional[PagerdutyGetResponse]
+- client.alerting.destinations.pagerduty.get(\*, account_id) -> SyncSinglePage[Pagerduty]
- client.alerting.destinations.pagerduty.link(token_id, \*, account_id) -> Optional[PagerdutyLinkResponse]
### Webhooks
@@ -4533,7 +4804,6 @@ from cloudflare.types.d1 import (
DatabaseDeleteResponse,
DatabaseExportResponse,
DatabaseImportResponse,
- DatabaseQueryResponse,
DatabaseRawResponse,
)
```
@@ -4546,8 +4816,8 @@ Methods:
- client.d1.database.export(database_id, \*, account_id, \*\*params) -> DatabaseExportResponse
- client.d1.database.get(database_id, \*, account_id) -> D1
- client.d1.database.import\_(database_id, \*, account_id, \*\*params) -> DatabaseImportResponse
-- client.d1.database.query(database_id, \*, account_id, \*\*params) -> DatabaseQueryResponse
-- client.d1.database.raw(database_id, \*, account_id, \*\*params) -> DatabaseRawResponse
+- client.d1.database.query(database_id, \*, account_id, \*\*params) -> SyncSinglePage[QueryResult]
+- client.d1.database.raw(database_id, \*, account_id, \*\*params) -> SyncSinglePage[DatabaseRawResponse]
# R2
@@ -4612,10 +4882,10 @@ from cloudflare.types.r2.buckets.domains import (
Methods:
- client.r2.buckets.domains.custom.create(bucket_name, \*, account_id, \*\*params) -> CustomCreateResponse
-- client.r2.buckets.domains.custom.update(domain_name, \*, account_id, bucket_name, \*\*params) -> CustomUpdateResponse
+- client.r2.buckets.domains.custom.update(domain, \*, account_id, bucket_name, \*\*params) -> CustomUpdateResponse
- client.r2.buckets.domains.custom.list(bucket_name, \*, account_id) -> CustomListResponse
-- client.r2.buckets.domains.custom.delete(domain_name, \*, account_id, bucket_name) -> CustomDeleteResponse
-- client.r2.buckets.domains.custom.get(domain_name, \*, account_id, bucket_name) -> CustomGetResponse
+- client.r2.buckets.domains.custom.delete(domain, \*, account_id, bucket_name) -> CustomDeleteResponse
+- client.r2.buckets.domains.custom.get(domain, \*, account_id, bucket_name) -> CustomGetResponse
#### Managed
@@ -4632,33 +4902,46 @@ Methods:
### EventNotifications
-#### Configuration
+Types:
+
+```python
+from cloudflare.types.r2.buckets import (
+ EventNotificationUpdateResponse,
+ EventNotificationDeleteResponse,
+ EventNotificationGetResponse,
+)
+```
+
+Methods:
+
+- client.r2.buckets.event_notifications.update(queue_id, \*, account_id, bucket_name, \*\*params) -> object
+- client.r2.buckets.event_notifications.delete(queue_id, \*, account_id, bucket_name) -> object
+- client.r2.buckets.event_notifications.get(bucket_name, \*, account_id) -> EventNotificationGetResponse
+
+### Locks
Types:
```python
-from cloudflare.types.r2.buckets.event_notifications import ConfigurationGetResponse
+from cloudflare.types.r2.buckets import LockUpdateResponse, LockGetResponse
```
Methods:
-- client.r2.buckets.event_notifications.configuration.get(bucket_name, \*, account_id) -> ConfigurationGetResponse
+- client.r2.buckets.locks.update(bucket_name, \*, account_id, \*\*params) -> object
+- client.r2.buckets.locks.get(bucket_name, \*, account_id) -> LockGetResponse
-##### Queues
+### Metrics
Types:
```python
-from cloudflare.types.r2.buckets.event_notifications.configuration import (
- QueueUpdateResponse,
- QueueDeleteResponse,
-)
+from cloudflare.types.r2.buckets import MetricListResponse
```
Methods:
-- client.r2.buckets.event_notifications.configuration.queues.update(queue_id, \*, account_id, bucket_name, \*\*params) -> object
-- client.r2.buckets.event_notifications.configuration.queues.delete(queue_id, \*, account_id, bucket_name) -> object
+- client.r2.buckets.metrics.list(\*, account_id) -> MetricListResponse
### Sippy
@@ -4771,7 +5054,7 @@ from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import B
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(script_name, \*, account_id, dispatch_namespace) -> Optional[BindingGetResponse]
+- client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(script_name, \*, account_id, dispatch_namespace) -> SyncSinglePage[BindingGetResponse]
##### Secrets
@@ -4779,9 +5062,9 @@ Types:
```python
from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
- WorkersSecretModel,
SecretUpdateResponse,
SecretListResponse,
+ SecretDeleteResponse,
SecretGetResponse,
)
```
@@ -4790,6 +5073,7 @@ Methods:
- client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> Optional[SecretUpdateResponse]
- client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list(script_name, \*, account_id, dispatch_namespace) -> SyncSinglePage[SecretListResponse]
+- client.workers_for_platforms.dispatch.namespaces.scripts.secrets.delete(secret_name, \*, account_id, dispatch_namespace, script_name) -> object
- client.workers_for_platforms.dispatch.namespaces.scripts.secrets.get(secret_name, \*, account_id, dispatch_namespace, script_name) -> Optional[SecretGetResponse]
##### Tags
@@ -4806,7 +5090,7 @@ from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.tags.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> Optional[TagUpdateResponse]
+- client.workers_for_platforms.dispatch.namespaces.scripts.tags.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> SyncSinglePage[TagUpdateResponse]
- client.workers_for_platforms.dispatch.namespaces.scripts.tags.list(script_name, \*, account_id, dispatch_namespace) -> SyncSinglePage[TagListResponse]
- client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete(tag, \*, account_id, dispatch_namespace, script_name) -> object
@@ -4851,7 +5135,7 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust.devices import DeviceNetwork, NetworkDeleteResponse
+from cloudflare.types.zero_trust.devices import DeviceNetwork
```
Methods:
@@ -4859,7 +5143,7 @@ Methods:
- client.zero_trust.devices.networks.create(\*, account_id, \*\*params) -> Optional[DeviceNetwork]
- client.zero_trust.devices.networks.update(network_id, \*, account_id, \*\*params) -> Optional[DeviceNetwork]
- client.zero_trust.devices.networks.list(\*, account_id) -> SyncSinglePage[DeviceNetwork]
-- client.zero_trust.devices.networks.delete(network_id, \*, account_id) -> Optional[NetworkDeleteResponse]
+- client.zero_trust.devices.networks.delete(network_id, \*, account_id) -> SyncSinglePage[DeviceNetwork]
- client.zero_trust.devices.networks.get(network_id, \*, account_id) -> Optional[DeviceNetwork]
### FleetStatus
@@ -4904,51 +5188,24 @@ Methods:
##### Excludes
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.default import (
- ExcludeUpdateResponse,
- ExcludeGetResponse,
-)
-```
-
Methods:
-- client.zero_trust.devices.policies.default.excludes.update(\*, account_id, \*\*params) -> Optional[ExcludeUpdateResponse]
-- client.zero_trust.devices.policies.default.excludes.get(\*, account_id) -> Optional[ExcludeGetResponse]
+- client.zero_trust.devices.policies.default.excludes.update(\*, account_id, \*\*params) -> SyncSinglePage[SplitTunnelExclude]
+- client.zero_trust.devices.policies.default.excludes.get(\*, account_id) -> SyncSinglePage[SplitTunnelExclude]
##### Includes
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.default import (
- IncludeUpdateResponse,
- IncludeGetResponse,
-)
-```
-
Methods:
-- client.zero_trust.devices.policies.default.includes.update(\*, account_id, \*\*params) -> Optional[IncludeUpdateResponse]
-- client.zero_trust.devices.policies.default.includes.get(\*, account_id) -> Optional[IncludeGetResponse]
+- client.zero_trust.devices.policies.default.includes.update(\*, account_id, \*\*params) -> SyncSinglePage[SplitTunnelInclude]
+- client.zero_trust.devices.policies.default.includes.get(\*, account_id) -> SyncSinglePage[SplitTunnelInclude]
##### FallbackDomains
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.default import (
- FallbackDomainUpdateResponse,
- FallbackDomainGetResponse,
-)
-```
-
Methods:
-- client.zero_trust.devices.policies.default.fallback_domains.update(\*, account_id, \*\*params) -> Optional[FallbackDomainUpdateResponse]
-- client.zero_trust.devices.policies.default.fallback_domains.get(\*, account_id) -> Optional[FallbackDomainGetResponse]
+- client.zero_trust.devices.policies.default.fallback_domains.update(\*, account_id, \*\*params) -> SyncSinglePage[FallbackDomain]
+- client.zero_trust.devices.policies.default.fallback_domains.get(\*, account_id) -> SyncSinglePage[FallbackDomain]
##### Certificates
@@ -4968,69 +5225,36 @@ Methods:
#### Custom
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies import CustomDeleteResponse
-```
-
Methods:
- client.zero_trust.devices.policies.custom.create(\*, account_id, \*\*params) -> Optional[SettingsPolicy]
- client.zero_trust.devices.policies.custom.list(\*, account_id) -> SyncSinglePage[SettingsPolicy]
-- client.zero_trust.devices.policies.custom.delete(policy_id, \*, account_id) -> Optional[CustomDeleteResponse]
+- client.zero_trust.devices.policies.custom.delete(policy_id, \*, account_id) -> SyncSinglePage[SettingsPolicy]
- client.zero_trust.devices.policies.custom.edit(policy_id, \*, account_id, \*\*params) -> Optional[SettingsPolicy]
- client.zero_trust.devices.policies.custom.get(policy_id, \*, account_id) -> Optional[SettingsPolicy]
##### Excludes
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.custom import (
- ExcludeUpdateResponse,
- ExcludeGetResponse,
-)
-```
-
Methods:
-- client.zero_trust.devices.policies.custom.excludes.update(policy_id, \*, account_id, \*\*params) -> Optional[ExcludeUpdateResponse]
-- client.zero_trust.devices.policies.custom.excludes.get(policy_id, \*, account_id) -> Optional[ExcludeGetResponse]
+- client.zero_trust.devices.policies.custom.excludes.update(policy_id, \*, account_id, \*\*params) -> SyncSinglePage[SplitTunnelExclude]
+- client.zero_trust.devices.policies.custom.excludes.get(policy_id, \*, account_id) -> SyncSinglePage[SplitTunnelExclude]
##### Includes
-Types:
+Methods:
-```python
-from cloudflare.types.zero_trust.devices.policies.custom import (
- IncludeUpdateResponse,
- IncludeGetResponse,
-)
-```
+- client.zero_trust.devices.policies.custom.includes.update(policy_id, \*, account_id, \*\*params) -> SyncSinglePage[SplitTunnelInclude]
+- client.zero_trust.devices.policies.custom.includes.get(policy_id, \*, account_id) -> SyncSinglePage[SplitTunnelInclude]
+
+##### FallbackDomains
Methods:
-- client.zero_trust.devices.policies.custom.includes.update(policy_id, \*, account_id, \*\*params) -> Optional[IncludeUpdateResponse]
-- client.zero_trust.devices.policies.custom.includes.get(policy_id, \*, account_id) -> Optional[IncludeGetResponse]
+- client.zero_trust.devices.policies.custom.fallback_domains.update(policy_id, \*, account_id, \*\*params) -> SyncSinglePage[FallbackDomain]
+- client.zero_trust.devices.policies.custom.fallback_domains.get(policy_id, \*, account_id) -> SyncSinglePage[FallbackDomain]
-##### FallbackDomains
-
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.custom import (
- FallbackDomainUpdateResponse,
- FallbackDomainGetResponse,
-)
-```
-
-Methods:
-
-- client.zero_trust.devices.policies.custom.fallback_domains.update(policy_id, \*, account_id, \*\*params) -> Optional[FallbackDomainUpdateResponse]
-- client.zero_trust.devices.policies.custom.fallback_domains.get(policy_id, \*, account_id) -> Optional[FallbackDomainGetResponse]
-
-### Posture
+### Posture
Types:
@@ -5150,11 +5374,25 @@ from cloudflare.types.zero_trust import (
Methods:
-- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> Optional[IdentityProvider]
-- client.zero_trust.identity_providers.update(identity_provider_id, \*, account_id, zone_id, \*\*params) -> Optional[IdentityProvider]
-- client.zero_trust.identity_providers.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[IdentityProviderListResponse]
-- client.zero_trust.identity_providers.delete(identity_provider_id, \*, account_id, zone_id) -> Optional[IdentityProviderDeleteResponse]
-- client.zero_trust.identity_providers.get(identity_provider_id, \*, account_id, zone_id) -> Optional[IdentityProvider]
+- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> Optional[IdentityProvider]
+- client.zero_trust.identity_providers.update(identity_provider_id, \*, account_id, zone_id, \*\*params) -> Optional[IdentityProvider]
+- client.zero_trust.identity_providers.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[IdentityProviderListResponse]
+- client.zero_trust.identity_providers.delete(identity_provider_id, \*, account_id, zone_id) -> Optional[IdentityProviderDeleteResponse]
+- client.zero_trust.identity_providers.get(identity_provider_id, \*, account_id, zone_id) -> Optional[IdentityProvider]
+
+### SCIM
+
+#### Groups
+
+Methods:
+
+- client.zero_trust.identity_providers.scim.groups.list(identity_provider_id, \*, account_id, \*\*params) -> SyncSinglePage[ZeroTrustGroup]
+
+#### Users
+
+Methods:
+
+- client.zero_trust.identity_providers.scim.users.list(identity_provider_id, \*, account_id, \*\*params) -> SyncSinglePage[AccessUser]
## Organizations
@@ -5166,10 +5404,10 @@ from cloudflare.types.zero_trust import LoginDesign, Organization, OrganizationR
Methods:
-- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> Optional[Organization]
-- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> Optional[Organization]
-- client.zero_trust.organizations.list(\*, account_id, zone_id) -> Optional[Organization]
-- client.zero_trust.organizations.revoke_users(\*, account_id, zone_id, \*\*params) -> Optional[OrganizationRevokeUsersResponse]
+- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> Optional[Organization]
+- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> Optional[Organization]
+- client.zero_trust.organizations.list(\*, account_id, zone_id) -> Optional[Organization]
+- client.zero_trust.organizations.revoke_users(\*, account_id, zone_id, \*\*params) -> Optional[OrganizationRevokeUsersResponse]
### DOH
@@ -5189,42 +5427,15 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust import Seat, SeatEditResponse
+from cloudflare.types.zero_trust import Seat
```
Methods:
-- client.zero_trust.seats.edit(\*, account_id, \*\*params) -> Optional[SeatEditResponse]
+- client.zero_trust.seats.edit(\*, account_id, \*\*params) -> SyncSinglePage[Seat]
## Access
-Types:
-
-```python
-from cloudflare.types.zero_trust import (
- AccessDevicePostureRule,
- AccessRule,
- AnyValidServiceTokenRule,
- AuthenticationMethodRule,
- AzureGroupRule,
- CertificateRule,
- CountryRule,
- DomainRule,
- EmailListRule,
- EmailRule,
- EveryoneRule,
- ExternalEvaluationRule,
- GitHubOrganizationRule,
- GroupRule,
- GSuiteGroupRule,
- IPListRule,
- IPRule,
- OktaGroupRule,
- SAMLGroupRule,
- ServiceTokenRule,
-)
-```
-
### GatewayCA
Types:
@@ -5305,12 +5516,12 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> Optional[ApplicationCreateResponse]
-- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> Optional[ApplicationUpdateResponse]
-- client.zero_trust.access.applications.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[ApplicationListResponse]
-- client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> Optional[ApplicationDeleteResponse]
-- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> Optional[ApplicationGetResponse]
-- client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object
+- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> Optional[ApplicationCreateResponse]
+- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> Optional[ApplicationUpdateResponse]
+- client.zero_trust.access.applications.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[ApplicationListResponse]
+- client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> Optional[ApplicationDeleteResponse]
+- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> Optional[ApplicationGetResponse]
+- client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object
#### CAs
@@ -5322,10 +5533,10 @@ from cloudflare.types.zero_trust.access.applications import CA, CADeleteResponse
Methods:
-- client.zero_trust.access.applications.cas.create(app_id, \*, account_id, zone_id) -> Optional[CA]
-- client.zero_trust.access.applications.cas.list(\*, account_id, zone_id) -> SyncSinglePage[CA]
-- client.zero_trust.access.applications.cas.delete(app_id, \*, account_id, zone_id) -> Optional[CADeleteResponse]
-- client.zero_trust.access.applications.cas.get(app_id, \*, account_id, zone_id) -> Optional[CA]
+- client.zero_trust.access.applications.cas.create(app_id, \*, account_id, zone_id) -> Optional[CA]
+- client.zero_trust.access.applications.cas.list(\*, account_id, zone_id) -> SyncSinglePage[CA]
+- client.zero_trust.access.applications.cas.delete(app_id, \*, account_id, zone_id) -> Optional[CADeleteResponse]
+- client.zero_trust.access.applications.cas.get(app_id, \*, account_id, zone_id) -> Optional[CA]
#### UserPolicyChecks
@@ -5340,7 +5551,7 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.user_policy_checks.list(app_id, \*, account_id, zone_id) -> Optional[UserPolicyCheckListResponse]
+- client.zero_trust.access.applications.user_policy_checks.list(app_id, \*, account_id, zone_id) -> Optional[UserPolicyCheckListResponse]
#### Policies
@@ -5348,6 +5559,26 @@ Types:
```python
from cloudflare.types.zero_trust.access.applications import (
+ AccessDevicePostureRule,
+ AccessRule,
+ AnyValidServiceTokenRule,
+ AuthenticationMethodRule,
+ AzureGroupRule,
+ CertificateRule,
+ CountryRule,
+ DomainRule,
+ EmailListRule,
+ EmailRule,
+ EveryoneRule,
+ ExternalEvaluationRule,
+ GitHubOrganizationRule,
+ GroupRule,
+ GSuiteGroupRule,
+ IPListRule,
+ IPRule,
+ OktaGroupRule,
+ SAMLGroupRule,
+ ServiceTokenRule,
PolicyCreateResponse,
PolicyUpdateResponse,
PolicyListResponse,
@@ -5358,11 +5589,11 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.policies.create(app_id, \*, account_id, zone_id, \*\*params) -> Optional[PolicyCreateResponse]
-- client.zero_trust.access.applications.policies.update(policy_id, \*, app_id, account_id, zone_id, \*\*params) -> Optional[PolicyUpdateResponse]
-- client.zero_trust.access.applications.policies.list(app_id, \*, account_id, zone_id) -> SyncSinglePage[PolicyListResponse]
-- client.zero_trust.access.applications.policies.delete(policy_id, \*, app_id, account_id, zone_id) -> Optional[PolicyDeleteResponse]
-- client.zero_trust.access.applications.policies.get(policy_id, \*, app_id, account_id, zone_id) -> Optional[PolicyGetResponse]
+- client.zero_trust.access.applications.policies.create(app_id, \*, account_id, zone_id, \*\*params) -> Optional[PolicyCreateResponse]
+- client.zero_trust.access.applications.policies.update(policy_id, \*, app_id, account_id, zone_id, \*\*params) -> Optional[PolicyUpdateResponse]
+- client.zero_trust.access.applications.policies.list(app_id, \*, account_id, zone_id) -> SyncSinglePage[PolicyListResponse]
+- client.zero_trust.access.applications.policies.delete(policy_id, \*, app_id, account_id, zone_id) -> Optional[PolicyDeleteResponse]
+- client.zero_trust.access.applications.policies.get(policy_id, \*, app_id, account_id, zone_id) -> Optional[PolicyGetResponse]
#### PolicyTests
@@ -5377,8 +5608,8 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.policy_tests.create(\*, account_id, \*\*params) -> PolicyTestCreateResponse
-- client.zero_trust.access.applications.policy_tests.get(policy_test_id, \*, account_id) -> PolicyTestGetResponse
+- client.zero_trust.access.applications.policy_tests.create(\*, account_id, \*\*params) -> Optional[PolicyTestCreateResponse]
+- client.zero_trust.access.applications.policy_tests.get(policy_test_id, \*, account_id, \*\*params) -> Optional[PolicyTestGetResponse]
##### Users
@@ -5390,7 +5621,7 @@ from cloudflare.types.zero_trust.access.applications.policy_tests import UserLis
Methods:
-- client.zero_trust.access.applications.policy_tests.users.list(policy_test_id, \*, account_id) -> UserListResponse
+- client.zero_trust.access.applications.policy_tests.users.list(policy_test_id, \*, account_id, \*\*params) -> SyncSinglePage[UserListResponse]
### Certificates
@@ -5406,44 +5637,47 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> Optional[Certificate]
-- client.zero_trust.access.certificates.update(certificate_id, \*, account_id, zone_id, \*\*params) -> Optional[Certificate]
-- client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> SyncSinglePage[Certificate]
-- client.zero_trust.access.certificates.delete(certificate_id, \*, account_id, zone_id) -> Optional[CertificateDeleteResponse]
-- client.zero_trust.access.certificates.get(certificate_id, \*, account_id, zone_id) -> Optional[Certificate]
+- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> Optional[Certificate]
+- client.zero_trust.access.certificates.update(certificate_id, \*, account_id, zone_id, \*\*params) -> Optional[Certificate]
+- client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> SyncSinglePage[Certificate]
+- client.zero_trust.access.certificates.delete(certificate_id, \*, account_id, zone_id) -> Optional[CertificateDeleteResponse]
+- client.zero_trust.access.certificates.get(certificate_id, \*, account_id, zone_id) -> Optional[Certificate]
#### Settings
Types:
```python
-from cloudflare.types.zero_trust.access.certificates import (
- CertificateSettings,
- SettingUpdateResponse,
- SettingGetResponse,
-)
+from cloudflare.types.zero_trust.access.certificates import CertificateSettings
```
Methods:
-- client.zero_trust.access.certificates.settings.update(\*, account_id, zone_id, \*\*params) -> Optional[SettingUpdateResponse]
-- client.zero_trust.access.certificates.settings.get(\*, account_id, zone_id) -> Optional[SettingGetResponse]
+- client.zero_trust.access.certificates.settings.update(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[CertificateSettings]
+- client.zero_trust.access.certificates.settings.get(\*, account_id, zone_id) -> SyncSinglePage[CertificateSettings]
### Groups
Types:
```python
-from cloudflare.types.zero_trust.access import ZeroTrustGroup, GroupDeleteResponse
+from cloudflare.types.zero_trust.access import (
+ ZeroTrustGroup,
+ GroupCreateResponse,
+ GroupUpdateResponse,
+ GroupListResponse,
+ GroupDeleteResponse,
+ GroupGetResponse,
+)
```
Methods:
-- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> Optional[ZeroTrustGroup]
-- client.zero_trust.access.groups.update(group_id, \*, account_id, zone_id, \*\*params) -> Optional[ZeroTrustGroup]
-- client.zero_trust.access.groups.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[ZeroTrustGroup]
-- client.zero_trust.access.groups.delete(group_id, \*, account_id, zone_id) -> Optional[GroupDeleteResponse]
-- client.zero_trust.access.groups.get(group_id, \*, account_id, zone_id) -> Optional[ZeroTrustGroup]
+- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> Optional[GroupCreateResponse]
+- client.zero_trust.access.groups.update(group_id, \*, account_id, zone_id, \*\*params) -> Optional[GroupUpdateResponse]
+- client.zero_trust.access.groups.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[GroupListResponse]
+- client.zero_trust.access.groups.delete(group_id, \*, account_id, zone_id) -> Optional[GroupDeleteResponse]
+- client.zero_trust.access.groups.get(group_id, \*, account_id, zone_id) -> Optional[GroupGetResponse]
### ServiceTokens
@@ -5459,11 +5693,11 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> Optional[ServiceTokenCreateResponse]
-- client.zero_trust.access.service_tokens.update(service_token_id, \*, account_id, zone_id, \*\*params) -> Optional[ServiceToken]
-- client.zero_trust.access.service_tokens.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[ServiceToken]
-- client.zero_trust.access.service_tokens.delete(service_token_id, \*, account_id, zone_id) -> Optional[ServiceToken]
-- client.zero_trust.access.service_tokens.get(service_token_id, \*, account_id, zone_id) -> Optional[ServiceToken]
+- client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> Optional[ServiceTokenCreateResponse]
+- client.zero_trust.access.service_tokens.update(service_token_id, \*, account_id, zone_id, \*\*params) -> Optional[ServiceToken]
+- client.zero_trust.access.service_tokens.list(\*, account_id, zone_id, \*\*params) -> SyncSinglePage[ServiceToken]
+- client.zero_trust.access.service_tokens.delete(service_token_id, \*, account_id, zone_id) -> Optional[ServiceToken]
+- client.zero_trust.access.service_tokens.get(service_token_id, \*, account_id, zone_id) -> Optional[ServiceToken]
- client.zero_trust.access.service_tokens.refresh(service_token_id, \*, account_id) -> Optional[ServiceToken]
- client.zero_trust.access.service_tokens.rotate(service_token_id, \*, account_id) -> Optional[ServiceTokenRotateResponse]
@@ -5504,24 +5738,44 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust.access.logs import AccessRequests, AccessRequestListResponse
+from cloudflare.types.zero_trust.access.logs import AccessRequestListResponse
```
Methods:
- client.zero_trust.access.logs.access_requests.list(\*, account_id, \*\*params) -> Optional[AccessRequestListResponse]
+#### SCIM
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.access.logs import AccessRequest
+```
+
+##### Updates
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.access.logs.scim import UpdateListResponse
+```
+
+Methods:
+
+- client.zero_trust.access.logs.scim.updates.list(\*, account_id, \*\*params) -> SyncSinglePage[UpdateListResponse]
+
### Users
Types:
```python
-from cloudflare.types.zero_trust.access import AccessUser
+from cloudflare.types.zero_trust.access import AccessUser, UserListResponse
```
Methods:
-- client.zero_trust.access.users.list(\*, account_id, \*\*params) -> SyncSinglePage[AccessUser]
+- client.zero_trust.access.users.list(\*, account_id, \*\*params) -> SyncSinglePage[UserListResponse]
#### ActiveSessions
@@ -5649,18 +5903,6 @@ Methods:
- client.zero_trust.dex.commands.create(\*, account_id, \*\*params) -> Optional[CommandCreateResponse]
- client.zero_trust.dex.commands.list(\*, account_id, \*\*params) -> SyncV4PagePagination[Optional[CommandListResponse]]
-#### Users
-
-Types:
-
-```python
-from cloudflare.types.zero_trust.dex.commands import UserListResponse
-```
-
-Methods:
-
-- client.zero_trust.dex.commands.users.list(\*, account_id, \*\*params) -> Optional[UserListResponse]
-
#### Devices
Types:
@@ -5809,54 +6051,41 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust import (
- Connection,
- TunnelCreateResponse,
- TunnelListResponse,
- TunnelDeleteResponse,
- TunnelEditResponse,
- TunnelGetResponse,
-)
+from cloudflare.types.zero_trust import Connection, TunnelListResponse
```
Methods:
-- client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> TunnelCreateResponse
-- client.zero_trust.tunnels.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[TunnelListResponse]
-- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id) -> TunnelDeleteResponse
-- client.zero_trust.tunnels.edit(tunnel_id, \*, account_id, \*\*params) -> TunnelEditResponse
-- client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> TunnelGetResponse
+- client.zero_trust.tunnels.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[TunnelListResponse]
-### WARPConnector
+### Cloudflared
Types:
```python
from cloudflare.types.zero_trust.tunnels import (
- WARPConnectorCreateResponse,
- WARPConnectorListResponse,
- WARPConnectorDeleteResponse,
- WARPConnectorEditResponse,
- WARPConnectorGetResponse,
- WARPConnectorTokenResponse,
+ CloudflaredCreateResponse,
+ CloudflaredListResponse,
+ CloudflaredDeleteResponse,
+ CloudflaredEditResponse,
+ CloudflaredGetResponse,
)
```
Methods:
-- client.zero_trust.tunnels.warp_connector.create(\*, account_id, \*\*params) -> WARPConnectorCreateResponse
-- client.zero_trust.tunnels.warp_connector.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[WARPConnectorListResponse]
-- client.zero_trust.tunnels.warp_connector.delete(tunnel_id, \*, account_id) -> WARPConnectorDeleteResponse
-- client.zero_trust.tunnels.warp_connector.edit(tunnel_id, \*, account_id, \*\*params) -> WARPConnectorEditResponse
-- client.zero_trust.tunnels.warp_connector.get(tunnel_id, \*, account_id) -> WARPConnectorGetResponse
-- client.zero_trust.tunnels.warp_connector.token(tunnel_id, \*, account_id) -> str
+- client.zero_trust.tunnels.cloudflared.create(\*, account_id, \*\*params) -> CloudflaredCreateResponse
+- client.zero_trust.tunnels.cloudflared.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[CloudflaredListResponse]
+- client.zero_trust.tunnels.cloudflared.delete(tunnel_id, \*, account_id) -> CloudflaredDeleteResponse
+- client.zero_trust.tunnels.cloudflared.edit(tunnel_id, \*, account_id, \*\*params) -> CloudflaredEditResponse
+- client.zero_trust.tunnels.cloudflared.get(tunnel_id, \*, account_id) -> CloudflaredGetResponse
-### Configurations
+#### Configurations
Types:
```python
-from cloudflare.types.zero_trust.tunnels import (
+from cloudflare.types.zero_trust.tunnels.cloudflared import (
ConfigurationUpdateResponse,
ConfigurationGetResponse,
)
@@ -5864,55 +6093,85 @@ from cloudflare.types.zero_trust.tunnels import (
Methods:
-- client.zero_trust.tunnels.configurations.update(tunnel_id, \*, account_id, \*\*params) -> Optional[ConfigurationUpdateResponse]
-- client.zero_trust.tunnels.configurations.get(tunnel_id, \*, account_id) -> Optional[ConfigurationGetResponse]
+- client.zero_trust.tunnels.cloudflared.configurations.update(tunnel_id, \*, account_id, \*\*params) -> Optional[ConfigurationUpdateResponse]
+- client.zero_trust.tunnels.cloudflared.configurations.get(tunnel_id, \*, account_id) -> Optional[ConfigurationGetResponse]
-### Connections
+#### Connections
Types:
```python
-from cloudflare.types.zero_trust.tunnels import (
- Client,
- ConnectionDeleteResponse,
- ConnectionGetResponse,
-)
+from cloudflare.types.zero_trust.tunnels.cloudflared import Client, ConnectionDeleteResponse
+```
+
+Methods:
+
+- client.zero_trust.tunnels.cloudflared.connections.delete(tunnel_id, \*, account_id, \*\*params) -> object
+- client.zero_trust.tunnels.cloudflared.connections.get(tunnel_id, \*, account_id) -> SyncSinglePage[Client]
+
+#### Token
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.tunnels.cloudflared import TokenGetResponse
```
Methods:
-- client.zero_trust.tunnels.connections.delete(tunnel_id, \*, account_id, \*\*params) -> object
-- client.zero_trust.tunnels.connections.get(tunnel_id, \*, account_id) -> Optional[ConnectionGetResponse]
+- client.zero_trust.tunnels.cloudflared.token.get(tunnel_id, \*, account_id) -> str
+
+#### Connectors
+
+Methods:
+
+- client.zero_trust.tunnels.cloudflared.connectors.get(connector_id, \*, account_id, tunnel_id) -> Client
-### Token
+#### Management
Types:
```python
-from cloudflare.types.zero_trust.tunnels import TokenGetResponse
+from cloudflare.types.zero_trust.tunnels.cloudflared import ManagementCreateResponse
```
Methods:
-- client.zero_trust.tunnels.token.get(tunnel_id, \*, account_id) -> str
+- client.zero_trust.tunnels.cloudflared.management.create(tunnel_id, \*, account_id, \*\*params) -> str
+
+### WARPConnector
+
+Types:
-### Connectors
+```python
+from cloudflare.types.zero_trust.tunnels import (
+ WARPConnectorCreateResponse,
+ WARPConnectorListResponse,
+ WARPConnectorDeleteResponse,
+ WARPConnectorEditResponse,
+ WARPConnectorGetResponse,
+)
+```
Methods:
-- client.zero_trust.tunnels.connectors.get(connector_id, \*, account_id, tunnel_id) -> Client
+- client.zero_trust.tunnels.warp_connector.create(\*, account_id, \*\*params) -> WARPConnectorCreateResponse
+- client.zero_trust.tunnels.warp_connector.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[WARPConnectorListResponse]
+- client.zero_trust.tunnels.warp_connector.delete(tunnel_id, \*, account_id) -> WARPConnectorDeleteResponse
+- client.zero_trust.tunnels.warp_connector.edit(tunnel_id, \*, account_id, \*\*params) -> WARPConnectorEditResponse
+- client.zero_trust.tunnels.warp_connector.get(tunnel_id, \*, account_id) -> WARPConnectorGetResponse
-### Management
+#### Token
Types:
```python
-from cloudflare.types.zero_trust.tunnels import ManagementCreateResponse
+from cloudflare.types.zero_trust.tunnels.warp_connector import TokenGetResponse
```
Methods:
-- client.zero_trust.tunnels.management.create(tunnel_id, \*, account_id, \*\*params) -> str
+- client.zero_trust.tunnels.warp_connector.token.get(tunnel_id, \*, account_id) -> str
## ConnectivitySettings
@@ -5971,7 +6230,7 @@ from cloudflare.types.zero_trust.dlp.datasets import VersionCreateResponse
Methods:
-- client.zero_trust.dlp.datasets.versions.create(version, \*, account_id, dataset_id, \*\*params) -> Optional[VersionCreateResponse]
+- client.zero_trust.dlp.datasets.versions.create(version, \*, account_id, dataset_id, \*\*params) -> SyncSinglePage[VersionCreateResponse]
##### Entries
@@ -6301,7 +6560,6 @@ from cloudflare.types.zero_trust.gateway import (
GatewayIPs,
ProxyEndpoint,
ProxyEndpointDeleteResponse,
- ProxyEndpointGetResponse,
)
```
@@ -6311,7 +6569,7 @@ Methods:
- client.zero_trust.gateway.proxy_endpoints.list(\*, account_id) -> Optional[ProxyEndpoint]
- client.zero_trust.gateway.proxy_endpoints.delete(proxy_endpoint_id, \*, account_id) -> object
- client.zero_trust.gateway.proxy_endpoints.edit(proxy_endpoint_id, \*, account_id, \*\*params) -> Optional[ProxyEndpoint]
-- client.zero_trust.gateway.proxy_endpoints.get(proxy_endpoint_id, \*, account_id) -> Optional[ProxyEndpointGetResponse]
+- client.zero_trust.gateway.proxy_endpoints.get(proxy_endpoint_id, \*, account_id) -> SyncSinglePage[ProxyEndpoint]
### Rules
@@ -6410,6 +6668,30 @@ Methods:
- client.zero_trust.networks.virtual_networks.edit(virtual_network_id, \*, account_id, \*\*params) -> VirtualNetwork
- client.zero_trust.networks.virtual_networks.get(virtual_network_id, \*, account_id) -> VirtualNetwork
+### Subnets
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.networks import SubnetListResponse
+```
+
+Methods:
+
+- client.zero_trust.networks.subnets.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[SubnetListResponse]
+
+#### CloudflareSource
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.networks.subnets import CloudflareSourceUpdateResponse
+```
+
+Methods:
+
+- client.zero_trust.networks.subnets.cloudflare_source.update(address_family, \*, account_id, \*\*params) -> CloudflareSourceUpdateResponse
+
## RiskScoring
Types:
@@ -6669,6 +6951,39 @@ Methods:
## AI
+### Inference
+
+#### Summary
+
+Types:
+
+```python
+from cloudflare.types.radar.ai.inference import SummaryModelResponse, SummaryTaskResponse
+```
+
+Methods:
+
+- client.radar.ai.inference.summary.model(\*\*params) -> SummaryModelResponse
+- client.radar.ai.inference.summary.task(\*\*params) -> SummaryTaskResponse
+
+#### TimeseriesGroups
+
+##### Summary
+
+Types:
+
+```python
+from cloudflare.types.radar.ai.inference.timeseries_groups import (
+ SummaryModelResponse,
+ SummaryTaskResponse,
+)
+```
+
+Methods:
+
+- client.radar.ai.inference.timeseries_groups.summary.model(\*\*params) -> SummaryModelResponse
+- client.radar.ai.inference.timeseries_groups.summary.task(\*\*params) -> SummaryTaskResponse
+
### Bots
#### Summary
@@ -6833,6 +7148,16 @@ Methods:
## DNS
+Types:
+
+```python
+from cloudflare.types.radar import DNSTimeseriesResponse
+```
+
+Methods:
+
+- client.radar.dns.timeseries(\*\*params) -> DNSTimeseriesResponse
+
### Top
Types:
@@ -6846,6 +7171,70 @@ Methods:
- client.radar.dns.top.ases(\*\*params) -> TopAsesResponse
- client.radar.dns.top.locations(\*\*params) -> TopLocationsResponse
+### Summary
+
+Types:
+
+```python
+from cloudflare.types.radar.dns import (
+ SummaryCacheHitResponse,
+ SummaryDNSSECResponse,
+ SummaryDNSSECAwareResponse,
+ SummaryDNSSECE2EResponse,
+ SummaryIPVersionResponse,
+ SummaryMatchingAnswerResponse,
+ SummaryProtocolResponse,
+ SummaryQueryTypeResponse,
+ SummaryResponseCodeResponse,
+ SummaryResponseTTLResponse,
+)
+```
+
+Methods:
+
+- client.radar.dns.summary.cache_hit(\*\*params) -> SummaryCacheHitResponse
+- client.radar.dns.summary.dnssec(\*\*params) -> SummaryDNSSECResponse
+- client.radar.dns.summary.dnssec_aware(\*\*params) -> SummaryDNSSECAwareResponse
+- client.radar.dns.summary.dnssec_e2e(\*\*params) -> SummaryDNSSECE2EResponse
+- client.radar.dns.summary.ip_version(\*\*params) -> SummaryIPVersionResponse
+- client.radar.dns.summary.matching_answer(\*\*params) -> SummaryMatchingAnswerResponse
+- client.radar.dns.summary.protocol(\*\*params) -> SummaryProtocolResponse
+- client.radar.dns.summary.query_type(\*\*params) -> SummaryQueryTypeResponse
+- client.radar.dns.summary.response_code(\*\*params) -> SummaryResponseCodeResponse
+- client.radar.dns.summary.response_ttl(\*\*params) -> SummaryResponseTTLResponse
+
+### TimeseriesGroups
+
+Types:
+
+```python
+from cloudflare.types.radar.dns import (
+ TimeseriesGroupCacheHitResponse,
+ TimeseriesGroupDNSSECResponse,
+ TimeseriesGroupDNSSECAwareResponse,
+ TimeseriesGroupDNSSECE2EResponse,
+ TimeseriesGroupIPVersionResponse,
+ TimeseriesGroupMatchingAnswerResponse,
+ TimeseriesGroupProtocolResponse,
+ TimeseriesGroupQueryTypeResponse,
+ TimeseriesGroupResponseCodeResponse,
+ TimeseriesGroupResponseTTLResponse,
+)
+```
+
+Methods:
+
+- client.radar.dns.timeseries_groups.cache_hit(\*\*params) -> TimeseriesGroupCacheHitResponse
+- client.radar.dns.timeseries_groups.dnssec(\*\*params) -> TimeseriesGroupDNSSECResponse
+- client.radar.dns.timeseries_groups.dnssec_aware(\*\*params) -> TimeseriesGroupDNSSECAwareResponse
+- client.radar.dns.timeseries_groups.dnssec_e2e(\*\*params) -> TimeseriesGroupDNSSECE2EResponse
+- client.radar.dns.timeseries_groups.ip_version(\*\*params) -> TimeseriesGroupIPVersionResponse
+- client.radar.dns.timeseries_groups.matching_answer(\*\*params) -> TimeseriesGroupMatchingAnswerResponse
+- client.radar.dns.timeseries_groups.protocol(\*\*params) -> TimeseriesGroupProtocolResponse
+- client.radar.dns.timeseries_groups.query_type(\*\*params) -> TimeseriesGroupQueryTypeResponse
+- client.radar.dns.timeseries_groups.response_code(\*\*params) -> TimeseriesGroupResponseCodeResponse
+- client.radar.dns.timeseries_groups.response_ttl(\*\*params) -> TimeseriesGroupResponseTTLResponse
+
## Netflows
Types:
@@ -7171,7 +7560,6 @@ Types:
from cloudflare.types.radar.attacks.layer3 import (
SummaryBitrateResponse,
SummaryDurationResponse,
- SummaryGetResponse,
SummaryIPVersionResponse,
SummaryProtocolResponse,
SummaryVectorResponse,
@@ -7182,7 +7570,6 @@ Methods:
- client.radar.attacks.layer3.summary.bitrate(\*\*params) -> SummaryBitrateResponse
- client.radar.attacks.layer3.summary.duration(\*\*params) -> SummaryDurationResponse
-- client.radar.attacks.layer3.summary.get(\*\*params) -> SummaryGetResponse
- client.radar.attacks.layer3.summary.ip_version(\*\*params) -> SummaryIPVersionResponse
- client.radar.attacks.layer3.summary.protocol(\*\*params) -> SummaryProtocolResponse
- client.radar.attacks.layer3.summary.vector(\*\*params) -> SummaryVectorResponse
@@ -7195,7 +7582,6 @@ Types:
from cloudflare.types.radar.attacks.layer3 import (
TimeseriesGroupBitrateResponse,
TimeseriesGroupDurationResponse,
- TimeseriesGroupGetResponse,
TimeseriesGroupIndustryResponse,
TimeseriesGroupIPVersionResponse,
TimeseriesGroupProtocolResponse,
@@ -7208,7 +7594,6 @@ Methods:
- client.radar.attacks.layer3.timeseries_groups.bitrate(\*\*params) -> TimeseriesGroupBitrateResponse
- client.radar.attacks.layer3.timeseries_groups.duration(\*\*params) -> TimeseriesGroupDurationResponse
-- client.radar.attacks.layer3.timeseries_groups.get(\*\*params) -> TimeseriesGroupGetResponse
- client.radar.attacks.layer3.timeseries_groups.industry(\*\*params) -> TimeseriesGroupIndustryResponse
- client.radar.attacks.layer3.timeseries_groups.ip_version(\*\*params) -> TimeseriesGroupIPVersionResponse
- client.radar.attacks.layer3.timeseries_groups.protocol(\*\*params) -> TimeseriesGroupProtocolResponse
@@ -7264,7 +7649,6 @@ Types:
```python
from cloudflare.types.radar.attacks.layer7 import (
- SummaryGetResponse,
SummaryHTTPMethodResponse,
SummaryHTTPVersionResponse,
SummaryIPVersionResponse,
@@ -7275,7 +7659,6 @@ from cloudflare.types.radar.attacks.layer7 import (
Methods:
-- client.radar.attacks.layer7.summary.get(\*\*params) -> SummaryGetResponse
- client.radar.attacks.layer7.summary.http_method(\*\*params) -> SummaryHTTPMethodResponse
- client.radar.attacks.layer7.summary.http_version(\*\*params) -> SummaryHTTPVersionResponse
- client.radar.attacks.layer7.summary.ip_version(\*\*params) -> SummaryIPVersionResponse
@@ -7288,7 +7671,6 @@ Types:
```python
from cloudflare.types.radar.attacks.layer7 import (
- TimeseriesGroupGetResponse,
TimeseriesGroupHTTPMethodResponse,
TimeseriesGroupHTTPVersionResponse,
TimeseriesGroupIndustryResponse,
@@ -7301,7 +7683,6 @@ from cloudflare.types.radar.attacks.layer7 import (
Methods:
-- client.radar.attacks.layer7.timeseries_groups.get(\*\*params) -> TimeseriesGroupGetResponse
- client.radar.attacks.layer7.timeseries_groups.http_method(\*\*params) -> TimeseriesGroupHTTPMethodResponse
- client.radar.attacks.layer7.timeseries_groups.http_version(\*\*params) -> TimeseriesGroupHTTPVersionResponse
- client.radar.attacks.layer7.timeseries_groups.industry(\*\*params) -> TimeseriesGroupIndustryResponse
@@ -7765,6 +8146,24 @@ Methods:
- client.radar.ranking.domain.get(domain, \*\*params) -> DomainGetResponse
+### InternetServices
+
+Types:
+
+```python
+from cloudflare.types.radar.ranking import (
+ InternetServiceCategoriesResponse,
+ InternetServiceTimeseriesGroupsResponse,
+ InternetServiceTopResponse,
+)
+```
+
+Methods:
+
+- client.radar.ranking.internet_services.categories(\*\*params) -> InternetServiceCategoriesResponse
+- client.radar.ranking.internet_services.timeseries_groups(\*\*params) -> InternetServiceTimeseriesGroupsResponse
+- client.radar.ranking.internet_services.top(\*\*params) -> InternetServiceTopResponse
+
## TrafficAnomalies
Types:
@@ -7805,55 +8204,201 @@ Methods:
- client.radar.tcp_resets_timeouts.summary(\*\*params) -> TCPResetsTimeoutSummaryResponse
- client.radar.tcp_resets_timeouts.timeseries_groups(\*\*params) -> TCPResetsTimeoutTimeseriesGroupsResponse
-# BotManagement
+## RobotsTXT
+
+### Top
Types:
```python
-from cloudflare.types.bot_management import (
- BotFightModeConfiguration,
- SubscriptionConfiguration,
- SuperBotFightModeDefinitelyConfiguration,
- SuperBotFightModeLikelyConfiguration,
- BotManagementUpdateResponse,
- BotManagementGetResponse,
-)
+from cloudflare.types.radar.robots_txt import TopDomainCategoriesResponse
```
Methods:
-- client.bot_management.update(\*, zone_id, \*\*params) -> Optional[BotManagementUpdateResponse]
-- client.bot_management.get(\*, zone_id) -> Optional[BotManagementGetResponse]
+- client.radar.robots_txt.top.domain_categories(\*\*params) -> TopDomainCategoriesResponse
-# OriginPostQuantumEncryption
+#### UserAgents
Types:
```python
-from cloudflare.types.origin_post_quantum_encryption import (
- OriginPostQuantumEncryptionUpdateResponse,
- OriginPostQuantumEncryptionGetResponse,
-)
+from cloudflare.types.radar.robots_txt.top import UserAgentDirectiveResponse
```
Methods:
-- client.origin_post_quantum_encryption.update(\*, zone_id, \*\*params) -> Optional[OriginPostQuantumEncryptionUpdateResponse]
-- client.origin_post_quantum_encryption.get(\*, zone_id) -> Optional[OriginPostQuantumEncryptionGetResponse]
+- client.radar.robots_txt.top.user_agents.directive(\*\*params) -> UserAgentDirectiveResponse
-# Speed
+## LeakedCredentials
+
+### Summary
Types:
```python
-from cloudflare.types.speed import LabeledRegion, LighthouseReport, Trend
+from cloudflare.types.radar.leaked_credentials import (
+ SummaryBotClassResponse,
+ SummaryCompromisedResponse,
+)
```
-## Schedule
+Methods:
-Types:
+- client.radar.leaked_credentials.summary.bot_class(\*\*params) -> SummaryBotClassResponse
+- client.radar.leaked_credentials.summary.compromised(\*\*params) -> SummaryCompromisedResponse
-```python
+### TimeseriesGroups
+
+Types:
+
+```python
+from cloudflare.types.radar.leaked_credentials import (
+ TimeseriesGroupBotClassResponse,
+ TimeseriesGroupCompromisedResponse,
+)
+```
+
+Methods:
+
+- client.radar.leaked_credentials.timeseries_groups.bot_class(\*\*params) -> TimeseriesGroupBotClassResponse
+- client.radar.leaked_credentials.timeseries_groups.compromised(\*\*params) -> TimeseriesGroupCompromisedResponse
+
+# BotManagement
+
+Types:
+
+```python
+from cloudflare.types.bot_management import (
+ BotFightModeConfiguration,
+ SubscriptionConfiguration,
+ SuperBotFightModeDefinitelyConfiguration,
+ SuperBotFightModeLikelyConfiguration,
+ BotManagementUpdateResponse,
+ BotManagementGetResponse,
+)
+```
+
+Methods:
+
+- client.bot_management.update(\*, zone_id, \*\*params) -> Optional[BotManagementUpdateResponse]
+- client.bot_management.get(\*, zone_id) -> Optional[BotManagementGetResponse]
+
+# OriginPostQuantumEncryption
+
+Types:
+
+```python
+from cloudflare.types.origin_post_quantum_encryption import (
+ OriginPostQuantumEncryptionUpdateResponse,
+ OriginPostQuantumEncryptionGetResponse,
+)
+```
+
+Methods:
+
+- client.origin_post_quantum_encryption.update(\*, zone_id, \*\*params) -> Optional[OriginPostQuantumEncryptionUpdateResponse]
+- client.origin_post_quantum_encryption.get(\*, zone_id) -> Optional[OriginPostQuantumEncryptionGetResponse]
+
+# Zaraz
+
+Types:
+
+```python
+from cloudflare.types.zaraz import ButtonTextTranslation, NeoEvent
+```
+
+Methods:
+
+- client.zaraz.update(\*, zone_id, \*\*params) -> Workflow
+
+## Config
+
+Types:
+
+```python
+from cloudflare.types.zaraz import Configuration
+```
+
+Methods:
+
+- client.zaraz.config.update(\*, zone_id, \*\*params) -> Configuration
+- client.zaraz.config.get(\*, zone_id) -> Configuration
+
+## Default
+
+Methods:
+
+- client.zaraz.default.get(\*, zone_id) -> Configuration
+
+## Export
+
+Methods:
+
+- client.zaraz.export.get(\*, zone_id) -> Configuration
+
+## History
+
+Types:
+
+```python
+from cloudflare.types.zaraz import HistoryListResponse
+```
+
+Methods:
+
+- client.zaraz.history.update(\*, zone_id, \*\*params) -> Configuration
+- client.zaraz.history.list(\*, zone_id, \*\*params) -> SyncSinglePage[HistoryListResponse]
+
+### Configs
+
+Types:
+
+```python
+from cloudflare.types.zaraz.history import ConfigGetResponse
+```
+
+Methods:
+
+- client.zaraz.history.configs.get(\*, zone_id, \*\*params) -> ConfigGetResponse
+
+## Publish
+
+Types:
+
+```python
+from cloudflare.types.zaraz import PublishCreateResponse
+```
+
+Methods:
+
+- client.zaraz.publish.create(\*, zone_id, \*\*params) -> str
+
+## Workflow
+
+Types:
+
+```python
+from cloudflare.types.zaraz import Workflow
+```
+
+Methods:
+
+- client.zaraz.workflow.get(\*, zone_id) -> Workflow
+
+# Speed
+
+Types:
+
+```python
+from cloudflare.types.speed import LabeledRegion, LighthouseReport, Trend
+```
+
+## Schedule
+
+Types:
+
+```python
from cloudflare.types.speed import Schedule, ScheduleCreateResponse, ScheduleDeleteResponse
```
@@ -7936,7 +8481,7 @@ Methods:
- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> Optional[Setting]
- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> Optional[TLSDeleteResponse]
-- client.hostnames.settings.tls.get(setting_id, \*, zone_id) -> Optional[TLSGetResponse]
+- client.hostnames.settings.tls.get(setting_id, \*, zone_id) -> SyncSinglePage[TLSGetResponse]
# Snippets
@@ -7969,7 +8514,7 @@ from cloudflare.types.snippets import RuleUpdateResponse, RuleListResponse, Rule
Methods:
-- client.snippets.rules.update(\*, zone_id, \*\*params) -> Optional[RuleUpdateResponse]
+- client.snippets.rules.update(\*, zone_id, \*\*params) -> SyncSinglePage[RuleUpdateResponse]
- client.snippets.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse]
- client.snippets.rules.delete(\*, zone_id) -> RuleDeleteResponse
@@ -8021,6 +8566,40 @@ Methods:
# CloudforceOne
+## Scans
+
+### Results
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.scans import ScanResult, ResultGetResponse
+```
+
+Methods:
+
+- client.cloudforce_one.scans.results.get(config_id, \*, account_id) -> ResultGetResponse
+
+### Config
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.scans import (
+ ConfigCreateResponse,
+ ConfigListResponse,
+ ConfigDeleteResponse,
+ ConfigEditResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.scans.config.create(\*, account_id, \*\*params) -> Optional[ConfigCreateResponse]
+- client.cloudforce_one.scans.config.list(\*, account_id) -> SyncSinglePage[ConfigListResponse]
+- client.cloudforce_one.scans.config.delete(config_id, \*, account_id) -> object
+- client.cloudforce_one.scans.config.edit(config_id, \*, account_id, \*\*params) -> Optional[ConfigEditResponse]
+
## Requests
Types:
@@ -8033,6 +8612,7 @@ from cloudflare.types.cloudforce_one import (
RequestConstants,
RequestTypes,
RequestDeleteResponse,
+ RequestTypesResponse,
)
```
@@ -8040,23 +8620,19 @@ Methods:
- client.cloudforce_one.requests.create(account_identifier, \*\*params) -> Optional[Item]
- client.cloudforce_one.requests.update(request_identifier, \*, account_identifier, \*\*params) -> Optional[Item]
-- client.cloudforce_one.requests.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[ListItem]
+- client.cloudforce_one.requests.list(account_identifier, \*\*params) -> SyncSinglePage[ListItem]
- client.cloudforce_one.requests.delete(request_identifier, \*, account_identifier) -> RequestDeleteResponse
- client.cloudforce_one.requests.constants(account_identifier) -> Optional[RequestConstants]
- client.cloudforce_one.requests.get(request_identifier, \*, account_identifier) -> Optional[Item]
- client.cloudforce_one.requests.quota(account_identifier) -> Optional[Quota]
-- client.cloudforce_one.requests.types(account_identifier) -> Optional[RequestTypes]
+- client.cloudforce_one.requests.types(account_identifier) -> SyncSinglePage[RequestTypesResponse]
### Message
Types:
```python
-from cloudflare.types.cloudforce_one.requests import (
- Message,
- MessageDeleteResponse,
- MessageGetResponse,
-)
+from cloudflare.types.cloudforce_one.requests import Message, MessageDeleteResponse
```
Methods:
@@ -8064,7 +8640,7 @@ Methods:
- client.cloudforce_one.requests.message.create(request_identifier, \*, account_identifier, \*\*params) -> Optional[Message]
- client.cloudforce_one.requests.message.update(message_identifer, \*, account_identifier, request_identifier, \*\*params) -> Optional[Message]
- client.cloudforce_one.requests.message.delete(message_identifer, \*, account_identifier, request_identifier) -> MessageDeleteResponse
-- client.cloudforce_one.requests.message.get(request_identifier, \*, account_identifier, \*\*params) -> Optional[MessageGetResponse]
+- client.cloudforce_one.requests.message.get(request_identifier, \*, account_identifier, \*\*params) -> SyncSinglePage[Message]
### Priority
@@ -8102,10 +8678,210 @@ from cloudflare.types.cloudforce_one.requests import (
Methods:
-- client.cloudforce_one.requests.assets.create(request_identifier, \*, account_identifier, \*\*params) -> Optional[AssetCreateResponse]
+- client.cloudforce_one.requests.assets.create(request_identifier, \*, account_identifier, \*\*params) -> SyncSinglePage[AssetCreateResponse]
- client.cloudforce_one.requests.assets.update(asset_identifer, \*, account_identifier, request_identifier, \*\*params) -> Optional[AssetUpdateResponse]
- client.cloudforce_one.requests.assets.delete(asset_identifer, \*, account_identifier, request_identifier) -> AssetDeleteResponse
-- client.cloudforce_one.requests.assets.get(asset_identifer, \*, account_identifier, request_identifier) -> Optional[AssetGetResponse]
+- client.cloudforce_one.requests.assets.get(asset_identifer, \*, account_identifier, request_identifier) -> SyncSinglePage[AssetGetResponse]
+
+## ThreatEvents
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one import (
+ ThreatEventCreateResponse,
+ ThreatEventDeleteResponse,
+ ThreatEventBulkCreateResponse,
+ ThreatEventEditResponse,
+ ThreatEventGetResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.create(\*, path_account_id, \*\*params) -> ThreatEventCreateResponse
+- client.cloudforce_one.threat_events.delete(event_id, \*, account_id) -> ThreatEventDeleteResponse
+- client.cloudforce_one.threat_events.bulk_create(\*, account_id, \*\*params) -> ThreatEventBulkCreateResponse
+- client.cloudforce_one.threat_events.edit(event_id, \*, account_id, \*\*params) -> ThreatEventEditResponse
+- client.cloudforce_one.threat_events.get(event_id, \*, account_id) -> ThreatEventGetResponse
+
+### Attackers
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import AttackerListResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.attackers.list(\*, account_id) -> AttackerListResponse
+
+### Categories
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import (
+ CategoryCreateResponse,
+ CategoryListResponse,
+ CategoryDeleteResponse,
+ CategoryEditResponse,
+ CategoryGetResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.categories.create(\*, account_id, \*\*params) -> CategoryCreateResponse
+- client.cloudforce_one.threat_events.categories.list(\*, account_id) -> CategoryListResponse
+- client.cloudforce_one.threat_events.categories.delete(category_id, \*, account_id) -> CategoryDeleteResponse
+- client.cloudforce_one.threat_events.categories.edit(category_id, \*, account_id, \*\*params) -> CategoryEditResponse
+- client.cloudforce_one.threat_events.categories.get(category_id, \*, account_id) -> CategoryGetResponse
+
+### Countries
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import CountryListResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.countries.list(\*, account_id) -> CountryListResponse
+
+### Crons
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import CronListResponse, CronEditResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.crons.list(\*, account_id) -> CronListResponse
+- client.cloudforce_one.threat_events.crons.edit(\*, account_id) -> CronEditResponse
+
+### Datasets
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import (
+ DatasetCreateResponse,
+ DatasetListResponse,
+ DatasetEditResponse,
+ DatasetGetResponse,
+ DatasetRawResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.datasets.create(\*, account_id, \*\*params) -> DatasetCreateResponse
+- client.cloudforce_one.threat_events.datasets.list(\*, account_id) -> DatasetListResponse
+- client.cloudforce_one.threat_events.datasets.edit(dataset_id, \*, account_id, \*\*params) -> DatasetEditResponse
+- client.cloudforce_one.threat_events.datasets.get(dataset_id, \*, account_id) -> DatasetGetResponse
+- client.cloudforce_one.threat_events.datasets.raw(event_id, \*, account_id, dataset_id) -> DatasetRawResponse
+
+### IndicatorTypes
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import IndicatorTypeListResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.indicator_types.list(\*, account_id) -> IndicatorTypeListResponse
+
+### Raw
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import RawEditResponse, RawGetResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.raw.edit(raw_id, \*, account_id, event_id, \*\*params) -> RawEditResponse
+- client.cloudforce_one.threat_events.raw.get(raw_id, \*, account_id, event_id) -> RawGetResponse
+
+### Relate
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import RelateDeleteResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.relate.delete(event_id, \*, account_id) -> RelateDeleteResponse
+
+### Tags
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import TagCreateResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.tags.create(\*, account_id, \*\*params) -> TagCreateResponse
+
+### EventTags
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import (
+ EventTagCreateResponse,
+ EventTagDeleteResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.event_tags.create(event_id, \*, account_id, \*\*params) -> EventTagCreateResponse
+- client.cloudforce_one.threat_events.event_tags.delete(event_id, \*, account_id) -> EventTagDeleteResponse
+
+### TargetIndustries
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import TargetIndustryListResponse
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.target_industries.list(\*, account_id) -> TargetIndustryListResponse
+
+### Insights
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one.threat_events import (
+ InsightCreateResponse,
+ InsightDeleteResponse,
+ InsightEditResponse,
+ InsightGetResponse,
+)
+```
+
+Methods:
+
+- client.cloudforce_one.threat_events.insights.create(event_id, \*, account_id, \*\*params) -> InsightCreateResponse
+- client.cloudforce_one.threat_events.insights.delete(insight_id, \*, account_id, event_id) -> InsightDeleteResponse
+- client.cloudforce_one.threat_events.insights.edit(insight_id, \*, account_id, event_id, \*\*params) -> InsightEditResponse
+- client.cloudforce_one.threat_events.insights.get(insight_id, \*, account_id, event_id) -> InsightGetResponse
# AIGateway
@@ -8134,12 +8910,12 @@ Methods:
Types:
```python
-from cloudflare.types.ai_gateway import EvaluationTypeGetResponse
+from cloudflare.types.ai_gateway import EvaluationTypeListResponse
```
Methods:
-- client.ai_gateway.evaluation_types.get(\*, account_id, \*\*params) -> EvaluationTypeGetResponse
+- client.ai_gateway.evaluation_types.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[EvaluationTypeListResponse]
## Logs
@@ -8207,6 +8983,18 @@ Methods:
- client.ai_gateway.evaluations.delete(id, \*, account_id, gateway_id) -> EvaluationDeleteResponse
- client.ai_gateway.evaluations.get(id, \*, account_id, gateway_id) -> EvaluationGetResponse
+## URLs
+
+Types:
+
+```python
+from cloudflare.types.ai_gateway import URLGetResponse
+```
+
+Methods:
+
+- client.ai_gateway.urls.get(provider, \*, account_id, gateway_id) -> str
+
# IAM
## PermissionGroups
@@ -8219,7 +9007,7 @@ from cloudflare.types.iam import PermissionGroupListResponse, PermissionGroupGet
Methods:
-- client.iam.permission_groups.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[object]
+- client.iam.permission_groups.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[PermissionGroupListResponse]
- client.iam.permission_groups.get(permission_group_id, \*, account_id) -> PermissionGroupGetResponse
## ResourceGroups
@@ -8240,7 +9028,7 @@ Methods:
- client.iam.resource_groups.create(\*, account_id, \*\*params) -> ResourceGroupCreateResponse
- client.iam.resource_groups.update(resource_group_id, \*, account_id, \*\*params) -> ResourceGroupUpdateResponse
-- client.iam.resource_groups.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[object]
+- client.iam.resource_groups.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ResourceGroupListResponse]
- client.iam.resource_groups.delete(resource_group_id, \*, account_id) -> Optional[ResourceGroupDeleteResponse]
- client.iam.resource_groups.get(resource_group_id, \*, account_id) -> ResourceGroupGetResponse
@@ -8256,7 +9044,7 @@ from cloudflare.types.cloud_connector import RuleUpdateResponse, RuleListRespons
Methods:
-- client.cloud_connector.rules.update(\*, zone_id, \*\*params) -> Optional[RuleUpdateResponse]
+- client.cloud_connector.rules.update(\*, zone_id, \*\*params) -> SyncSinglePage[RuleUpdateResponse]
- client.cloud_connector.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse]
# BotnetFeed
@@ -8333,6 +9121,7 @@ Types:
from cloudflare.types.workflows import (
InstanceCreateResponse,
InstanceListResponse,
+ InstanceBulkResponse,
InstanceGetResponse,
)
```
@@ -8341,6 +9130,7 @@ Methods:
- client.workflows.instances.create(workflow_name, \*, account_id, \*\*params) -> InstanceCreateResponse
- client.workflows.instances.list(workflow_name, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[InstanceListResponse]
+- client.workflows.instances.bulk(workflow_name, \*, account_id, \*\*params) -> SyncSinglePage[InstanceBulkResponse]
- client.workflows.instances.get(instance_id, \*, account_id, workflow_name) -> InstanceGetResponse
### Status
@@ -8498,9 +9288,9 @@ from cloudflare.types.content_scanning import (
Methods:
-- client.content_scanning.payloads.create(\*, zone_id, \*\*params) -> Optional[PayloadCreateResponse]
+- client.content_scanning.payloads.create(\*, zone_id, \*\*params) -> SyncSinglePage[PayloadCreateResponse]
- client.content_scanning.payloads.list(\*, zone_id) -> SyncSinglePage[PayloadListResponse]
-- client.content_scanning.payloads.delete(expression_id, \*, zone_id) -> Optional[PayloadDeleteResponse]
+- client.content_scanning.payloads.delete(expression_id, \*, zone_id) -> SyncSinglePage[PayloadDeleteResponse]
## Settings
@@ -8622,3 +9412,128 @@ from cloudflare.types.ai.models import SchemaGetResponse
Methods:
- client.ai.models.schema.get(\*, account_id, \*\*params) -> object
+
+# SecurityCenter
+
+## Insights
+
+Types:
+
+```python
+from cloudflare.types.security_center import InsightListResponse, InsightDismissResponse
+```
+
+Methods:
+
+- client.security_center.insights.list(\*, account_id, zone_id, \*\*params) -> SyncV4PagePagination[Optional[InsightListResponse]]
+- client.security_center.insights.dismiss(issue_id, \*, account_id, zone_id, \*\*params) -> InsightDismissResponse
+
+### Class
+
+Types:
+
+```python
+from cloudflare.types.security_center.insights import ClassGetResponse
+```
+
+Methods:
+
+- client.security*center.insights.class*.get(\*, account_id, zone_id, \*\*params) -> Optional[ClassGetResponse]
+
+### Severity
+
+Types:
+
+```python
+from cloudflare.types.security_center.insights import SeverityGetResponse
+```
+
+Methods:
+
+- client.security_center.insights.severity.get(\*, account_id, zone_id, \*\*params) -> Optional[SeverityGetResponse]
+
+### Type
+
+Types:
+
+```python
+from cloudflare.types.security_center.insights import TypeGetResponse
+```
+
+Methods:
+
+- client.security_center.insights.type.get(\*, account_id, zone_id, \*\*params) -> Optional[TypeGetResponse]
+
+# BrowserRendering
+
+## Content
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import ContentCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.content.create(\*, account_id, \*\*params) -> str
+
+## PDF
+
+Methods:
+
+- client.browser_rendering.pdf.create(\*, account_id, \*\*params) -> BinaryAPIResponse
+
+## Scrape
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import ScrapeCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.scrape.create(\*, account_id, \*\*params) -> ScrapeCreateResponse
+
+## Screenshot
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import ScreenshotCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.screenshot.create(\*, account_id, \*\*params) -> ScreenshotCreateResponse
+
+## Snapshot
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import SnapshotCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.snapshot.create(\*, account_id, \*\*params) -> Optional[SnapshotCreateResponse]
+
+# CustomPages
+
+Types:
+
+```python
+from cloudflare.types.custom_pages import (
+ CustomPageUpdateResponse,
+ CustomPageListResponse,
+ CustomPageGetResponse,
+)
+```
+
+Methods:
+
+- client.custom_pages.update(identifier, \*, account_id, zone_id, \*\*params) -> Optional[CustomPageUpdateResponse]
+- client.custom_pages.list(\*, account_id, zone_id) -> SyncSinglePage[object]
+- client.custom_pages.get(identifier, \*, account_id, zone_id) -> Optional[CustomPageGetResponse]
diff --git a/bin/publish-pypi b/bin/publish-pypi
index 05bfccbb71e..826054e9248 100644
--- a/bin/publish-pypi
+++ b/bin/publish-pypi
@@ -3,7 +3,4 @@
set -eux
mkdir -p dist
rye build --clean
-# Patching importlib-metadata version until upstream library version is updated
-# https://github.com/pypa/twine/issues/977#issuecomment-2189800841
-"$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1'
rye publish --yes --token=$PYPI_TOKEN
diff --git a/mypy.ini b/mypy.ini
index 4511df962f0..e929ff8caa2 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -41,7 +41,7 @@ cache_fine_grained = True
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
-disable_error_code = func-returns-value
+disable_error_code = func-returns-value,overload-cannot-match
# https://github.com/python/mypy/issues/12162
[mypy.overrides]
diff --git a/pyproject.toml b/pyproject.toml
index 2dcb85b55ab..94e2b8e68f3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
-version = "4.0.0"
+version = "4.1.0"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
@@ -38,7 +38,6 @@ Homepage = "https://github.com/cloudflare/cloudflare-python"
Repository = "https://github.com/cloudflare/cloudflare-python"
-
[tool.rye]
managed = true
# version pins are in requirements-dev.lock
@@ -54,6 +53,7 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
+ "nest_asyncio==1.6.0",
]
[tool.rye.scripts]
@@ -86,7 +86,7 @@ typecheck = { chain = [
"typecheck:mypy" = "mypy ."
[build-system]
-requires = ["hatchling", "hatch-fancy-pypi-readme"]
+requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[tool.hatch.build]
@@ -128,6 +128,7 @@ testpaths = ["tests"]
addopts = "--tb=short"
xfail_strict = true
asyncio_mode = "auto"
+asyncio_default_fixture_loop_scope = "session"
filterwarnings = [
"error"
]
@@ -176,7 +177,7 @@ select = [
"T201",
"T203",
# misuse of typing.TYPE_CHECKING
- "TCH004",
+ "TC004",
# import rules
"TID251",
]
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 83265a0ae6f..91579dc20f6 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -7,6 +7,7 @@
# all-features: true
# with-sources: false
# generate-hashes: false
+# universal: false
-e file:.
annotated-types==0.6.0
@@ -48,9 +49,10 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
-mypy==1.13.0
+mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
+nest-asyncio==1.6.0
nodeenv==1.8.0
# via pyright
nox==2023.4.22
@@ -67,7 +69,7 @@ pydantic-core==2.27.1
# via pydantic
pygments==2.18.0
# via rich
-pyright==1.1.390
+pyright==1.1.392.post0
pytest==8.3.3
# via pytest-asyncio
pytest-asyncio==0.24.0
@@ -77,7 +79,7 @@ pytz==2023.3.post1
# via dirty-equals
respx==0.22.0
rich==13.7.1
-ruff==0.6.9
+ruff==0.9.4
setuptools==68.2.2
# via nodeenv
six==1.16.0
diff --git a/requirements.lock b/requirements.lock
index 0463774b05f..4752e59fd63 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -7,6 +7,7 @@
# all-features: true
# with-sources: false
# generate-hashes: false
+# universal: false
-e file:.
annotated-types==0.6.0
diff --git a/scripts/bootstrap b/scripts/bootstrap
index 8c5c60eba34..e84fe62c380 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -4,7 +4,7 @@ set -e
cd "$(dirname "$0")/.."
-if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
+if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
diff --git a/scripts/lint b/scripts/lint
index aa39f69ffbd..9ad76783d44 100755
--- a/scripts/lint
+++ b/scripts/lint
@@ -9,4 +9,3 @@ rye run lint
echo "==> Making sure it imports"
rye run python -c 'import cloudflare'
-
diff --git a/scripts/test b/scripts/test
index 4fa5698b8fa..2b87845670b 100755
--- a/scripts/test
+++ b/scripts/test
@@ -52,6 +52,8 @@ else
echo
fi
+export DEFER_PYDANTIC_BUILD=false
+
echo "==> Running tests"
rye run pytest "$@"
diff --git a/scripts/utils/ruffen-docs.py b/scripts/utils/ruffen-docs.py
index 37b3d94f0f8..0cf2bd2fd9d 100644
--- a/scripts/utils/ruffen-docs.py
+++ b/scripts/utils/ruffen-docs.py
@@ -47,7 +47,7 @@ def _md_match(match: Match[str]) -> str:
with _collect_error(match):
code = format_code_block(code)
code = textwrap.indent(code, match["indent"])
- return f'{match["before"]}{code}{match["after"]}'
+ return f"{match['before']}{code}{match['after']}"
def _pycon_match(match: Match[str]) -> str:
code = ""
@@ -97,7 +97,7 @@ def finish_fragment() -> None:
def _md_pycon_match(match: Match[str]) -> str:
code = _pycon_match(match)
code = textwrap.indent(code, match["indent"])
- return f'{match["before"]}{code}{match["after"]}'
+ return f"{match['before']}{code}{match['after']}"
src = MD_RE.sub(_md_match, src)
src = MD_PYCON_RE.sub(_md_pycon_match, src)
diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py
index c8867a59b53..649c86dfde8 100644
--- a/src/cloudflare/_base_client.py
+++ b/src/cloudflare/_base_client.py
@@ -9,7 +9,6 @@
import inspect
import logging
import platform
-import warnings
import email.utils
from types import TracebackType
from random import random
@@ -36,7 +35,7 @@
import httpx
import distro
import pydantic
-from httpx import URL, Limits
+from httpx import URL
from pydantic import PrivateAttr
from . import _exceptions
@@ -51,19 +50,16 @@
Timeout,
NotGiven,
ResponseT,
- Transport,
AnyMapping,
PostParser,
- ProxiesTypes,
RequestFiles,
HttpxSendArgs,
- AsyncTransport,
RequestOptions,
HttpxRequestFiles,
ModelBuilderProtocol,
)
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
-from ._compat import model_copy, model_dump
+from ._compat import PYDANTIC_V2, model_copy, model_dump
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
from ._response import (
APIResponse,
@@ -207,6 +203,9 @@ def _set_private_attributes(
model: Type[_T],
options: FinalRequestOptions,
) -> None:
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
+ self.__pydantic_private__ = {}
+
self._model = model
self._client = client
self._options = options
@@ -292,6 +291,9 @@ def _set_private_attributes(
client: AsyncAPIClient,
options: FinalRequestOptions,
) -> None:
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
+ self.__pydantic_private__ = {}
+
self._model = model
self._client = client
self._options = options
@@ -331,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
_base_url: URL
max_retries: int
timeout: Union[float, Timeout, None]
- _limits: httpx.Limits
- _proxies: ProxiesTypes | None
- _transport: Transport | AsyncTransport | None
_strict_response_validation: bool
_idempotency_header: str | None
_default_stream_cls: type[_DefaultStreamT] | None = None
@@ -346,9 +345,6 @@ def __init__(
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
- limits: httpx.Limits,
- transport: Transport | AsyncTransport | None,
- proxies: ProxiesTypes | None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
) -> None:
@@ -356,9 +352,6 @@ def __init__(
self._base_url = self._enforce_trailing_slash(URL(base_url))
self.max_retries = max_retries
self.timeout = timeout
- self._limits = limits
- self._proxies = proxies
- self._transport = transport
self._custom_headers = custom_headers or {}
self._custom_query = custom_query or {}
self._strict_response_validation = _strict_response_validation
@@ -418,10 +411,17 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0
if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
- # Don't set the retry count header if it was already set or removed by the caller. We check
+ # Don't set these headers if they were already set or removed by the caller. We check
# `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
- if "x-stainless-retry-count" not in (header.lower() for header in custom_headers):
+ lower_custom_headers = [header.lower() for header in custom_headers]
+ if "x-stainless-retry-count" not in lower_custom_headers:
headers["x-stainless-retry-count"] = str(retries_taken)
+ if "x-stainless-read-timeout" not in lower_custom_headers:
+ timeout = self.timeout if isinstance(options.timeout, NotGiven) else options.timeout
+ if isinstance(timeout, Timeout):
+ timeout = timeout.read
+ if timeout is not None:
+ headers["x-stainless-read-timeout"] = str(timeout)
return headers
@@ -511,7 +511,7 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
- json=json_data,
+ json=json_data if is_given(json_data) else None,
files=files,
**kwargs,
)
@@ -787,46 +787,11 @@ def __init__(
base_url: str | URL,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
- transport: Transport | None = None,
- proxies: ProxiesTypes | None = None,
- limits: Limits | None = None,
http_client: httpx.Client | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
_strict_response_validation: bool,
) -> None:
- kwargs: dict[str, Any] = {}
- if limits is not None:
- warnings.warn(
- "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
- else:
- limits = DEFAULT_CONNECTION_LIMITS
-
- if transport is not None:
- kwargs["transport"] = transport
- warnings.warn(
- "The `transport` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
-
- if proxies is not None:
- kwargs["proxies"] = proxies
- warnings.warn(
- "The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
-
if not is_given(timeout):
# if the user passed in a custom http client with a non-default
# timeout set then we use that timeout.
@@ -847,12 +812,9 @@ def __init__(
super().__init__(
version=version,
- limits=limits,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
- proxies=proxies,
base_url=base_url,
- transport=transport,
max_retries=max_retries,
custom_query=custom_query,
custom_headers=custom_headers,
@@ -862,9 +824,6 @@ def __init__(
base_url=base_url,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
- limits=limits,
- follow_redirects=True,
- **kwargs, # type: ignore
)
def is_closed(self) -> bool:
@@ -1359,45 +1318,10 @@ def __init__(
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
- transport: AsyncTransport | None = None,
- proxies: ProxiesTypes | None = None,
- limits: Limits | None = None,
http_client: httpx.AsyncClient | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
) -> None:
- kwargs: dict[str, Any] = {}
- if limits is not None:
- warnings.warn(
- "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
- else:
- limits = DEFAULT_CONNECTION_LIMITS
-
- if transport is not None:
- kwargs["transport"] = transport
- warnings.warn(
- "The `transport` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
-
- if proxies is not None:
- kwargs["proxies"] = proxies
- warnings.warn(
- "The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
- category=DeprecationWarning,
- stacklevel=3,
- )
- if http_client is not None:
- raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
-
if not is_given(timeout):
# if the user passed in a custom http client with a non-default
# timeout set then we use that timeout.
@@ -1419,11 +1343,8 @@ def __init__(
super().__init__(
version=version,
base_url=base_url,
- limits=limits,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
- proxies=proxies,
- transport=transport,
max_retries=max_retries,
custom_query=custom_query,
custom_headers=custom_headers,
@@ -1433,9 +1354,6 @@ def __init__(
base_url=base_url,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
- limits=limits,
- follow_redirects=True,
- **kwargs, # type: ignore
)
def is_closed(self) -> bool:
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index f48b5ae2359..f3a20643345 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -57,6 +57,7 @@
radar,
rules,
speed,
+ zaraz,
zones,
images,
queues,
@@ -89,6 +90,7 @@
page_shield,
rate_limits,
url_scanner,
+ custom_pages,
dns_firewall,
healthchecks,
security_txt,
@@ -104,10 +106,12 @@
cloud_connector,
durable_objects,
request_tracers,
+ security_center,
brand_protection,
content_scanning,
custom_hostnames,
resource_sharing,
+ browser_rendering,
mtls_certificates,
url_normalization,
custom_nameservers,
@@ -115,7 +119,9 @@
client_certificates,
custom_certificates,
keyless_certificates,
+ network_interconnects,
workers_for_platforms,
+ magic_cloud_networking,
origin_ca_certificates,
origin_tls_client_auth,
certificate_authorities,
@@ -149,7 +155,9 @@
from .resources.rate_limits import RateLimitsResource, AsyncRateLimitsResource
from .resources.rules.rules import RulesResource, AsyncRulesResource
from .resources.speed.speed import SpeedResource, AsyncSpeedResource
+ from .resources.zaraz.zaraz import ZarazResource, AsyncZarazResource
from .resources.zones.zones import ZonesResource, AsyncZonesResource
+ from .resources.custom_pages import CustomPagesResource, AsyncCustomPagesResource
from .resources.security_txt import SecurityTXTResource, AsyncSecurityTXTResource
from .resources.abuse_reports import AbuseReportsResource, AsyncAbuseReportsResource
from .resources.images.images import ImagesResource, AsyncImagesResource
@@ -202,18 +210,28 @@
from .resources.cloud_connector.cloud_connector import CloudConnectorResource, AsyncCloudConnectorResource
from .resources.durable_objects.durable_objects import DurableObjectsResource, AsyncDurableObjectsResource
from .resources.request_tracers.request_tracers import RequestTracersResource, AsyncRequestTracersResource
+ from .resources.security_center.security_center import SecurityCenterResource, AsyncSecurityCenterResource
from .resources.content_scanning.content_scanning import ContentScanningResource, AsyncContentScanningResource
from .resources.custom_hostnames.custom_hostnames import CustomHostnamesResource, AsyncCustomHostnamesResource
from .resources.resource_sharing.resource_sharing import ResourceSharingResource, AsyncResourceSharingResource
+ from .resources.browser_rendering.browser_rendering import BrowserRenderingResource, AsyncBrowserRenderingResource
from .resources.mtls_certificates.mtls_certificates import MTLSCertificatesResource, AsyncMTLSCertificatesResource
from .resources.custom_certificates.custom_certificates import (
CustomCertificatesResource,
AsyncCustomCertificatesResource,
)
+ from .resources.network_interconnects.network_interconnects import (
+ NetworkInterconnectsResource,
+ AsyncNetworkInterconnectsResource,
+ )
from .resources.workers_for_platforms.workers_for_platforms import (
WorkersForPlatformsResource,
AsyncWorkersForPlatformsResource,
)
+ from .resources.magic_cloud_networking.magic_cloud_networking import (
+ MagicCloudNetworkingResource,
+ AsyncMagicCloudNetworkingResource,
+ )
from .resources.origin_tls_client_auth.origin_tls_client_auth import (
OriginTLSClientAuthResource,
AsyncOriginTLSClientAuthResource,
@@ -276,7 +294,7 @@ def __init__(
# part of our public interface in the future.
_strict_response_validation: bool = False,
) -> None:
- """Construct a new synchronous cloudflare client instance.
+ """Construct a new synchronous Cloudflare client instance.
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
- `api_token` from `CLOUDFLARE_API_TOKEN`
@@ -616,6 +634,18 @@ def magic_network_monitoring(self) -> MagicNetworkMonitoringResource:
return MagicNetworkMonitoringResource(self)
+ @cached_property
+ def magic_cloud_networking(self) -> MagicCloudNetworkingResource:
+ from .resources.magic_cloud_networking import MagicCloudNetworkingResource
+
+ return MagicCloudNetworkingResource(self)
+
+ @cached_property
+ def network_interconnects(self) -> NetworkInterconnectsResource:
+ from .resources.network_interconnects import NetworkInterconnectsResource
+
+ return NetworkInterconnectsResource(self)
+
@cached_property
def mtls_certificates(self) -> MTLSCertificatesResource:
from .resources.mtls_certificates import MTLSCertificatesResource
@@ -730,6 +760,12 @@ def origin_post_quantum_encryption(self) -> OriginPostQuantumEncryptionResource:
return OriginPostQuantumEncryptionResource(self)
+ @cached_property
+ def zaraz(self) -> ZarazResource:
+ from .resources.zaraz import ZarazResource
+
+ return ZarazResource(self)
+
@cached_property
def speed(self) -> SpeedResource:
from .resources.speed import SpeedResource
@@ -832,6 +868,24 @@ def ai(self) -> AIResource:
return AIResource(self)
+ @cached_property
+ def security_center(self) -> SecurityCenterResource:
+ from .resources.security_center import SecurityCenterResource
+
+ return SecurityCenterResource(self)
+
+ @cached_property
+ def browser_rendering(self) -> BrowserRenderingResource:
+ from .resources.browser_rendering import BrowserRenderingResource
+
+ return BrowserRenderingResource(self)
+
+ @cached_property
+ def custom_pages(self) -> CustomPagesResource:
+ from .resources.custom_pages import CustomPagesResource
+
+ return CustomPagesResource(self)
+
@cached_property
def with_raw_response(self) -> CloudflareWithRawResponse:
return CloudflareWithRawResponse(self)
@@ -1047,7 +1101,7 @@ def __init__(
# part of our public interface in the future.
_strict_response_validation: bool = False,
) -> None:
- """Construct a new async cloudflare client instance.
+ """Construct a new async AsyncCloudflare client instance.
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
- `api_token` from `CLOUDFLARE_API_TOKEN`
@@ -1387,6 +1441,18 @@ def magic_network_monitoring(self) -> AsyncMagicNetworkMonitoringResource:
return AsyncMagicNetworkMonitoringResource(self)
+ @cached_property
+ def magic_cloud_networking(self) -> AsyncMagicCloudNetworkingResource:
+ from .resources.magic_cloud_networking import AsyncMagicCloudNetworkingResource
+
+ return AsyncMagicCloudNetworkingResource(self)
+
+ @cached_property
+ def network_interconnects(self) -> AsyncNetworkInterconnectsResource:
+ from .resources.network_interconnects import AsyncNetworkInterconnectsResource
+
+ return AsyncNetworkInterconnectsResource(self)
+
@cached_property
def mtls_certificates(self) -> AsyncMTLSCertificatesResource:
from .resources.mtls_certificates import AsyncMTLSCertificatesResource
@@ -1501,6 +1567,12 @@ def origin_post_quantum_encryption(self) -> AsyncOriginPostQuantumEncryptionReso
return AsyncOriginPostQuantumEncryptionResource(self)
+ @cached_property
+ def zaraz(self) -> AsyncZarazResource:
+ from .resources.zaraz import AsyncZarazResource
+
+ return AsyncZarazResource(self)
+
@cached_property
def speed(self) -> AsyncSpeedResource:
from .resources.speed import AsyncSpeedResource
@@ -1603,6 +1675,24 @@ def ai(self) -> AsyncAIResource:
return AsyncAIResource(self)
+ @cached_property
+ def security_center(self) -> AsyncSecurityCenterResource:
+ from .resources.security_center import AsyncSecurityCenterResource
+
+ return AsyncSecurityCenterResource(self)
+
+ @cached_property
+ def browser_rendering(self) -> AsyncBrowserRenderingResource:
+ from .resources.browser_rendering import AsyncBrowserRenderingResource
+
+ return AsyncBrowserRenderingResource(self)
+
+ @cached_property
+ def custom_pages(self) -> AsyncCustomPagesResource:
+ from .resources.custom_pages import AsyncCustomPagesResource
+
+ return AsyncCustomPagesResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncCloudflareWithRawResponse:
return AsyncCloudflareWithRawResponse(self)
@@ -2091,6 +2181,18 @@ def magic_network_monitoring(self) -> magic_network_monitoring.MagicNetworkMonit
return MagicNetworkMonitoringResourceWithRawResponse(self._client.magic_network_monitoring)
+ @cached_property
+ def magic_cloud_networking(self) -> magic_cloud_networking.MagicCloudNetworkingResourceWithRawResponse:
+ from .resources.magic_cloud_networking import MagicCloudNetworkingResourceWithRawResponse
+
+ return MagicCloudNetworkingResourceWithRawResponse(self._client.magic_cloud_networking)
+
+ @cached_property
+ def network_interconnects(self) -> network_interconnects.NetworkInterconnectsResourceWithRawResponse:
+ from .resources.network_interconnects import NetworkInterconnectsResourceWithRawResponse
+
+ return NetworkInterconnectsResourceWithRawResponse(self._client.network_interconnects)
+
@cached_property
def mtls_certificates(self) -> mtls_certificates.MTLSCertificatesResourceWithRawResponse:
from .resources.mtls_certificates import MTLSCertificatesResourceWithRawResponse
@@ -2207,6 +2309,12 @@ def origin_post_quantum_encryption(
return OriginPostQuantumEncryptionResourceWithRawResponse(self._client.origin_post_quantum_encryption)
+ @cached_property
+ def zaraz(self) -> zaraz.ZarazResourceWithRawResponse:
+ from .resources.zaraz import ZarazResourceWithRawResponse
+
+ return ZarazResourceWithRawResponse(self._client.zaraz)
+
@cached_property
def speed(self) -> speed.SpeedResourceWithRawResponse:
from .resources.speed import SpeedResourceWithRawResponse
@@ -2309,6 +2417,24 @@ def ai(self) -> ai.AIResourceWithRawResponse:
return AIResourceWithRawResponse(self._client.ai)
+ @cached_property
+ def security_center(self) -> security_center.SecurityCenterResourceWithRawResponse:
+ from .resources.security_center import SecurityCenterResourceWithRawResponse
+
+ return SecurityCenterResourceWithRawResponse(self._client.security_center)
+
+ @cached_property
+ def browser_rendering(self) -> browser_rendering.BrowserRenderingResourceWithRawResponse:
+ from .resources.browser_rendering import BrowserRenderingResourceWithRawResponse
+
+ return BrowserRenderingResourceWithRawResponse(self._client.browser_rendering)
+
+ @cached_property
+ def custom_pages(self) -> custom_pages.CustomPagesResourceWithRawResponse:
+ from .resources.custom_pages import CustomPagesResourceWithRawResponse
+
+ return CustomPagesResourceWithRawResponse(self._client.custom_pages)
+
class AsyncCloudflareWithRawResponse:
_client: AsyncCloudflare
@@ -2616,6 +2742,18 @@ def magic_network_monitoring(self) -> magic_network_monitoring.AsyncMagicNetwork
return AsyncMagicNetworkMonitoringResourceWithRawResponse(self._client.magic_network_monitoring)
+ @cached_property
+ def magic_cloud_networking(self) -> magic_cloud_networking.AsyncMagicCloudNetworkingResourceWithRawResponse:
+ from .resources.magic_cloud_networking import AsyncMagicCloudNetworkingResourceWithRawResponse
+
+ return AsyncMagicCloudNetworkingResourceWithRawResponse(self._client.magic_cloud_networking)
+
+ @cached_property
+ def network_interconnects(self) -> network_interconnects.AsyncNetworkInterconnectsResourceWithRawResponse:
+ from .resources.network_interconnects import AsyncNetworkInterconnectsResourceWithRawResponse
+
+ return AsyncNetworkInterconnectsResourceWithRawResponse(self._client.network_interconnects)
+
@cached_property
def mtls_certificates(self) -> mtls_certificates.AsyncMTLSCertificatesResourceWithRawResponse:
from .resources.mtls_certificates import AsyncMTLSCertificatesResourceWithRawResponse
@@ -2732,6 +2870,12 @@ def origin_post_quantum_encryption(
return AsyncOriginPostQuantumEncryptionResourceWithRawResponse(self._client.origin_post_quantum_encryption)
+ @cached_property
+ def zaraz(self) -> zaraz.AsyncZarazResourceWithRawResponse:
+ from .resources.zaraz import AsyncZarazResourceWithRawResponse
+
+ return AsyncZarazResourceWithRawResponse(self._client.zaraz)
+
@cached_property
def speed(self) -> speed.AsyncSpeedResourceWithRawResponse:
from .resources.speed import AsyncSpeedResourceWithRawResponse
@@ -2834,6 +2978,24 @@ def ai(self) -> ai.AsyncAIResourceWithRawResponse:
return AsyncAIResourceWithRawResponse(self._client.ai)
+ @cached_property
+ def security_center(self) -> security_center.AsyncSecurityCenterResourceWithRawResponse:
+ from .resources.security_center import AsyncSecurityCenterResourceWithRawResponse
+
+ return AsyncSecurityCenterResourceWithRawResponse(self._client.security_center)
+
+ @cached_property
+ def browser_rendering(self) -> browser_rendering.AsyncBrowserRenderingResourceWithRawResponse:
+ from .resources.browser_rendering import AsyncBrowserRenderingResourceWithRawResponse
+
+ return AsyncBrowserRenderingResourceWithRawResponse(self._client.browser_rendering)
+
+ @cached_property
+ def custom_pages(self) -> custom_pages.AsyncCustomPagesResourceWithRawResponse:
+ from .resources.custom_pages import AsyncCustomPagesResourceWithRawResponse
+
+ return AsyncCustomPagesResourceWithRawResponse(self._client.custom_pages)
+
class CloudflareWithStreamedResponse:
_client: Cloudflare
@@ -3141,6 +3303,18 @@ def magic_network_monitoring(self) -> magic_network_monitoring.MagicNetworkMonit
return MagicNetworkMonitoringResourceWithStreamingResponse(self._client.magic_network_monitoring)
+ @cached_property
+ def magic_cloud_networking(self) -> magic_cloud_networking.MagicCloudNetworkingResourceWithStreamingResponse:
+ from .resources.magic_cloud_networking import MagicCloudNetworkingResourceWithStreamingResponse
+
+ return MagicCloudNetworkingResourceWithStreamingResponse(self._client.magic_cloud_networking)
+
+ @cached_property
+ def network_interconnects(self) -> network_interconnects.NetworkInterconnectsResourceWithStreamingResponse:
+ from .resources.network_interconnects import NetworkInterconnectsResourceWithStreamingResponse
+
+ return NetworkInterconnectsResourceWithStreamingResponse(self._client.network_interconnects)
+
@cached_property
def mtls_certificates(self) -> mtls_certificates.MTLSCertificatesResourceWithStreamingResponse:
from .resources.mtls_certificates import MTLSCertificatesResourceWithStreamingResponse
@@ -3257,6 +3431,12 @@ def origin_post_quantum_encryption(
return OriginPostQuantumEncryptionResourceWithStreamingResponse(self._client.origin_post_quantum_encryption)
+ @cached_property
+ def zaraz(self) -> zaraz.ZarazResourceWithStreamingResponse:
+ from .resources.zaraz import ZarazResourceWithStreamingResponse
+
+ return ZarazResourceWithStreamingResponse(self._client.zaraz)
+
@cached_property
def speed(self) -> speed.SpeedResourceWithStreamingResponse:
from .resources.speed import SpeedResourceWithStreamingResponse
@@ -3359,6 +3539,24 @@ def ai(self) -> ai.AIResourceWithStreamingResponse:
return AIResourceWithStreamingResponse(self._client.ai)
+ @cached_property
+ def security_center(self) -> security_center.SecurityCenterResourceWithStreamingResponse:
+ from .resources.security_center import SecurityCenterResourceWithStreamingResponse
+
+ return SecurityCenterResourceWithStreamingResponse(self._client.security_center)
+
+ @cached_property
+ def browser_rendering(self) -> browser_rendering.BrowserRenderingResourceWithStreamingResponse:
+ from .resources.browser_rendering import BrowserRenderingResourceWithStreamingResponse
+
+ return BrowserRenderingResourceWithStreamingResponse(self._client.browser_rendering)
+
+ @cached_property
+ def custom_pages(self) -> custom_pages.CustomPagesResourceWithStreamingResponse:
+ from .resources.custom_pages import CustomPagesResourceWithStreamingResponse
+
+ return CustomPagesResourceWithStreamingResponse(self._client.custom_pages)
+
class AsyncCloudflareWithStreamedResponse:
_client: AsyncCloudflare
@@ -3670,6 +3868,18 @@ def magic_network_monitoring(
return AsyncMagicNetworkMonitoringResourceWithStreamingResponse(self._client.magic_network_monitoring)
+ @cached_property
+ def magic_cloud_networking(self) -> magic_cloud_networking.AsyncMagicCloudNetworkingResourceWithStreamingResponse:
+ from .resources.magic_cloud_networking import AsyncMagicCloudNetworkingResourceWithStreamingResponse
+
+ return AsyncMagicCloudNetworkingResourceWithStreamingResponse(self._client.magic_cloud_networking)
+
+ @cached_property
+ def network_interconnects(self) -> network_interconnects.AsyncNetworkInterconnectsResourceWithStreamingResponse:
+ from .resources.network_interconnects import AsyncNetworkInterconnectsResourceWithStreamingResponse
+
+ return AsyncNetworkInterconnectsResourceWithStreamingResponse(self._client.network_interconnects)
+
@cached_property
def mtls_certificates(self) -> mtls_certificates.AsyncMTLSCertificatesResourceWithStreamingResponse:
from .resources.mtls_certificates import AsyncMTLSCertificatesResourceWithStreamingResponse
@@ -3790,6 +4000,12 @@ def origin_post_quantum_encryption(
self._client.origin_post_quantum_encryption
)
+ @cached_property
+ def zaraz(self) -> zaraz.AsyncZarazResourceWithStreamingResponse:
+ from .resources.zaraz import AsyncZarazResourceWithStreamingResponse
+
+ return AsyncZarazResourceWithStreamingResponse(self._client.zaraz)
+
@cached_property
def speed(self) -> speed.AsyncSpeedResourceWithStreamingResponse:
from .resources.speed import AsyncSpeedResourceWithStreamingResponse
@@ -3894,6 +4110,24 @@ def ai(self) -> ai.AsyncAIResourceWithStreamingResponse:
return AsyncAIResourceWithStreamingResponse(self._client.ai)
+ @cached_property
+ def security_center(self) -> security_center.AsyncSecurityCenterResourceWithStreamingResponse:
+ from .resources.security_center import AsyncSecurityCenterResourceWithStreamingResponse
+
+ return AsyncSecurityCenterResourceWithStreamingResponse(self._client.security_center)
+
+ @cached_property
+ def browser_rendering(self) -> browser_rendering.AsyncBrowserRenderingResourceWithStreamingResponse:
+ from .resources.browser_rendering import AsyncBrowserRenderingResourceWithStreamingResponse
+
+ return AsyncBrowserRenderingResourceWithStreamingResponse(self._client.browser_rendering)
+
+ @cached_property
+ def custom_pages(self) -> custom_pages.AsyncCustomPagesResourceWithStreamingResponse:
+ from .resources.custom_pages import AsyncCustomPagesResourceWithStreamingResponse
+
+ return AsyncCustomPagesResourceWithStreamingResponse(self._client.custom_pages)
+
Client = Cloudflare
diff --git a/src/cloudflare/_constants.py b/src/cloudflare/_constants.py
index a2ac3b6f327..6ddf2c7170b 100644
--- a/src/cloudflare/_constants.py
+++ b/src/cloudflare/_constants.py
@@ -6,7 +6,7 @@
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
# default timeout is 1 minute
-DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
+DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
DEFAULT_MAX_RETRIES = 2
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
diff --git a/src/cloudflare/_files.py b/src/cloudflare/_files.py
index 715cc2078d1..8c03622633a 100644
--- a/src/cloudflare/_files.py
+++ b/src/cloudflare/_files.py
@@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None:
if not is_file_content(obj):
prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`"
raise RuntimeError(
- f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead."
+ f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/cloudflare/cloudflare-python/tree/main#file-uploads"
) from None
diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py
index 9a918aabf37..b51a1bf5f94 100644
--- a/src/cloudflare/_models.py
+++ b/src/cloudflare/_models.py
@@ -65,7 +65,7 @@
from ._constants import RAW_RESPONSE_HEADER
if TYPE_CHECKING:
- from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema
+ from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema
__all__ = ["BaseModel", "GenericModel"]
@@ -172,7 +172,7 @@ def to_json(
@override
def __str__(self) -> str:
# mypy complains about an invalid self arg
- return f'{self.__repr_name__()}({self.__repr_str__(", ")})' # type: ignore[misc]
+ return f"{self.__repr_name__()}({self.__repr_str__(', ')})" # type: ignore[misc]
# Override the 'construct' method in a way that supports recursive parsing without validation.
# Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836.
@@ -426,10 +426,16 @@ def construct_type(*, value: object, type_: object) -> object:
If the given value does not match the expected type then it is returned as-is.
"""
+
+ # store a reference to the original type we were given before we extract any inner
+ # types so that we can properly resolve forward references in `TypeAliasType` annotations
+ original_type = None
+
# we allow `object` as the input type because otherwise, passing things like
# `Literal['value']` will be reported as a type error by type checkers
type_ = cast("type[object]", type_)
if is_type_alias_type(type_):
+ original_type = type_ # type: ignore[unreachable]
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
@@ -446,7 +452,7 @@ def construct_type(*, value: object, type_: object) -> object:
if is_union(origin):
try:
- return validate_type(type_=cast("type[object]", type_), value=value)
+ return validate_type(type_=cast("type[object]", original_type or type_), value=value)
except Exception:
pass
@@ -640,15 +646,18 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
def _extract_field_schema_pv2(model: type[BaseModel], field_name: str) -> ModelField | None:
schema = model.__pydantic_core_schema__
+ if schema["type"] == "definitions":
+ schema = schema["schema"]
+
if schema["type"] != "model":
return None
+ schema = cast("ModelSchema", schema)
fields_schema = schema["schema"]
if fields_schema["type"] != "model-fields":
return None
fields_schema = cast("ModelFieldsSchema", fields_schema)
-
field = fields_schema["fields"].get(field_name)
if not field:
return None
diff --git a/src/cloudflare/_response.py b/src/cloudflare/_response.py
index c0db87171ff..f20e4379a89 100644
--- a/src/cloudflare/_response.py
+++ b/src/cloudflare/_response.py
@@ -136,6 +136,8 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if cast_to and is_annotated_type(cast_to):
cast_to = extract_type_arg(cast_to, 0)
+ origin = get_origin(cast_to) or cast_to
+
if self._is_sse_stream:
if to:
if not is_stream_class_type(to):
@@ -195,8 +197,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if cast_to == bool:
return cast(R, response.text.lower() == "true")
- origin = get_origin(cast_to) or cast_to
-
if origin == APIResponse:
raise RuntimeError("Unexpected state - cast_to is `APIResponse`")
@@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
return cast(R, response)
- if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
+ if (
+ inspect.isclass(
+ origin # pyright: ignore[reportUnknownArgumentType]
+ )
+ and not issubclass(origin, BaseModel)
+ and issubclass(origin, pydantic.BaseModel)
+ ):
raise TypeError(
"Pydantic models must subclass our base model type, e.g. `from cloudflare import BaseModel`"
)
diff --git a/src/cloudflare/_utils/_sync.py b/src/cloudflare/_utils/_sync.py
index d0d810337ec..ad7ec71b76b 100644
--- a/src/cloudflare/_utils/_sync.py
+++ b/src/cloudflare/_utils/_sync.py
@@ -1,56 +1,77 @@
from __future__ import annotations
+import sys
+import asyncio
import functools
-from typing import TypeVar, Callable, Awaitable
+import contextvars
+from typing import Any, TypeVar, Callable, Awaitable
from typing_extensions import ParamSpec
import anyio
+import sniffio
import anyio.to_thread
-from ._reflection import function_has_argument
-
T_Retval = TypeVar("T_Retval")
T_ParamSpec = ParamSpec("T_ParamSpec")
-# copied from `asyncer`, https://github.com/tiangolo/asyncer
-def asyncify(
- function: Callable[T_ParamSpec, T_Retval],
- *,
- cancellable: bool = False,
- limiter: anyio.CapacityLimiter | None = None,
-) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
+if sys.version_info >= (3, 9):
+ _asyncio_to_thread = asyncio.to_thread
+else:
+ # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
+ # for Python 3.8 support
+ async def _asyncio_to_thread(
+ func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
+ ) -> Any:
+ """Asynchronously run function *func* in a separate thread.
+
+ Any *args and **kwargs supplied for this function are directly passed
+ to *func*. Also, the current :class:`contextvars.Context` is propagated,
+ allowing context variables from the main thread to be accessed in the
+ separate thread.
+
+ Returns a coroutine that can be awaited to get the eventual result of *func*.
+ """
+ loop = asyncio.events.get_running_loop()
+ ctx = contextvars.copy_context()
+ func_call = functools.partial(ctx.run, func, *args, **kwargs)
+ return await loop.run_in_executor(None, func_call)
+
+
+async def to_thread(
+ func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
+) -> T_Retval:
+ if sniffio.current_async_library() == "asyncio":
+ return await _asyncio_to_thread(func, *args, **kwargs)
+
+ return await anyio.to_thread.run_sync(
+ functools.partial(func, *args, **kwargs),
+ )
+
+
+# inspired by `asyncer`, https://github.com/tiangolo/asyncer
+def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
"""
Take a blocking function and create an async one that receives the same
- positional and keyword arguments, and that when called, calls the original function
- in a worker thread using `anyio.to_thread.run_sync()`. Internally,
- `asyncer.asyncify()` uses the same `anyio.to_thread.run_sync()`, but it supports
- keyword arguments additional to positional arguments and it adds better support for
- autocompletion and inline errors for the arguments of the function called and the
- return value.
-
- If the `cancellable` option is enabled and the task waiting for its completion is
- cancelled, the thread will still run its course but its return value (or any raised
- exception) will be ignored.
+ positional and keyword arguments. For python version 3.9 and above, it uses
+ asyncio.to_thread to run the function in a separate thread. For python version
+ 3.8, it uses locally defined copy of the asyncio.to_thread function which was
+ introduced in python 3.9.
- Use it like this:
+ Usage:
- ```Python
- def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str:
- # Do work
- return "Some result"
+ ```python
+ def blocking_func(arg1, arg2, kwarg1=None):
+ # blocking code
+ return result
- result = await to_thread.asyncify(do_work)("spam", "ham", kwarg1="a", kwarg2="b")
- print(result)
+ result = asyncify(blocking_function)(arg1, arg2, kwarg1=value1)
```
## Arguments
`function`: a blocking regular callable (e.g. a function)
- `cancellable`: `True` to allow cancellation of the operation
- `limiter`: capacity limiter to use to limit the total amount of threads running
- (if omitted, the default limiter is used)
## Return
@@ -60,22 +81,6 @@ def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str:
"""
async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Retval:
- partial_f = functools.partial(function, *args, **kwargs)
-
- # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old
- # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid
- # surfacing deprecation warnings.
- if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"):
- return await anyio.to_thread.run_sync(
- partial_f,
- abandon_on_cancel=cancellable,
- limiter=limiter,
- )
-
- return await anyio.to_thread.run_sync(
- partial_f,
- cancellable=cancellable,
- limiter=limiter,
- )
+ return await to_thread(function, *args, **kwargs)
return wrapper
diff --git a/src/cloudflare/_utils/_transform.py b/src/cloudflare/_utils/_transform.py
index a6b62cad0cb..18afd9d8bd5 100644
--- a/src/cloudflare/_utils/_transform.py
+++ b/src/cloudflare/_utils/_transform.py
@@ -25,7 +25,7 @@
is_annotated_type,
strip_annotated_type,
)
-from .._compat import model_dump, is_typeddict
+from .._compat import get_origin, model_dump, is_typeddict
_T = TypeVar("_T")
@@ -164,9 +164,14 @@ def _transform_recursive(
inner_type = annotation
stripped_type = strip_annotated_type(inner_type)
+ origin = get_origin(stripped_type) or stripped_type
if is_typeddict(stripped_type) and is_mapping(data):
return _transform_typeddict(data, stripped_type)
+ if origin == dict and is_mapping(data):
+ items_type = get_args(stripped_type)[1]
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
+
if (
# List[T]
(is_list_type(stripped_type) and is_list(data))
@@ -307,9 +312,14 @@ async def _async_transform_recursive(
inner_type = annotation
stripped_type = strip_annotated_type(inner_type)
+ origin = get_origin(stripped_type) or stripped_type
if is_typeddict(stripped_type) and is_mapping(data):
return await _async_transform_typeddict(data, stripped_type)
+ if origin == dict and is_mapping(data):
+ items_type = get_args(stripped_type)[1]
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
+
if (
# List[T]
(is_list_type(stripped_type) and is_list(data))
diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py
index 0ed86798ee1..7dd1f280c27 100644
--- a/src/cloudflare/_version.py
+++ b/src/cloudflare/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "cloudflare"
-__version__ = "4.0.0" # x-release-please-version
+__version__ = "4.1.0" # x-release-please-version
diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py
index a81ce3c43a6..09f63ae53af 100644
--- a/src/cloudflare/resources/abuse_reports.py
+++ b/src/cloudflare/resources/abuse_reports.py
@@ -3,12 +3,13 @@
from __future__ import annotations
from typing import Type, cast
-from typing_extensions import Literal
+from typing_extensions import Literal, overload
import httpx
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import (
+ required_args,
maybe_transform,
async_maybe_transform,
)
@@ -32,7 +33,7 @@ class AbuseReportsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AbuseReportsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -48,6 +49,7 @@ def with_streaming_response(self) -> AbuseReportsResourceWithStreamingResponse:
"""
return AbuseReportsResourceWithStreamingResponse(self)
+ @overload
def create(
self,
report_type: Literal[
@@ -62,6 +64,2246 @@ def create(
],
*,
account_id: str,
+ address1: str,
+ agent_name: str,
+ agree: Literal[0, 1],
+ city: str,
+ country: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ original_work: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ signature: str,
+ state: str,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ act: The abuse report type
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ trademark_number: str,
+ trademark_office: str,
+ trademark_symbol: str,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ ncmec_notification: Literal["send", "send-anon", "none"],
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ ncsei_subject_representation: bool,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @required_args(
+ [
+ "account_id",
+ "address1",
+ "agent_name",
+ "agree",
+ "city",
+ "country",
+ "host_notification",
+ "original_work",
+ "owner_notification",
+ "signature",
+ "state",
+ ],
+ [
+ "account_id",
+ "host_notification",
+ "justification",
+ "owner_notification",
+ "trademark_number",
+ "trademark_office",
+ "trademark_symbol",
+ ],
+ ["account_id", "host_notification", "justification", "owner_notification"],
+ ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"],
+ ["account_id", "owner_notification"],
+ ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"],
+ )
+ def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"],
+ signature: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ if not report_type:
+ raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}")
+ return self._post(
+ f"/accounts/{account_id}/abuse-reports/{report_type}",
+ body=maybe_transform(
+ {
+ "address1": address1,
+ "agent_name": agent_name,
+ "agree": agree,
+ "city": city,
+ "country": country,
+ "host_notification": host_notification,
+ "original_work": original_work,
+ "owner_notification": owner_notification,
+ "signature": signature,
+ "state": state,
+ "act": act,
+ "comments": comments,
+ "company": company,
+ "destination_ips": destination_ips,
+ "email": email,
+ "email2": email2,
+ "justification": justification,
+ "name": name,
+ "ncmec_notification": ncmec_notification,
+ "ncsei_subject_representation": ncsei_subject_representation,
+ "ports_protocols": ports_protocols,
+ "source_ips": source_ips,
+ "tele": tele,
+ "title": title,
+ "trademark_number": trademark_number,
+ "trademark_office": trademark_office,
+ "trademark_symbol": trademark_symbol,
+ "urls": urls,
+ },
+ abuse_report_create_params.AbuseReportCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[str], ResultWrapper[str]),
+ )
+
+
+class AsyncAbuseReportsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncAbuseReportsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncAbuseReportsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return AsyncAbuseReportsResourceWithStreamingResponse(self)
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ address1: str,
+ agent_name: str,
+ agree: Literal[0, 1],
+ city: str,
+ country: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ original_work: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ signature: str,
+ state: str,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ act: The abuse report type
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ trademark_number: str,
+ trademark_office: str,
+ trademark_symbol: str,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ ncmec_notification: Literal["send", "send-anon", "none"],
+ owner_notification: Literal["send", "send-anon", "none"],
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ justification: str,
+ owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -71,13 +2313,166 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Submit the Abuse Report of a particular type
+
+ Args:
+ report_type: The abuse report type
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ act: The abuse report type
+
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
+
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ comments: Any additional comments about the infringement not exceeding 2000 characters
+
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
+ destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
+ ought to be unique
+
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
+ size of the field should not exceed 2000 characters. Each individual
+ port/protocol should not exceed 100 characters. The list should not have more
+ than 30 unique ports and protocols.
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
+ source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
+ IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
+ unique
+
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ title: Text not exceeding 255 characters
+
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
],
- email: str,
- email2: str,
- host_notification: Literal["send", "send-anon", "none"],
- ncmec_notification: Literal["send", "send-anon", "none"],
+ *,
+ account_id: str,
owner_notification: Literal["send", "send-anon", "none"],
- urls: str,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -86,8 +2481,12 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
@@ -99,6 +2498,7 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -112,52 +2512,57 @@ def create(
Args:
report_type: The abuse report type
- act: The abuse report type
-
- email: A valid email of the abuse reporter
-
- email2: Should match the value provided in `email`
-
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique
+ act: The abuse report type
- address1: Text not exceeding 100 characters
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- agent_name: The name of the copyright holder. Text not exceeding 60 characters.
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
- agree: Can be 0 or 1
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
- city: Text not exceeding 255 characters
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
comments: Any additional comments about the infringement not exceeding 2000 characters
- company: Text not exceeding 100 characters
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- country: Text not exceeding 255 characters
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
- original_work: Text not exceeding 255 characters
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
@@ -172,9 +2577,11 @@ def create(
IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
unique
- state: Text not exceeding 255 characters
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- tele: Text not exceeding 20 characters
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
title: Text not exceeding 255 characters
@@ -184,6 +2591,11 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -192,76 +2604,9 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not account_id:
- raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- if not report_type:
- raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}")
- return self._post(
- f"/accounts/{account_id}/abuse-reports/{report_type}",
- body=maybe_transform(
- {
- "act": act,
- "email": email,
- "email2": email2,
- "host_notification": host_notification,
- "ncmec_notification": ncmec_notification,
- "owner_notification": owner_notification,
- "urls": urls,
- "address1": address1,
- "agent_name": agent_name,
- "agree": agree,
- "city": city,
- "comments": comments,
- "company": company,
- "country": country,
- "destination_ips": destination_ips,
- "justification": justification,
- "name": name,
- "ncsei_subject_representation": ncsei_subject_representation,
- "original_work": original_work,
- "ports_protocols": ports_protocols,
- "signature": signature,
- "source_ips": source_ips,
- "state": state,
- "tele": tele,
- "title": title,
- "trademark_number": trademark_number,
- "trademark_office": trademark_office,
- "trademark_symbol": trademark_symbol,
- },
- abuse_report_create_params.AbuseReportCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper,
- ),
- cast_to=cast(Type[str], ResultWrapper[str]),
- )
-
-
-class AsyncAbuseReportsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncAbuseReportsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return the
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
- """
- return AsyncAbuseReportsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
- """
- return AsyncAbuseReportsResourceWithStreamingResponse(self)
+ ...
+ @overload
async def create(
self,
report_type: Literal[
@@ -276,6 +2621,9 @@ async def create(
],
*,
account_id: str,
+ host_notification: Literal["send", "send-anon", "none"],
+ ncsei_subject_representation: bool,
+ owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -285,13 +2633,8 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ],
- email: str,
- email2: str,
- host_notification: Literal["send", "send-anon", "none"],
- ncmec_notification: Literal["send", "send-anon", "none"],
- owner_notification: Literal["send", "send-anon", "none"],
- urls: str,
+ ]
+ | NotGiven = NOT_GIVEN,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -300,9 +2643,11 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
- ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
@@ -313,6 +2658,7 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -326,52 +2672,57 @@ async def create(
Args:
report_type: The abuse report type
- act: The abuse report type
-
- email: A valid email of the abuse reporter
-
- email2: Should match the value provided in `email`
-
host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
- ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique
+ act: The abuse report type
- address1: Text not exceeding 100 characters
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- agent_name: The name of the copyright holder. Text not exceeding 60 characters.
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
- agree: Can be 0 or 1
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
- city: Text not exceeding 255 characters
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
comments: Any additional comments about the infringement not exceeding 2000 characters
- company: Text not exceeding 100 characters
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- country: Text not exceeding 255 characters
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- original_work: Text not exceeding 255 characters
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
@@ -386,9 +2737,11 @@ async def create(
IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
unique
- state: Text not exceeding 255 characters
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- tele: Text not exceeding 20 characters
+ tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
title: Text not exceeding 255 characters
@@ -398,6 +2751,11 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -406,6 +2764,95 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ ...
+
+ @required_args(
+ [
+ "account_id",
+ "address1",
+ "agent_name",
+ "agree",
+ "city",
+ "country",
+ "host_notification",
+ "original_work",
+ "owner_notification",
+ "signature",
+ "state",
+ ],
+ [
+ "account_id",
+ "host_notification",
+ "justification",
+ "owner_notification",
+ "trademark_number",
+ "trademark_office",
+ "trademark_symbol",
+ ],
+ ["account_id", "host_notification", "justification", "owner_notification"],
+ ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"],
+ ["account_id", "owner_notification"],
+ ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"],
+ )
+ async def create(
+ self,
+ report_type: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ],
+ *,
+ account_id: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"],
+ signature: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
+ act: Literal[
+ "abuse_dmca",
+ "abuse_trademark",
+ "abuse_general",
+ "abuse_phishing",
+ "abuse_children",
+ "abuse_threat",
+ "abuse_registrar_whois",
+ "abuse_ncsei",
+ ]
+ | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ company: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ email: str | NotGiven = NOT_GIVEN,
+ email2: str | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ tele: str | NotGiven = NOT_GIVEN,
+ title: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
+ urls: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not report_type:
@@ -414,34 +2861,34 @@ async def create(
f"/accounts/{account_id}/abuse-reports/{report_type}",
body=await async_maybe_transform(
{
- "act": act,
- "email": email,
- "email2": email2,
- "host_notification": host_notification,
- "ncmec_notification": ncmec_notification,
- "owner_notification": owner_notification,
- "urls": urls,
"address1": address1,
"agent_name": agent_name,
"agree": agree,
"city": city,
+ "country": country,
+ "host_notification": host_notification,
+ "original_work": original_work,
+ "owner_notification": owner_notification,
+ "signature": signature,
+ "state": state,
+ "act": act,
"comments": comments,
"company": company,
- "country": country,
"destination_ips": destination_ips,
+ "email": email,
+ "email2": email2,
"justification": justification,
"name": name,
+ "ncmec_notification": ncmec_notification,
"ncsei_subject_representation": ncsei_subject_representation,
- "original_work": original_work,
"ports_protocols": ports_protocols,
- "signature": signature,
"source_ips": source_ips,
- "state": state,
"tele": tele,
"title": title,
"trademark_number": trademark_number,
"trademark_office": trademark_office,
"trademark_symbol": trademark_symbol,
+ "urls": urls,
},
abuse_report_create_params.AbuseReportCreateParams,
),
diff --git a/src/cloudflare/resources/accounts/accounts.py b/src/cloudflare/resources/accounts/accounts.py
index eba792cbcc5..d59d809d688 100644
--- a/src/cloudflare/resources/accounts/accounts.py
+++ b/src/cloudflare/resources/accounts/accounts.py
@@ -94,7 +94,7 @@ def logs(self) -> LogsResource:
@cached_property
def with_raw_response(self) -> AccountsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -377,7 +377,7 @@ def logs(self) -> AsyncLogsResource:
@cached_property
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/accounts/logs/audit.py b/src/cloudflare/resources/accounts/logs/audit.py
index 7375f4199ec..d5ea8076548 100644
--- a/src/cloudflare/resources/accounts/logs/audit.py
+++ b/src/cloudflare/resources/accounts/logs/audit.py
@@ -30,7 +30,7 @@ class AuditResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AuditResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -212,7 +212,7 @@ class AsyncAuditResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAuditResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/accounts/logs/logs.py b/src/cloudflare/resources/accounts/logs/logs.py
index 475921543aa..69595caf7a3 100644
--- a/src/cloudflare/resources/accounts/logs/logs.py
+++ b/src/cloudflare/resources/accounts/logs/logs.py
@@ -24,7 +24,7 @@ def audit(self) -> AuditResource:
@cached_property
def with_raw_response(self) -> LogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def audit(self) -> AsyncAuditResource:
@cached_property
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/accounts/members.py b/src/cloudflare/resources/accounts/members.py
index ed54745beb2..1565d83d173 100644
--- a/src/cloudflare/resources/accounts/members.py
+++ b/src/cloudflare/resources/accounts/members.py
@@ -36,7 +36,7 @@ class MembersResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> MembersResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -424,7 +424,7 @@ class AsyncMembersResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncMembersResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/accounts/roles.py b/src/cloudflare/resources/accounts/roles.py
index 1fcaa9c487c..8c49fb115a9 100644
--- a/src/cloudflare/resources/accounts/roles.py
+++ b/src/cloudflare/resources/accounts/roles.py
@@ -7,6 +7,7 @@
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -16,8 +17,9 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
-from ...pagination import SyncSinglePage, AsyncSinglePage
+from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from ..._base_client import AsyncPaginator, make_request_options
+from ...types.accounts import role_list_params
from ...types.shared.role import Role
__all__ = ["RolesResource", "AsyncRolesResource"]
@@ -27,7 +29,7 @@ class RolesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> RolesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -47,19 +49,25 @@ def list(
self,
*,
account_id: str,
+ page: float | NotGiven = NOT_GIVEN,
+ per_page: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[Role]:
+ ) -> SyncV4PagePaginationArray[Role]:
"""
Get all available roles for an account.
Args:
account_id: Account identifier tag.
+ page: Page number of paginated results.
+
+ per_page: Number of roles per page.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -72,9 +80,19 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/roles",
- page=SyncSinglePage[Role],
+ page=SyncV4PagePaginationArray[Role],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "page": page,
+ "per_page": per_page,
+ },
+ role_list_params.RoleListParams,
+ ),
),
model=Role,
)
@@ -128,7 +146,7 @@ class AsyncRolesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncRolesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -148,19 +166,25 @@ def list(
self,
*,
account_id: str,
+ page: float | NotGiven = NOT_GIVEN,
+ per_page: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Role, AsyncSinglePage[Role]]:
+ ) -> AsyncPaginator[Role, AsyncV4PagePaginationArray[Role]]:
"""
Get all available roles for an account.
Args:
account_id: Account identifier tag.
+ page: Page number of paginated results.
+
+ per_page: Number of roles per page.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -173,9 +197,19 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/roles",
- page=AsyncSinglePage[Role],
+ page=AsyncV4PagePaginationArray[Role],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "page": page,
+ "per_page": per_page,
+ },
+ role_list_params.RoleListParams,
+ ),
),
model=Role,
)
diff --git a/src/cloudflare/resources/accounts/subscriptions.py b/src/cloudflare/resources/accounts/subscriptions.py
index 1bf69681bd2..542727c8900 100644
--- a/src/cloudflare/resources/accounts/subscriptions.py
+++ b/src/cloudflare/resources/accounts/subscriptions.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, Optional, cast
+from typing import Any, Type, cast
from typing_extensions import Literal
import httpx
@@ -21,10 +21,11 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
-from ..._base_client import make_request_options
+from ...pagination import SyncSinglePage, AsyncSinglePage
+from ..._base_client import AsyncPaginator, make_request_options
from ...types.accounts import subscription_create_params, subscription_update_params
+from ...types.shared.subscription import Subscription
from ...types.shared_params.rate_plan import RatePlan
-from ...types.accounts.subscription_get_response import SubscriptionGetResponse
from ...types.accounts.subscription_create_response import SubscriptionCreateResponse
from ...types.accounts.subscription_delete_response import SubscriptionDeleteResponse
from ...types.accounts.subscription_update_response import SubscriptionUpdateResponse
@@ -36,7 +37,7 @@ class SubscriptionsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SubscriptionsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -229,7 +230,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[SubscriptionGetResponse]:
+ ) -> SyncSinglePage[Subscription]:
"""
Lists all of an account's subscriptions.
@@ -246,16 +247,13 @@ def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/subscriptions",
+ page=SyncSinglePage[Subscription],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
+ model=Subscription,
)
@@ -263,7 +261,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSubscriptionsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -446,7 +444,7 @@ async def delete(
cast_to=cast(Type[SubscriptionDeleteResponse], ResultWrapper[SubscriptionDeleteResponse]),
)
- async def get(
+ def get(
self,
*,
account_id: str,
@@ -456,7 +454,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[SubscriptionGetResponse]:
+ ) -> AsyncPaginator[Subscription, AsyncSinglePage[Subscription]]:
"""
Lists all of an account's subscriptions.
@@ -473,16 +471,13 @@ async def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return await self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/subscriptions",
+ page=AsyncSinglePage[Subscription],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
+ model=Subscription,
)
diff --git a/src/cloudflare/resources/accounts/tokens/permission_groups.py b/src/cloudflare/resources/accounts/tokens/permission_groups.py
index 591870ebe7f..d98d5235ce0 100644
--- a/src/cloudflare/resources/accounts/tokens/permission_groups.py
+++ b/src/cloudflare/resources/accounts/tokens/permission_groups.py
@@ -15,6 +15,8 @@
)
from ....pagination import SyncSinglePage, AsyncSinglePage
from ...._base_client import AsyncPaginator, make_request_options
+from ....types.accounts.tokens.permission_group_get_response import PermissionGroupGetResponse
+from ....types.accounts.tokens.permission_group_list_response import PermissionGroupListResponse
__all__ = ["PermissionGroupsResource", "AsyncPermissionGroupsResource"]
@@ -23,7 +25,7 @@ class PermissionGroupsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> PermissionGroupsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +51,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[object]:
+ ) -> SyncSinglePage[PermissionGroupListResponse]:
"""
Find all available permission groups for Account Owned API Tokens
@@ -68,11 +70,47 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/tokens/permission_groups",
- page=SyncSinglePage[object],
+ page=SyncSinglePage[PermissionGroupListResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=object,
+ model=PermissionGroupListResponse,
+ )
+
+ def get(
+ self,
+ *,
+ account_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> SyncSinglePage[PermissionGroupGetResponse]:
+ """
+ Find all available permission groups for Account Owned API Tokens
+
+ Args:
+ account_id: Account identifier tag.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ return self._get_api_list(
+ f"/accounts/{account_id}/tokens/permission_groups",
+ page=SyncSinglePage[PermissionGroupGetResponse],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ model=PermissionGroupGetResponse,
)
@@ -80,7 +118,7 @@ class AsyncPermissionGroupsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncPermissionGroupsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -106,7 +144,43 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[object, AsyncSinglePage[object]]:
+ ) -> AsyncPaginator[PermissionGroupListResponse, AsyncSinglePage[PermissionGroupListResponse]]:
+ """
+ Find all available permission groups for Account Owned API Tokens
+
+ Args:
+ account_id: Account identifier tag.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ return self._get_api_list(
+ f"/accounts/{account_id}/tokens/permission_groups",
+ page=AsyncSinglePage[PermissionGroupListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ model=PermissionGroupListResponse,
+ )
+
+ def get(
+ self,
+ *,
+ account_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> AsyncPaginator[PermissionGroupGetResponse, AsyncSinglePage[PermissionGroupGetResponse]]:
"""
Find all available permission groups for Account Owned API Tokens
@@ -125,11 +199,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/tokens/permission_groups",
- page=AsyncSinglePage[object],
+ page=AsyncSinglePage[PermissionGroupGetResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=object,
+ model=PermissionGroupGetResponse,
)
@@ -140,6 +214,9 @@ def __init__(self, permission_groups: PermissionGroupsResource) -> None:
self.list = to_raw_response_wrapper(
permission_groups.list,
)
+ self.get = to_raw_response_wrapper(
+ permission_groups.get,
+ )
class AsyncPermissionGroupsResourceWithRawResponse:
@@ -149,6 +226,9 @@ def __init__(self, permission_groups: AsyncPermissionGroupsResource) -> None:
self.list = async_to_raw_response_wrapper(
permission_groups.list,
)
+ self.get = async_to_raw_response_wrapper(
+ permission_groups.get,
+ )
class PermissionGroupsResourceWithStreamingResponse:
@@ -158,6 +238,9 @@ def __init__(self, permission_groups: PermissionGroupsResource) -> None:
self.list = to_streamed_response_wrapper(
permission_groups.list,
)
+ self.get = to_streamed_response_wrapper(
+ permission_groups.get,
+ )
class AsyncPermissionGroupsResourceWithStreamingResponse:
@@ -167,3 +250,6 @@ def __init__(self, permission_groups: AsyncPermissionGroupsResource) -> None:
self.list = async_to_streamed_response_wrapper(
permission_groups.list,
)
+ self.get = async_to_streamed_response_wrapper(
+ permission_groups.get,
+ )
diff --git a/src/cloudflare/resources/accounts/tokens/tokens.py b/src/cloudflare/resources/accounts/tokens/tokens.py
index b5eb2fbd996..5af8755d84e 100644
--- a/src/cloudflare/resources/accounts/tokens/tokens.py
+++ b/src/cloudflare/resources/accounts/tokens/tokens.py
@@ -62,7 +62,7 @@ def value(self) -> ValueResource:
@cached_property
def with_raw_response(self) -> TokensResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -409,7 +409,7 @@ def value(self) -> AsyncValueResource:
@cached_property
def with_raw_response(self) -> AsyncTokensResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/accounts/tokens/value.py b/src/cloudflare/resources/accounts/tokens/value.py
index 59dac86db7c..94034ab2a7d 100644
--- a/src/cloudflare/resources/accounts/tokens/value.py
+++ b/src/cloudflare/resources/accounts/tokens/value.py
@@ -31,7 +31,7 @@ class ValueResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ValueResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -98,7 +98,7 @@ class AsyncValueResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncValueResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/acm/acm.py b/src/cloudflare/resources/acm/acm.py
index 97cc4b05fa2..4d576c8fa13 100644
--- a/src/cloudflare/resources/acm/acm.py
+++ b/src/cloudflare/resources/acm/acm.py
@@ -24,7 +24,7 @@ def total_tls(self) -> TotalTLSResource:
@cached_property
def with_raw_response(self) -> ACMResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def total_tls(self) -> AsyncTotalTLSResource:
@cached_property
def with_raw_response(self) -> AsyncACMResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/acm/total_tls.py b/src/cloudflare/resources/acm/total_tls.py
index 1eded706d28..2d0e550ccf5 100644
--- a/src/cloudflare/resources/acm/total_tls.py
+++ b/src/cloudflare/resources/acm/total_tls.py
@@ -33,7 +33,7 @@ class TotalTLSResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> TotalTLSResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -146,7 +146,7 @@ class AsyncTotalTLSResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncTotalTLSResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/address_maps/accounts.py b/src/cloudflare/resources/addressing/address_maps/accounts.py
index a5279ff240c..d30e053c698 100644
--- a/src/cloudflare/resources/addressing/address_maps/accounts.py
+++ b/src/cloudflare/resources/addressing/address_maps/accounts.py
@@ -29,7 +29,7 @@ class AccountsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AccountsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -132,7 +132,7 @@ class AsyncAccountsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py
index b3a6fda77c9..e2dd8d9111d 100644
--- a/src/cloudflare/resources/addressing/address_maps/address_maps.py
+++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py
@@ -71,7 +71,7 @@ def zones(self) -> ZonesResource:
@cached_property
def with_raw_response(self) -> AddressMapsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -354,7 +354,7 @@ def zones(self) -> AsyncZonesResource:
@cached_property
def with_raw_response(self) -> AsyncAddressMapsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/address_maps/ips.py b/src/cloudflare/resources/addressing/address_maps/ips.py
index 15c999ab654..c17ae0f81bc 100644
--- a/src/cloudflare/resources/addressing/address_maps/ips.py
+++ b/src/cloudflare/resources/addressing/address_maps/ips.py
@@ -29,7 +29,7 @@ class IPsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> IPsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -142,7 +142,7 @@ class AsyncIPsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncIPsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/address_maps/zones.py b/src/cloudflare/resources/addressing/address_maps/zones.py
index d7f859f2617..b0813f207c3 100644
--- a/src/cloudflare/resources/addressing/address_maps/zones.py
+++ b/src/cloudflare/resources/addressing/address_maps/zones.py
@@ -29,7 +29,7 @@ class ZonesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ZonesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -142,7 +142,7 @@ class AsyncZonesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncZonesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/addressing.py b/src/cloudflare/resources/addressing/addressing.py
index 65ac3b59c70..2ddc2d78362 100644
--- a/src/cloudflare/resources/addressing/addressing.py
+++ b/src/cloudflare/resources/addressing/addressing.py
@@ -72,7 +72,7 @@ def prefixes(self) -> PrefixesResource:
@cached_property
def with_raw_response(self) -> AddressingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -113,7 +113,7 @@ def prefixes(self) -> AsyncPrefixesResource:
@cached_property
def with_raw_response(self) -> AsyncAddressingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/loa_documents.py b/src/cloudflare/resources/addressing/loa_documents.py
index c4db454b8c2..47abb0af10f 100644
--- a/src/cloudflare/resources/addressing/loa_documents.py
+++ b/src/cloudflare/resources/addressing/loa_documents.py
@@ -39,7 +39,7 @@ class LOADocumentsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> LOADocumentsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -148,7 +148,7 @@ class AsyncLOADocumentsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncLOADocumentsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/prefixes/advertisement_status.py b/src/cloudflare/resources/addressing/prefixes/advertisement_status.py
index 4ca0b677f15..c8ce2f9fb6b 100644
--- a/src/cloudflare/resources/addressing/prefixes/advertisement_status.py
+++ b/src/cloudflare/resources/addressing/prefixes/advertisement_status.py
@@ -32,7 +32,7 @@ class AdvertisementStatusResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AdvertisementStatusResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -156,7 +156,7 @@ class AsyncAdvertisementStatusResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAdvertisementStatusResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
index 3f65acd83ad..f933e12539e 100644
--- a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
+++ b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
@@ -32,7 +32,7 @@ class BGPPrefixesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> BGPPrefixesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -249,7 +249,7 @@ class AsyncBGPPrefixesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncBGPPrefixesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py
index 93870db9319..6c1e409eef1 100644
--- a/src/cloudflare/resources/addressing/prefixes/delegations.py
+++ b/src/cloudflare/resources/addressing/prefixes/delegations.py
@@ -33,7 +33,7 @@ class DelegationsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> DelegationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -201,7 +201,7 @@ class AsyncDelegationsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncDelegationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py
index b9620460953..6c9f5435bec 100644
--- a/src/cloudflare/resources/addressing/prefixes/prefixes.py
+++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py
@@ -81,7 +81,7 @@ def delegations(self) -> DelegationsResource:
@cached_property
def with_raw_response(self) -> PrefixesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -342,7 +342,7 @@ def delegations(self) -> AsyncDelegationsResource:
@cached_property
def with_raw_response(self) -> AsyncPrefixesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/prefixes/service_bindings.py b/src/cloudflare/resources/addressing/prefixes/service_bindings.py
index c5be5b730ca..053cdd351c4 100644
--- a/src/cloudflare/resources/addressing/prefixes/service_bindings.py
+++ b/src/cloudflare/resources/addressing/prefixes/service_bindings.py
@@ -33,7 +33,7 @@ class ServiceBindingsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ServiceBindingsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -256,7 +256,7 @@ class AsyncServiceBindingsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncServiceBindingsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
index 6df921030ff..ed9b3b46be5 100644
--- a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
+++ b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
@@ -48,7 +48,7 @@ def regions(self) -> RegionsResource:
@cached_property
def with_raw_response(self) -> RegionalHostnamesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -303,7 +303,7 @@ def regions(self) -> AsyncRegionsResource:
@cached_property
def with_raw_response(self) -> AsyncRegionalHostnamesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regions.py b/src/cloudflare/resources/addressing/regional_hostnames/regions.py
index 16d9deac419..f0c69f1b81f 100644
--- a/src/cloudflare/resources/addressing/regional_hostnames/regions.py
+++ b/src/cloudflare/resources/addressing/regional_hostnames/regions.py
@@ -24,7 +24,7 @@ class RegionsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> RegionsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -81,7 +81,7 @@ class AsyncRegionsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncRegionsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/addressing/services.py b/src/cloudflare/resources/addressing/services.py
index e73f0c62298..799ce7f0980 100644
--- a/src/cloudflare/resources/addressing/services.py
+++ b/src/cloudflare/resources/addressing/services.py
@@ -24,7 +24,7 @@ class ServicesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ServicesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -84,7 +84,7 @@ class AsyncServicesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncServicesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/ai.py b/src/cloudflare/resources/ai/ai.py
index 396a1360fe9..bbc218bb3ab 100644
--- a/src/cloudflare/resources/ai/ai.py
+++ b/src/cloudflare/resources/ai/ai.py
@@ -81,7 +81,7 @@ def models(self) -> ModelsResource:
@cached_property
def with_raw_response(self) -> AIResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -424,6 +424,7 @@ def run(
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
@@ -501,6 +502,7 @@ def run(
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
@@ -656,10 +658,16 @@ def run(
*,
account_id: str,
image: Iterable[float],
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -682,16 +690,32 @@ def run(
image: An array of integers that represent the image data constrained to 8-bit unsigned
integer values
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
max_tokens: The maximum number of tokens to generate in the response.
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
prompt: The input text prompt for the model to generate a response.
raw: If true, a chat template is not applied and you must adhere to the specific
model's expected formatting.
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
temperature: Controls the randomness of the output; higher values produce more random
results.
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -726,7 +750,7 @@ def run(
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
- seed: int | NotGiven = NOT_GIVEN,
+ seed: int | float | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
lang: str | NotGiven = NOT_GIVEN,
@@ -739,9 +763,10 @@ def run(
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
- top_k: int | NotGiven = NOT_GIVEN,
+ top_k: int | float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
messages: Iterable[ai_run_params.MessagesMessage] | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
@@ -787,6 +812,7 @@ def run(
"presence_penalty": presence_penalty,
"raw": raw,
"repetition_penalty": repetition_penalty,
+ "response_format": response_format,
"stream": stream,
"temperature": temperature,
"top_k": top_k,
@@ -833,7 +859,7 @@ def models(self) -> AsyncModelsResource:
@cached_property
def with_raw_response(self) -> AsyncAIResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -1176,6 +1202,7 @@ async def run(
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
@@ -1253,6 +1280,7 @@ async def run(
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
@@ -1408,10 +1436,16 @@ async def run(
*,
account_id: str,
image: Iterable[float],
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1434,16 +1468,32 @@ async def run(
image: An array of integers that represent the image data constrained to 8-bit unsigned
integer values
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
max_tokens: The maximum number of tokens to generate in the response.
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
prompt: The input text prompt for the model to generate a response.
raw: If true, a chat template is not applied and you must adhere to the specific
model's expected formatting.
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
temperature: Controls the randomness of the output; higher values produce more random
results.
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1478,7 +1528,7 @@ async def run(
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
- seed: int | NotGiven = NOT_GIVEN,
+ seed: int | float | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
lang: str | NotGiven = NOT_GIVEN,
@@ -1491,9 +1541,10 @@ async def run(
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
+ response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
- top_k: int | NotGiven = NOT_GIVEN,
+ top_k: int | float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
messages: Iterable[ai_run_params.MessagesMessage] | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
@@ -1539,6 +1590,7 @@ async def run(
"presence_penalty": presence_penalty,
"raw": raw,
"repetition_penalty": repetition_penalty,
+ "response_format": response_format,
"stream": stream,
"temperature": temperature,
"top_k": top_k,
diff --git a/src/cloudflare/resources/ai/authors.py b/src/cloudflare/resources/ai/authors.py
index ecf213ff048..f5c5ce9877d 100644
--- a/src/cloudflare/resources/ai/authors.py
+++ b/src/cloudflare/resources/ai/authors.py
@@ -23,7 +23,7 @@ class AuthorsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AuthorsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -78,7 +78,7 @@ class AsyncAuthorsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAuthorsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/finetunes/assets.py b/src/cloudflare/resources/ai/finetunes/assets.py
index dfeb072ae01..7df434bb081 100644
--- a/src/cloudflare/resources/ai/finetunes/assets.py
+++ b/src/cloudflare/resources/ai/finetunes/assets.py
@@ -33,7 +33,7 @@ class AssetsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AssetsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -109,7 +109,7 @@ class AsyncAssetsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAssetsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/finetunes/finetunes.py b/src/cloudflare/resources/ai/finetunes/finetunes.py
index 1cdef4efc51..51bac25f1b5 100644
--- a/src/cloudflare/resources/ai/finetunes/finetunes.py
+++ b/src/cloudflare/resources/ai/finetunes/finetunes.py
@@ -56,7 +56,7 @@ def public(self) -> PublicResource:
@cached_property
def with_raw_response(self) -> FinetunesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -172,7 +172,7 @@ def public(self) -> AsyncPublicResource:
@cached_property
def with_raw_response(self) -> AsyncFinetunesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/finetunes/public.py b/src/cloudflare/resources/ai/finetunes/public.py
index 74c49e747fa..c8d542c985e 100644
--- a/src/cloudflare/resources/ai/finetunes/public.py
+++ b/src/cloudflare/resources/ai/finetunes/public.py
@@ -26,7 +26,7 @@ class PublicResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> PublicResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -101,7 +101,7 @@ class AsyncPublicResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncPublicResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/models/models.py b/src/cloudflare/resources/ai/models/models.py
index 66a2394f641..74f1ac1ad34 100644
--- a/src/cloudflare/resources/ai/models/models.py
+++ b/src/cloudflare/resources/ai/models/models.py
@@ -37,7 +37,7 @@ def schema(self) -> SchemaResource:
@cached_property
def with_raw_response(self) -> ModelsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -128,7 +128,7 @@ def schema(self) -> AsyncSchemaResource:
@cached_property
def with_raw_response(self) -> AsyncModelsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/models/schema.py b/src/cloudflare/resources/ai/models/schema.py
index be4afa7007f..9b62769bf19 100644
--- a/src/cloudflare/resources/ai/models/schema.py
+++ b/src/cloudflare/resources/ai/models/schema.py
@@ -30,7 +30,7 @@ class SchemaResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SchemaResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -92,7 +92,7 @@ class AsyncSchemaResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSchemaResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai/tasks.py b/src/cloudflare/resources/ai/tasks.py
index c2b6cae396a..16b130e6805 100644
--- a/src/cloudflare/resources/ai/tasks.py
+++ b/src/cloudflare/resources/ai/tasks.py
@@ -23,7 +23,7 @@ class TasksResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> TasksResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -78,7 +78,7 @@ class AsyncTasksResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai_gateway/__init__.py b/src/cloudflare/resources/ai_gateway/__init__.py
index bdfd7be9362..48aa9d93225 100644
--- a/src/cloudflare/resources/ai_gateway/__init__.py
+++ b/src/cloudflare/resources/ai_gateway/__init__.py
@@ -8,6 +8,14 @@
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
+from .urls import (
+ URLsResource,
+ AsyncURLsResource,
+ URLsResourceWithRawResponse,
+ AsyncURLsResourceWithRawResponse,
+ URLsResourceWithStreamingResponse,
+ AsyncURLsResourceWithStreamingResponse,
+)
from .datasets import (
DatasetsResource,
AsyncDatasetsResource,
@@ -66,6 +74,12 @@
"AsyncEvaluationsResourceWithRawResponse",
"EvaluationsResourceWithStreamingResponse",
"AsyncEvaluationsResourceWithStreamingResponse",
+ "URLsResource",
+ "AsyncURLsResource",
+ "URLsResourceWithRawResponse",
+ "AsyncURLsResourceWithRawResponse",
+ "URLsResourceWithStreamingResponse",
+ "AsyncURLsResourceWithStreamingResponse",
"AIGatewayResource",
"AsyncAIGatewayResource",
"AIGatewayResourceWithRawResponse",
diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py
index ebbaa17ba8b..d21818fc074 100644
--- a/src/cloudflare/resources/ai_gateway/ai_gateway.py
+++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py
@@ -15,6 +15,14 @@
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
+from .urls import (
+ URLsResource,
+ AsyncURLsResource,
+ URLsResourceWithRawResponse,
+ AsyncURLsResourceWithRawResponse,
+ URLsResourceWithStreamingResponse,
+ AsyncURLsResourceWithStreamingResponse,
+)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
@@ -82,10 +90,14 @@ def datasets(self) -> DatasetsResource:
def evaluations(self) -> EvaluationsResource:
return EvaluationsResource(self._client)
+ @cached_property
+ def urls(self) -> URLsResource:
+ return URLsResource(self._client)
+
@cached_property
def with_raw_response(self) -> AIGatewayResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -112,6 +124,9 @@ def create(
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
+ authentication: bool | NotGiven = NOT_GIVEN,
+ log_management: Optional[int] | NotGiven = NOT_GIVEN,
+ log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -148,6 +163,9 @@ def create(
"rate_limiting_interval": rate_limiting_interval,
"rate_limiting_limit": rate_limiting_limit,
"rate_limiting_technique": rate_limiting_technique,
+ "authentication": authentication,
+ "log_management": log_management,
+ "log_management_strategy": log_management_strategy,
"logpush": logpush,
"logpush_public_key": logpush_public_key,
},
@@ -174,6 +192,9 @@ def update(
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
+ authentication: bool | NotGiven = NOT_GIVEN,
+ log_management: Optional[int] | NotGiven = NOT_GIVEN,
+ log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -211,6 +232,9 @@ def update(
"rate_limiting_interval": rate_limiting_interval,
"rate_limiting_limit": rate_limiting_limit,
"rate_limiting_technique": rate_limiting_technique,
+ "authentication": authentication,
+ "log_management": log_management,
+ "log_management_strategy": log_management_strategy,
"logpush": logpush,
"logpush_public_key": logpush_public_key,
},
@@ -378,10 +402,14 @@ def datasets(self) -> AsyncDatasetsResource:
def evaluations(self) -> AsyncEvaluationsResource:
return AsyncEvaluationsResource(self._client)
+ @cached_property
+ def urls(self) -> AsyncURLsResource:
+ return AsyncURLsResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncAIGatewayResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -408,6 +436,9 @@ async def create(
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
+ authentication: bool | NotGiven = NOT_GIVEN,
+ log_management: Optional[int] | NotGiven = NOT_GIVEN,
+ log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -444,6 +475,9 @@ async def create(
"rate_limiting_interval": rate_limiting_interval,
"rate_limiting_limit": rate_limiting_limit,
"rate_limiting_technique": rate_limiting_technique,
+ "authentication": authentication,
+ "log_management": log_management,
+ "log_management_strategy": log_management_strategy,
"logpush": logpush,
"logpush_public_key": logpush_public_key,
},
@@ -470,6 +504,9 @@ async def update(
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
+ authentication: bool | NotGiven = NOT_GIVEN,
+ log_management: Optional[int] | NotGiven = NOT_GIVEN,
+ log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -507,6 +544,9 @@ async def update(
"rate_limiting_interval": rate_limiting_interval,
"rate_limiting_limit": rate_limiting_limit,
"rate_limiting_technique": rate_limiting_technique,
+ "authentication": authentication,
+ "log_management": log_management,
+ "log_management_strategy": log_management_strategy,
"logpush": logpush,
"logpush_public_key": logpush_public_key,
},
@@ -693,6 +733,10 @@ def datasets(self) -> DatasetsResourceWithRawResponse:
def evaluations(self) -> EvaluationsResourceWithRawResponse:
return EvaluationsResourceWithRawResponse(self._ai_gateway.evaluations)
+ @cached_property
+ def urls(self) -> URLsResourceWithRawResponse:
+ return URLsResourceWithRawResponse(self._ai_gateway.urls)
+
class AsyncAIGatewayResourceWithRawResponse:
def __init__(self, ai_gateway: AsyncAIGatewayResource) -> None:
@@ -730,6 +774,10 @@ def datasets(self) -> AsyncDatasetsResourceWithRawResponse:
def evaluations(self) -> AsyncEvaluationsResourceWithRawResponse:
return AsyncEvaluationsResourceWithRawResponse(self._ai_gateway.evaluations)
+ @cached_property
+ def urls(self) -> AsyncURLsResourceWithRawResponse:
+ return AsyncURLsResourceWithRawResponse(self._ai_gateway.urls)
+
class AIGatewayResourceWithStreamingResponse:
def __init__(self, ai_gateway: AIGatewayResource) -> None:
@@ -767,6 +815,10 @@ def datasets(self) -> DatasetsResourceWithStreamingResponse:
def evaluations(self) -> EvaluationsResourceWithStreamingResponse:
return EvaluationsResourceWithStreamingResponse(self._ai_gateway.evaluations)
+ @cached_property
+ def urls(self) -> URLsResourceWithStreamingResponse:
+ return URLsResourceWithStreamingResponse(self._ai_gateway.urls)
+
class AsyncAIGatewayResourceWithStreamingResponse:
def __init__(self, ai_gateway: AsyncAIGatewayResource) -> None:
@@ -803,3 +855,7 @@ def datasets(self) -> AsyncDatasetsResourceWithStreamingResponse:
@cached_property
def evaluations(self) -> AsyncEvaluationsResourceWithStreamingResponse:
return AsyncEvaluationsResourceWithStreamingResponse(self._ai_gateway.evaluations)
+
+ @cached_property
+ def urls(self) -> AsyncURLsResourceWithStreamingResponse:
+ return AsyncURLsResourceWithStreamingResponse(self._ai_gateway.urls)
diff --git a/src/cloudflare/resources/ai_gateway/datasets.py b/src/cloudflare/resources/ai_gateway/datasets.py
index 3d58ec297b4..afed3ec86ef 100644
--- a/src/cloudflare/resources/ai_gateway/datasets.py
+++ b/src/cloudflare/resources/ai_gateway/datasets.py
@@ -36,7 +36,7 @@ class DatasetsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> DatasetsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -315,7 +315,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncDatasetsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai_gateway/evaluation_types.py b/src/cloudflare/resources/ai_gateway/evaluation_types.py
index 94d76d33826..047c5936dec 100644
--- a/src/cloudflare/resources/ai_gateway/evaluation_types.py
+++ b/src/cloudflare/resources/ai_gateway/evaluation_types.py
@@ -2,16 +2,12 @@
from __future__ import annotations
-from typing import Type, cast
from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ..._utils import (
- maybe_transform,
- async_maybe_transform,
-)
+from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -20,10 +16,10 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ..._wrappers import ResultWrapper
-from ..._base_client import make_request_options
-from ...types.ai_gateway import evaluation_type_get_params
-from ...types.ai_gateway.evaluation_type_get_response import EvaluationTypeGetResponse
+from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.ai_gateway import evaluation_type_list_params
+from ...types.ai_gateway.evaluation_type_list_response import EvaluationTypeListResponse
__all__ = ["EvaluationTypesResource", "AsyncEvaluationTypesResource"]
@@ -32,7 +28,7 @@ class EvaluationTypesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> EvaluationTypesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -48,7 +44,7 @@ def with_streaming_response(self) -> EvaluationTypesResourceWithStreamingRespons
"""
return EvaluationTypesResourceWithStreamingResponse(self)
- def get(
+ def list(
self,
*,
account_id: str,
@@ -62,7 +58,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EvaluationTypeGetResponse:
+ ) -> SyncV4PagePaginationArray[EvaluationTypeListResponse]:
"""
List Evaluators
@@ -77,8 +73,9 @@ def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/ai-gateway/evaluation-types",
+ page=SyncV4PagePaginationArray[EvaluationTypeListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -91,11 +88,10 @@ def get(
"page": page,
"per_page": per_page,
},
- evaluation_type_get_params.EvaluationTypeGetParams,
+ evaluation_type_list_params.EvaluationTypeListParams,
),
- post_parser=ResultWrapper[EvaluationTypeGetResponse]._unwrapper,
),
- cast_to=cast(Type[EvaluationTypeGetResponse], ResultWrapper[EvaluationTypeGetResponse]),
+ model=EvaluationTypeListResponse,
)
@@ -103,7 +99,7 @@ class AsyncEvaluationTypesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncEvaluationTypesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -119,7 +115,7 @@ def with_streaming_response(self) -> AsyncEvaluationTypesResourceWithStreamingRe
"""
return AsyncEvaluationTypesResourceWithStreamingResponse(self)
- async def get(
+ def list(
self,
*,
account_id: str,
@@ -133,7 +129,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EvaluationTypeGetResponse:
+ ) -> AsyncPaginator[EvaluationTypeListResponse, AsyncV4PagePaginationArray[EvaluationTypeListResponse]]:
"""
List Evaluators
@@ -148,25 +144,25 @@ async def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return await self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/ai-gateway/evaluation-types",
+ page=AsyncV4PagePaginationArray[EvaluationTypeListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- query=await async_maybe_transform(
+ query=maybe_transform(
{
"order_by": order_by,
"order_by_direction": order_by_direction,
"page": page,
"per_page": per_page,
},
- evaluation_type_get_params.EvaluationTypeGetParams,
+ evaluation_type_list_params.EvaluationTypeListParams,
),
- post_parser=ResultWrapper[EvaluationTypeGetResponse]._unwrapper,
),
- cast_to=cast(Type[EvaluationTypeGetResponse], ResultWrapper[EvaluationTypeGetResponse]),
+ model=EvaluationTypeListResponse,
)
@@ -174,8 +170,8 @@ class EvaluationTypesResourceWithRawResponse:
def __init__(self, evaluation_types: EvaluationTypesResource) -> None:
self._evaluation_types = evaluation_types
- self.get = to_raw_response_wrapper(
- evaluation_types.get,
+ self.list = to_raw_response_wrapper(
+ evaluation_types.list,
)
@@ -183,8 +179,8 @@ class AsyncEvaluationTypesResourceWithRawResponse:
def __init__(self, evaluation_types: AsyncEvaluationTypesResource) -> None:
self._evaluation_types = evaluation_types
- self.get = async_to_raw_response_wrapper(
- evaluation_types.get,
+ self.list = async_to_raw_response_wrapper(
+ evaluation_types.list,
)
@@ -192,8 +188,8 @@ class EvaluationTypesResourceWithStreamingResponse:
def __init__(self, evaluation_types: EvaluationTypesResource) -> None:
self._evaluation_types = evaluation_types
- self.get = to_streamed_response_wrapper(
- evaluation_types.get,
+ self.list = to_streamed_response_wrapper(
+ evaluation_types.list,
)
@@ -201,6 +197,6 @@ class AsyncEvaluationTypesResourceWithStreamingResponse:
def __init__(self, evaluation_types: AsyncEvaluationTypesResource) -> None:
self._evaluation_types = evaluation_types
- self.get = async_to_streamed_response_wrapper(
- evaluation_types.get,
+ self.list = async_to_streamed_response_wrapper(
+ evaluation_types.list,
)
diff --git a/src/cloudflare/resources/ai_gateway/evaluations.py b/src/cloudflare/resources/ai_gateway/evaluations.py
index 5dbccd8f358..9fadf2aa944 100644
--- a/src/cloudflare/resources/ai_gateway/evaluations.py
+++ b/src/cloudflare/resources/ai_gateway/evaluations.py
@@ -35,7 +35,7 @@ class EvaluationsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> EvaluationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -258,7 +258,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncEvaluationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai_gateway/logs.py b/src/cloudflare/resources/ai_gateway/logs.py
index 65ac6d95b48..0daa36fc2c6 100644
--- a/src/cloudflare/resources/ai_gateway/logs.py
+++ b/src/cloudflare/resources/ai_gateway/logs.py
@@ -36,7 +36,7 @@ class LogsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> LogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -410,7 +410,7 @@ class AsyncLogsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/ai_gateway/urls.py b/src/cloudflare/resources/ai_gateway/urls.py
new file mode 100644
index 00000000000..d29f1b62794
--- /dev/null
+++ b/src/cloudflare/resources/ai_gateway/urls.py
@@ -0,0 +1,190 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, cast
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._wrappers import ResultWrapper
+from ..._base_client import make_request_options
+from ...types.ai_gateway.url_get_response import URLGetResponse
+
+__all__ = ["URLsResource", "AsyncURLsResource"]
+
+
+class URLsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> URLsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return URLsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> URLsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return URLsResourceWithStreamingResponse(self)
+
+ def get(
+ self,
+ provider: str,
+ *,
+ account_id: str,
+ gateway_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Get Gateway URL
+
+ Args:
+ gateway_id: gateway id
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ if not gateway_id:
+ raise ValueError(f"Expected a non-empty value for `gateway_id` but received {gateway_id!r}")
+ if not provider:
+ raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
+ return self._get(
+ f"/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[URLGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[str], ResultWrapper[str]),
+ )
+
+
+class AsyncURLsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncURLsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncURLsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncURLsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return AsyncURLsResourceWithStreamingResponse(self)
+
+ async def get(
+ self,
+ provider: str,
+ *,
+ account_id: str,
+ gateway_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """
+ Get Gateway URL
+
+ Args:
+ gateway_id: gateway id
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ if not gateway_id:
+ raise ValueError(f"Expected a non-empty value for `gateway_id` but received {gateway_id!r}")
+ if not provider:
+ raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
+ return await self._get(
+ f"/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[URLGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[str], ResultWrapper[str]),
+ )
+
+
+class URLsResourceWithRawResponse:
+ def __init__(self, urls: URLsResource) -> None:
+ self._urls = urls
+
+ self.get = to_raw_response_wrapper(
+ urls.get,
+ )
+
+
+class AsyncURLsResourceWithRawResponse:
+ def __init__(self, urls: AsyncURLsResource) -> None:
+ self._urls = urls
+
+ self.get = async_to_raw_response_wrapper(
+ urls.get,
+ )
+
+
+class URLsResourceWithStreamingResponse:
+ def __init__(self, urls: URLsResource) -> None:
+ self._urls = urls
+
+ self.get = to_streamed_response_wrapper(
+ urls.get,
+ )
+
+
+class AsyncURLsResourceWithStreamingResponse:
+ def __init__(self, urls: AsyncURLsResource) -> None:
+ self._urls = urls
+
+ self.get = async_to_streamed_response_wrapper(
+ urls.get,
+ )
diff --git a/src/cloudflare/resources/alerting/alerting.py b/src/cloudflare/resources/alerting/alerting.py
index 26acc6c7b63..faa242b37cb 100644
--- a/src/cloudflare/resources/alerting/alerting.py
+++ b/src/cloudflare/resources/alerting/alerting.py
@@ -60,7 +60,7 @@ def policies(self) -> PoliciesResource:
@cached_property
def with_raw_response(self) -> AlertingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -97,7 +97,7 @@ def policies(self) -> AsyncPoliciesResource:
@cached_property
def with_raw_response(self) -> AsyncAlertingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/available_alerts.py b/src/cloudflare/resources/alerting/available_alerts.py
index 0ef63c9f03f..713f9e8db34 100644
--- a/src/cloudflare/resources/alerting/available_alerts.py
+++ b/src/cloudflare/resources/alerting/available_alerts.py
@@ -26,7 +26,7 @@ class AvailableAlertsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AvailableAlertsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -86,7 +86,7 @@ class AsyncAvailableAlertsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAvailableAlertsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/destinations/destinations.py b/src/cloudflare/resources/alerting/destinations/destinations.py
index d15420aed0f..8e074ffa262 100644
--- a/src/cloudflare/resources/alerting/destinations/destinations.py
+++ b/src/cloudflare/resources/alerting/destinations/destinations.py
@@ -48,7 +48,7 @@ def webhooks(self) -> WebhooksResource:
@cached_property
def with_raw_response(self) -> DestinationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -81,7 +81,7 @@ def webhooks(self) -> AsyncWebhooksResource:
@cached_property
def with_raw_response(self) -> AsyncDestinationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/destinations/eligible.py b/src/cloudflare/resources/alerting/destinations/eligible.py
index 4f73d80b393..b93d17a6409 100644
--- a/src/cloudflare/resources/alerting/destinations/eligible.py
+++ b/src/cloudflare/resources/alerting/destinations/eligible.py
@@ -26,7 +26,7 @@ class EligibleResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> EligibleResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -86,7 +86,7 @@ class AsyncEligibleResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncEligibleResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/destinations/pagerduty.py b/src/cloudflare/resources/alerting/destinations/pagerduty.py
index e59cf6537ad..035b26f0af8 100644
--- a/src/cloudflare/resources/alerting/destinations/pagerduty.py
+++ b/src/cloudflare/resources/alerting/destinations/pagerduty.py
@@ -16,8 +16,9 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
-from ...._base_client import make_request_options
-from ....types.alerting.destinations.pagerduty_get_response import PagerdutyGetResponse
+from ....pagination import SyncSinglePage, AsyncSinglePage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.alerting.destinations.pagerduty import Pagerduty
from ....types.alerting.destinations.pagerduty_link_response import PagerdutyLinkResponse
from ....types.alerting.destinations.pagerduty_create_response import PagerdutyCreateResponse
from ....types.alerting.destinations.pagerduty_delete_response import PagerdutyDeleteResponse
@@ -29,7 +30,7 @@ class PagerdutyResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> PagerdutyResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -129,7 +130,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PagerdutyGetResponse]:
+ ) -> SyncSinglePage[Pagerduty]:
"""
Get a list of all configured PagerDuty services.
@@ -146,16 +147,13 @@ def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/alerting/v3/destinations/pagerduty",
+ page=SyncSinglePage[Pagerduty],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[PagerdutyGetResponse]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[PagerdutyGetResponse]], ResultWrapper[PagerdutyGetResponse]),
+ model=Pagerduty,
)
def link(
@@ -207,7 +205,7 @@ class AsyncPagerdutyResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncPagerdutyResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -297,7 +295,7 @@ async def delete(
cast_to=PagerdutyDeleteResponse,
)
- async def get(
+ def get(
self,
*,
account_id: str,
@@ -307,7 +305,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PagerdutyGetResponse]:
+ ) -> AsyncPaginator[Pagerduty, AsyncSinglePage[Pagerduty]]:
"""
Get a list of all configured PagerDuty services.
@@ -324,16 +322,13 @@ async def get(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return await self._get(
+ return self._get_api_list(
f"/accounts/{account_id}/alerting/v3/destinations/pagerduty",
+ page=AsyncSinglePage[Pagerduty],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[PagerdutyGetResponse]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[PagerdutyGetResponse]], ResultWrapper[PagerdutyGetResponse]),
+ model=Pagerduty,
)
async def link(
diff --git a/src/cloudflare/resources/alerting/destinations/webhooks.py b/src/cloudflare/resources/alerting/destinations/webhooks.py
index 5189a7b807d..e5d7f0d1b9c 100644
--- a/src/cloudflare/resources/alerting/destinations/webhooks.py
+++ b/src/cloudflare/resources/alerting/destinations/webhooks.py
@@ -35,7 +35,7 @@ class WebhooksResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> WebhooksResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -299,7 +299,7 @@ class AsyncWebhooksResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncWebhooksResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/history.py b/src/cloudflare/resources/alerting/history.py
index 29a1fe0f31d..23733d5fa65 100644
--- a/src/cloudflare/resources/alerting/history.py
+++ b/src/cloudflare/resources/alerting/history.py
@@ -29,7 +29,7 @@ class HistoryResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> HistoryResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -115,7 +115,7 @@ class AsyncHistoryResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncHistoryResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py
index c3f6b52c997..650d09f1800 100644
--- a/src/cloudflare/resources/alerting/policies.py
+++ b/src/cloudflare/resources/alerting/policies.py
@@ -38,7 +38,7 @@ class PoliciesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> PoliciesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -88,9 +88,9 @@ def create(
"hostname_aop_custom_certificate_expiration_type",
"http_alert_edge_error",
"http_alert_origin_error",
- "incident_alert",
"image_notification",
"image_resizing_notification",
+ "incident_alert",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -113,6 +113,7 @@ def create(
"secondary_dns_warning",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
+ "security_insights_alert",
"sentinel_alert",
"stream_live_notifications",
"synthetic_test_latency_alert",
@@ -233,9 +234,9 @@ def update(
"hostname_aop_custom_certificate_expiration_type",
"http_alert_edge_error",
"http_alert_origin_error",
- "incident_alert",
"image_notification",
"image_resizing_notification",
+ "incident_alert",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -258,6 +259,7 @@ def update(
"secondary_dns_warning",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
+ "security_insights_alert",
"sentinel_alert",
"stream_live_notifications",
"synthetic_test_latency_alert",
@@ -471,7 +473,7 @@ class AsyncPoliciesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncPoliciesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -521,9 +523,9 @@ async def create(
"hostname_aop_custom_certificate_expiration_type",
"http_alert_edge_error",
"http_alert_origin_error",
- "incident_alert",
"image_notification",
"image_resizing_notification",
+ "incident_alert",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -546,6 +548,7 @@ async def create(
"secondary_dns_warning",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
+ "security_insights_alert",
"sentinel_alert",
"stream_live_notifications",
"synthetic_test_latency_alert",
@@ -666,9 +669,9 @@ async def update(
"hostname_aop_custom_certificate_expiration_type",
"http_alert_edge_error",
"http_alert_origin_error",
- "incident_alert",
"image_notification",
"image_resizing_notification",
+ "incident_alert",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -691,6 +694,7 @@ async def update(
"secondary_dns_warning",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
+ "security_insights_alert",
"sentinel_alert",
"stream_live_notifications",
"synthetic_test_latency_alert",
diff --git a/src/cloudflare/resources/api_gateway/api_gateway.py b/src/cloudflare/resources/api_gateway/api_gateway.py
index 780055b0239..70917610f7d 100644
--- a/src/cloudflare/resources/api_gateway/api_gateway.py
+++ b/src/cloudflare/resources/api_gateway/api_gateway.py
@@ -96,7 +96,7 @@ def expression_template(self) -> ExpressionTemplateResource:
@cached_property
def with_raw_response(self) -> APIGatewayResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -145,7 +145,7 @@ def expression_template(self) -> AsyncExpressionTemplateResource:
@cached_property
def with_raw_response(self) -> AsyncAPIGatewayResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/configurations.py b/src/cloudflare/resources/api_gateway/configurations.py
index dafedfedd47..450f5205f0d 100644
--- a/src/cloudflare/resources/api_gateway/configurations.py
+++ b/src/cloudflare/resources/api_gateway/configurations.py
@@ -33,7 +33,7 @@ class ConfigurationsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ConfigurationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -137,7 +137,7 @@ class AsyncConfigurationsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncConfigurationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/discovery/discovery.py b/src/cloudflare/resources/api_gateway/discovery/discovery.py
index 340447b9e82..9c3152dd49b 100644
--- a/src/cloudflare/resources/api_gateway/discovery/discovery.py
+++ b/src/cloudflare/resources/api_gateway/discovery/discovery.py
@@ -38,7 +38,7 @@ def operations(self) -> OperationsResource:
@cached_property
def with_raw_response(self) -> DiscoveryResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -103,7 +103,7 @@ def operations(self) -> AsyncOperationsResource:
@cached_property
def with_raw_response(self) -> AsyncDiscoveryResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/discovery/operations.py b/src/cloudflare/resources/api_gateway/discovery/operations.py
index 1994f365d02..f7a8556479a 100644
--- a/src/cloudflare/resources/api_gateway/discovery/operations.py
+++ b/src/cloudflare/resources/api_gateway/discovery/operations.py
@@ -35,7 +35,7 @@ class OperationsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> OperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -246,7 +246,7 @@ class AsyncOperationsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncOperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/expression_template/expression_template.py b/src/cloudflare/resources/api_gateway/expression_template/expression_template.py
index 870b06fcc0f..e5173f78539 100644
--- a/src/cloudflare/resources/api_gateway/expression_template/expression_template.py
+++ b/src/cloudflare/resources/api_gateway/expression_template/expression_template.py
@@ -24,7 +24,7 @@ def fallthrough(self) -> FallthroughResource:
@cached_property
def with_raw_response(self) -> ExpressionTemplateResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def fallthrough(self) -> AsyncFallthroughResource:
@cached_property
def with_raw_response(self) -> AsyncExpressionTemplateResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py b/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
index e518de7be3b..1cb60fb64c1 100644
--- a/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
+++ b/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
@@ -31,7 +31,7 @@ class FallthroughResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> FallthroughResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -95,7 +95,7 @@ class AsyncFallthroughResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncFallthroughResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/operations/operations.py b/src/cloudflare/resources/api_gateway/operations/operations.py
index 2681b95f944..eae381497ff 100644
--- a/src/cloudflare/resources/api_gateway/operations/operations.py
+++ b/src/cloudflare/resources/api_gateway/operations/operations.py
@@ -21,7 +21,7 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
-from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from ....pagination import SyncSinglePage, AsyncSinglePage, SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from ...._base_client import AsyncPaginator, make_request_options
from .schema_validation import (
SchemaValidationResource,
@@ -55,7 +55,7 @@ def schema_validation(self) -> SchemaValidationResource:
@cached_property
def with_raw_response(self) -> OperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -265,7 +265,7 @@ def bulk_create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OperationBulkCreateResponse:
+ ) -> SyncSinglePage[OperationBulkCreateResponse]:
"""Add one or more operations to a zone.
Endpoints can contain path variables.
@@ -287,17 +287,15 @@ def bulk_create(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return self._post(
+ return self._get_api_list(
f"/zones/{zone_id}/api_gateway/operations",
+ page=SyncSinglePage[OperationBulkCreateResponse],
body=maybe_transform(body, Iterable[operation_bulk_create_params.Body]),
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[OperationBulkCreateResponse]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[OperationBulkCreateResponse], ResultWrapper[OperationBulkCreateResponse]),
+ model=OperationBulkCreateResponse,
+ method="post",
)
def bulk_delete(
@@ -394,7 +392,7 @@ def schema_validation(self) -> AsyncSchemaValidationResource:
@cached_property
def with_raw_response(self) -> AsyncOperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -593,7 +591,7 @@ async def delete(
cast_to=OperationDeleteResponse,
)
- async def bulk_create(
+ def bulk_create(
self,
*,
zone_id: str,
@@ -604,7 +602,7 @@ async def bulk_create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OperationBulkCreateResponse:
+ ) -> AsyncPaginator[OperationBulkCreateResponse, AsyncSinglePage[OperationBulkCreateResponse]]:
"""Add one or more operations to a zone.
Endpoints can contain path variables.
@@ -626,17 +624,15 @@ async def bulk_create(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return await self._post(
+ return self._get_api_list(
f"/zones/{zone_id}/api_gateway/operations",
- body=await async_maybe_transform(body, Iterable[operation_bulk_create_params.Body]),
+ page=AsyncSinglePage[OperationBulkCreateResponse],
+ body=maybe_transform(body, Iterable[operation_bulk_create_params.Body]),
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[OperationBulkCreateResponse]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[OperationBulkCreateResponse], ResultWrapper[OperationBulkCreateResponse]),
+ model=OperationBulkCreateResponse,
+ method="post",
)
async def bulk_delete(
diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
index 1aec1379e0e..d08ebba4175 100644
--- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
@@ -39,7 +39,7 @@ class SchemaValidationResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SchemaValidationResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -194,7 +194,7 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSchemaValidationResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/schemas.py b/src/cloudflare/resources/api_gateway/schemas.py
index 7b7eb1ef11c..79611e37e5d 100644
--- a/src/cloudflare/resources/api_gateway/schemas.py
+++ b/src/cloudflare/resources/api_gateway/schemas.py
@@ -32,7 +32,7 @@ class SchemasResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SchemasResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -107,7 +107,7 @@ class AsyncSchemasResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSchemasResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
index 6a984a33529..ccb54128e03 100644
--- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
@@ -31,7 +31,7 @@ class SchemaValidationResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SchemaValidationResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -212,7 +212,7 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSchemaValidationResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/settings/settings.py b/src/cloudflare/resources/api_gateway/settings/settings.py
index 8a7e918de87..543c2a869d1 100644
--- a/src/cloudflare/resources/api_gateway/settings/settings.py
+++ b/src/cloudflare/resources/api_gateway/settings/settings.py
@@ -24,7 +24,7 @@ def schema_validation(self) -> SchemaValidationResource:
@cached_property
def with_raw_response(self) -> SettingsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def schema_validation(self) -> AsyncSchemaValidationResource:
@cached_property
def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
index 1bd4a3f8520..aa9fcadb55f 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
@@ -26,7 +26,7 @@ class HostsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> HostsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -99,7 +99,7 @@ class AsyncHostsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncHostsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
index a2f9a67fd3e..5a9c28fa03d 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
@@ -29,7 +29,7 @@ class OperationsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> OperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -132,7 +132,7 @@ class AsyncOperationsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncOperationsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
index 983cdf40118..35c37f69fb6 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
@@ -66,7 +66,7 @@ def hosts(self) -> HostsResource:
@cached_property
def with_raw_response(self) -> UserSchemasResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -353,7 +353,7 @@ def hosts(self) -> AsyncHostsResource:
@cached_property
def with_raw_response(self) -> AsyncUserSchemasResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/argo/argo.py b/src/cloudflare/resources/argo/argo.py
index 3aa821072b3..eb94300db7a 100644
--- a/src/cloudflare/resources/argo/argo.py
+++ b/src/cloudflare/resources/argo/argo.py
@@ -36,7 +36,7 @@ def tiered_caching(self) -> TieredCachingResource:
@cached_property
def with_raw_response(self) -> ArgoResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -65,7 +65,7 @@ def tiered_caching(self) -> AsyncTieredCachingResource:
@cached_property
def with_raw_response(self) -> AsyncArgoResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/argo/smart_routing.py b/src/cloudflare/resources/argo/smart_routing.py
index f45d5a4b043..66ae9a42e3a 100644
--- a/src/cloudflare/resources/argo/smart_routing.py
+++ b/src/cloudflare/resources/argo/smart_routing.py
@@ -33,7 +33,7 @@ class SmartRoutingResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> SmartRoutingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -146,7 +146,7 @@ class AsyncSmartRoutingResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncSmartRoutingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/argo/tiered_caching.py b/src/cloudflare/resources/argo/tiered_caching.py
index 066b5a75b53..a598a0d4f6a 100644
--- a/src/cloudflare/resources/argo/tiered_caching.py
+++ b/src/cloudflare/resources/argo/tiered_caching.py
@@ -33,7 +33,7 @@ class TieredCachingResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> TieredCachingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -156,7 +156,7 @@ class AsyncTieredCachingResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncTieredCachingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/audit_logs.py b/src/cloudflare/resources/audit_logs.py
index 8e3020f4b33..bcb31f75e13 100644
--- a/src/cloudflare/resources/audit_logs.py
+++ b/src/cloudflare/resources/audit_logs.py
@@ -30,7 +30,7 @@ class AuditLogsResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AuditLogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -137,7 +137,7 @@ class AsyncAuditLogsResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAuditLogsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/billing/billing.py b/src/cloudflare/resources/billing/billing.py
index 5146ee841dd..d57c019144e 100644
--- a/src/cloudflare/resources/billing/billing.py
+++ b/src/cloudflare/resources/billing/billing.py
@@ -24,7 +24,7 @@ def profiles(self) -> ProfilesResource:
@cached_property
def with_raw_response(self) -> BillingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def profiles(self) -> AsyncProfilesResource:
@cached_property
def with_raw_response(self) -> AsyncBillingResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/billing/profiles.py b/src/cloudflare/resources/billing/profiles.py
index c025bcb6617..6d97c84a04c 100644
--- a/src/cloudflare/resources/billing/profiles.py
+++ b/src/cloudflare/resources/billing/profiles.py
@@ -26,7 +26,7 @@ class ProfilesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ProfilesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -86,7 +86,7 @@ class AsyncProfilesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncProfilesResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py
index eefa78d028b..f9875019fe6 100644
--- a/src/cloudflare/resources/bot_management.py
+++ b/src/cloudflare/resources/bot_management.py
@@ -34,7 +34,7 @@ class BotManagementResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> BotManagementResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -578,7 +578,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncBotManagementResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/botnet_feed/asn.py b/src/cloudflare/resources/botnet_feed/asn.py
index 88932ab9b7d..15e06d69a8c 100755
--- a/src/cloudflare/resources/botnet_feed/asn.py
+++ b/src/cloudflare/resources/botnet_feed/asn.py
@@ -33,7 +33,7 @@ class ASNResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ASNResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -139,7 +139,7 @@ class AsyncASNResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncASNResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/botnet_feed/botnet_feed.py b/src/cloudflare/resources/botnet_feed/botnet_feed.py
index b61dfc867fc..5f71396a78d 100755
--- a/src/cloudflare/resources/botnet_feed/botnet_feed.py
+++ b/src/cloudflare/resources/botnet_feed/botnet_feed.py
@@ -36,7 +36,7 @@ def configs(self) -> ConfigsResource:
@cached_property
def with_raw_response(self) -> BotnetFeedResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -65,7 +65,7 @@ def configs(self) -> AsyncConfigsResource:
@cached_property
def with_raw_response(self) -> AsyncBotnetFeedResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/botnet_feed/configs/asn.py b/src/cloudflare/resources/botnet_feed/configs/asn.py
index 0d948a96a6f..e2f27d024b6 100755
--- a/src/cloudflare/resources/botnet_feed/configs/asn.py
+++ b/src/cloudflare/resources/botnet_feed/configs/asn.py
@@ -27,7 +27,7 @@ class ASNResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ASNResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -127,7 +127,7 @@ class AsyncASNResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncASNResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/botnet_feed/configs/configs.py b/src/cloudflare/resources/botnet_feed/configs/configs.py
index 90d32679557..6fe692cec0c 100755
--- a/src/cloudflare/resources/botnet_feed/configs/configs.py
+++ b/src/cloudflare/resources/botnet_feed/configs/configs.py
@@ -24,7 +24,7 @@ def asn(self) -> ASNResource:
@cached_property
def with_raw_response(self) -> ConfigsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -49,7 +49,7 @@ def asn(self) -> AsyncASNResource:
@cached_property
def with_raw_response(self) -> AsyncConfigsResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection.py
index 1727851d6e2..a23a6034443 100644
--- a/src/cloudflare/resources/brand_protection.py
+++ b/src/cloudflare/resources/brand_protection.py
@@ -32,7 +32,7 @@ class BrandProtectionResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> BrandProtectionResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
@@ -148,7 +148,7 @@ class AsyncBrandProtectionResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncBrandProtectionResourceWithRawResponse:
"""
- This property can be used as a prefix for any HTTP method call to return the
+ This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
diff --git a/src/cloudflare/resources/browser_rendering/__init__.py b/src/cloudflare/resources/browser_rendering/__init__.py
new file mode 100644
index 00000000000..d42a51797d4
--- /dev/null
+++ b/src/cloudflare/resources/browser_rendering/__init__.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .pdf import (
+ PDFResource,
+ AsyncPDFResource,
+ PDFResourceWithRawResponse,
+ AsyncPDFResourceWithRawResponse,
+ PDFResourceWithStreamingResponse,
+ AsyncPDFResourceWithStreamingResponse,
+)
+from .scrape import (
+ ScrapeResource,
+ AsyncScrapeResource,
+ ScrapeResourceWithRawResponse,
+ AsyncScrapeResourceWithRawResponse,
+ ScrapeResourceWithStreamingResponse,
+ AsyncScrapeResourceWithStreamingResponse,
+)
+from .content import (
+ ContentResource,
+ AsyncContentResource,
+ ContentResourceWithRawResponse,
+ AsyncContentResourceWithRawResponse,
+ ContentResourceWithStreamingResponse,
+ AsyncContentResourceWithStreamingResponse,
+)
+from .snapshot import (
+ SnapshotResource,
+ AsyncSnapshotResource,
+ SnapshotResourceWithRawResponse,
+ AsyncSnapshotResourceWithRawResponse,
+ SnapshotResourceWithStreamingResponse,
+ AsyncSnapshotResourceWithStreamingResponse,
+)
+from .screenshot import (
+ ScreenshotResource,
+ AsyncScreenshotResource,
+ ScreenshotResourceWithRawResponse,
+ AsyncScreenshotResourceWithRawResponse,
+ ScreenshotResourceWithStreamingResponse,
+ AsyncScreenshotResourceWithStreamingResponse,
+)
+from .browser_rendering import (
+ BrowserRenderingResource,
+ AsyncBrowserRenderingResource,
+ BrowserRenderingResourceWithRawResponse,
+ AsyncBrowserRenderingResourceWithRawResponse,
+ BrowserRenderingResourceWithStreamingResponse,
+ AsyncBrowserRenderingResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "ContentResource",
+ "AsyncContentResource",
+ "ContentResourceWithRawResponse",
+ "AsyncContentResourceWithRawResponse",
+ "ContentResourceWithStreamingResponse",
+ "AsyncContentResourceWithStreamingResponse",
+ "PDFResource",
+ "AsyncPDFResource",
+ "PDFResourceWithRawResponse",
+ "AsyncPDFResourceWithRawResponse",
+ "PDFResourceWithStreamingResponse",
+ "AsyncPDFResourceWithStreamingResponse",
+ "ScrapeResource",
+ "AsyncScrapeResource",
+ "ScrapeResourceWithRawResponse",
+ "AsyncScrapeResourceWithRawResponse",
+ "ScrapeResourceWithStreamingResponse",
+ "AsyncScrapeResourceWithStreamingResponse",
+ "ScreenshotResource",
+ "AsyncScreenshotResource",
+ "ScreenshotResourceWithRawResponse",
+ "AsyncScreenshotResourceWithRawResponse",
+ "ScreenshotResourceWithStreamingResponse",
+ "AsyncScreenshotResourceWithStreamingResponse",
+ "SnapshotResource",
+ "AsyncSnapshotResource",
+ "SnapshotResourceWithRawResponse",
+ "AsyncSnapshotResourceWithRawResponse",
+ "SnapshotResourceWithStreamingResponse",
+ "AsyncSnapshotResourceWithStreamingResponse",
+ "BrowserRenderingResource",
+ "AsyncBrowserRenderingResource",
+ "BrowserRenderingResourceWithRawResponse",
+ "AsyncBrowserRenderingResourceWithRawResponse",
+ "BrowserRenderingResourceWithStreamingResponse",
+ "AsyncBrowserRenderingResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/browser_rendering/browser_rendering.py b/src/cloudflare/resources/browser_rendering/browser_rendering.py
new file mode 100644
index 00000000000..b597be3813f
--- /dev/null
+++ b/src/cloudflare/resources/browser_rendering/browser_rendering.py
@@ -0,0 +1,230 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .pdf import (
+ PDFResource,
+ AsyncPDFResource,
+ PDFResourceWithRawResponse,
+ AsyncPDFResourceWithRawResponse,
+ PDFResourceWithStreamingResponse,
+ AsyncPDFResourceWithStreamingResponse,
+)
+from .scrape import (
+ ScrapeResource,
+ AsyncScrapeResource,
+ ScrapeResourceWithRawResponse,
+ AsyncScrapeResourceWithRawResponse,
+ ScrapeResourceWithStreamingResponse,
+ AsyncScrapeResourceWithStreamingResponse,
+)
+from .content import (
+ ContentResource,
+ AsyncContentResource,
+ ContentResourceWithRawResponse,
+ AsyncContentResourceWithRawResponse,
+ ContentResourceWithStreamingResponse,
+ AsyncContentResourceWithStreamingResponse,
+)
+from .snapshot import (
+ SnapshotResource,
+ AsyncSnapshotResource,
+ SnapshotResourceWithRawResponse,
+ AsyncSnapshotResourceWithRawResponse,
+ SnapshotResourceWithStreamingResponse,
+ AsyncSnapshotResourceWithStreamingResponse,
+)
+from ..._compat import cached_property
+from .screenshot import (
+ ScreenshotResource,
+ AsyncScreenshotResource,
+ ScreenshotResourceWithRawResponse,
+ AsyncScreenshotResourceWithRawResponse,
+ ScreenshotResourceWithStreamingResponse,
+ AsyncScreenshotResourceWithStreamingResponse,
+)
+from ..._resource import SyncAPIResource, AsyncAPIResource
+
+__all__ = ["BrowserRenderingResource", "AsyncBrowserRenderingResource"]
+
+
+class BrowserRenderingResource(SyncAPIResource):
+ @cached_property
+ def content(self) -> ContentResource:
+ return ContentResource(self._client)
+
+ @cached_property
+ def pdf(self) -> PDFResource:
+ return PDFResource(self._client)
+
+ @cached_property
+ def scrape(self) -> ScrapeResource:
+ return ScrapeResource(self._client)
+
+ @cached_property
+ def screenshot(self) -> ScreenshotResource:
+ return ScreenshotResource(self._client)
+
+ @cached_property
+ def snapshot(self) -> SnapshotResource:
+ return SnapshotResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> BrowserRenderingResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return BrowserRenderingResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BrowserRenderingResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return BrowserRenderingResourceWithStreamingResponse(self)
+
+
+class AsyncBrowserRenderingResource(AsyncAPIResource):
+ @cached_property
+ def content(self) -> AsyncContentResource:
+ return AsyncContentResource(self._client)
+
+ @cached_property
+ def pdf(self) -> AsyncPDFResource:
+ return AsyncPDFResource(self._client)
+
+ @cached_property
+ def scrape(self) -> AsyncScrapeResource:
+ return AsyncScrapeResource(self._client)
+
+ @cached_property
+ def screenshot(self) -> AsyncScreenshotResource:
+ return AsyncScreenshotResource(self._client)
+
+ @cached_property
+ def snapshot(self) -> AsyncSnapshotResource:
+ return AsyncSnapshotResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncBrowserRenderingResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncBrowserRenderingResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBrowserRenderingResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return AsyncBrowserRenderingResourceWithStreamingResponse(self)
+
+
+class BrowserRenderingResourceWithRawResponse:
+ def __init__(self, browser_rendering: BrowserRenderingResource) -> None:
+ self._browser_rendering = browser_rendering
+
+ @cached_property
+ def content(self) -> ContentResourceWithRawResponse:
+ return ContentResourceWithRawResponse(self._browser_rendering.content)
+
+ @cached_property
+ def pdf(self) -> PDFResourceWithRawResponse:
+ return PDFResourceWithRawResponse(self._browser_rendering.pdf)
+
+ @cached_property
+ def scrape(self) -> ScrapeResourceWithRawResponse:
+ return ScrapeResourceWithRawResponse(self._browser_rendering.scrape)
+
+ @cached_property
+ def screenshot(self) -> ScreenshotResourceWithRawResponse:
+ return ScreenshotResourceWithRawResponse(self._browser_rendering.screenshot)
+
+ @cached_property
+ def snapshot(self) -> SnapshotResourceWithRawResponse:
+ return SnapshotResourceWithRawResponse(self._browser_rendering.snapshot)
+
+
+class AsyncBrowserRenderingResourceWithRawResponse:
+ def __init__(self, browser_rendering: AsyncBrowserRenderingResource) -> None:
+ self._browser_rendering = browser_rendering
+
+ @cached_property
+ def content(self) -> AsyncContentResourceWithRawResponse:
+ return AsyncContentResourceWithRawResponse(self._browser_rendering.content)
+
+ @cached_property
+ def pdf(self) -> AsyncPDFResourceWithRawResponse:
+ return AsyncPDFResourceWithRawResponse(self._browser_rendering.pdf)
+
+ @cached_property
+ def scrape(self) -> AsyncScrapeResourceWithRawResponse:
+ return AsyncScrapeResourceWithRawResponse(self._browser_rendering.scrape)
+
+ @cached_property
+ def screenshot(self) -> AsyncScreenshotResourceWithRawResponse:
+ return AsyncScreenshotResourceWithRawResponse(self._browser_rendering.screenshot)
+
+ @cached_property
+ def snapshot(self) -> AsyncSnapshotResourceWithRawResponse:
+ return AsyncSnapshotResourceWithRawResponse(self._browser_rendering.snapshot)
+
+
+class BrowserRenderingResourceWithStreamingResponse:
+ def __init__(self, browser_rendering: BrowserRenderingResource) -> None:
+ self._browser_rendering = browser_rendering
+
+ @cached_property
+ def content(self) -> ContentResourceWithStreamingResponse:
+ return ContentResourceWithStreamingResponse(self._browser_rendering.content)
+
+ @cached_property
+ def pdf(self) -> PDFResourceWithStreamingResponse:
+ return PDFResourceWithStreamingResponse(self._browser_rendering.pdf)
+
+ @cached_property
+ def scrape(self) -> ScrapeResourceWithStreamingResponse:
+ return ScrapeResourceWithStreamingResponse(self._browser_rendering.scrape)
+
+ @cached_property
+ def screenshot(self) -> ScreenshotResourceWithStreamingResponse:
+ return ScreenshotResourceWithStreamingResponse(self._browser_rendering.screenshot)
+
+ @cached_property
+ def snapshot(self) -> SnapshotResourceWithStreamingResponse:
+ return SnapshotResourceWithStreamingResponse(self._browser_rendering.snapshot)
+
+
+class AsyncBrowserRenderingResourceWithStreamingResponse:
+ def __init__(self, browser_rendering: AsyncBrowserRenderingResource) -> None:
+ self._browser_rendering = browser_rendering
+
+ @cached_property
+ def content(self) -> AsyncContentResourceWithStreamingResponse:
+ return AsyncContentResourceWithStreamingResponse(self._browser_rendering.content)
+
+ @cached_property
+ def pdf(self) -> AsyncPDFResourceWithStreamingResponse:
+ return AsyncPDFResourceWithStreamingResponse(self._browser_rendering.pdf)
+
+ @cached_property
+ def scrape(self) -> AsyncScrapeResourceWithStreamingResponse:
+ return AsyncScrapeResourceWithStreamingResponse(self._browser_rendering.scrape)
+
+ @cached_property
+ def screenshot(self) -> AsyncScreenshotResourceWithStreamingResponse:
+ return AsyncScreenshotResourceWithStreamingResponse(self._browser_rendering.screenshot)
+
+ @cached_property
+ def snapshot(self) -> AsyncSnapshotResourceWithStreamingResponse:
+ return AsyncSnapshotResourceWithStreamingResponse(self._browser_rendering.snapshot)
diff --git a/src/cloudflare/resources/browser_rendering/content.py b/src/cloudflare/resources/browser_rendering/content.py
new file mode 100644
index 00000000000..45a438dcb8f
--- /dev/null
+++ b/src/cloudflare/resources/browser_rendering/content.py
@@ -0,0 +1,442 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, List, Type, Iterable, Optional, cast
+from typing_extensions import Literal
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import (
+ maybe_transform,
+ async_maybe_transform,
+)
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._wrappers import ResultWrapper
+from ..._base_client import make_request_options
+from ...types.browser_rendering import content_create_params
+from ...types.browser_rendering.content_create_response import ContentCreateResponse
+
+__all__ = ["ContentResource", "AsyncContentResource"]
+
+
+class ContentResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> ContentResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return ContentResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> ContentResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return ContentResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ cache_ttl: float | NotGiven = NOT_GIVEN,
+ add_script_tag: Iterable[content_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
+ add_style_tag: Iterable[content_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
+ allow_request_pattern: List[str] | NotGiven = NOT_GIVEN,
+ allow_resource_types: List[
+ Literal[
+ "document",
+ "stylesheet",
+ "image",
+ "media",
+ "font",
+ "script",
+ "texttrack",
+ "xhr",
+ "fetch",
+ "prefetch",
+ "eventsource",
+ "websocket",
+ "manifest",
+ "signedexchange",
+ "ping",
+ "cspviolationreport",
+ "preflight",
+ "other",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ authenticate: content_create_params.Authenticate | NotGiven = NOT_GIVEN,
+ best_attempt: bool | NotGiven = NOT_GIVEN,
+ cookies: Iterable[content_create_params.Cookie] | NotGiven = NOT_GIVEN,
+ emulate_media_type: str | NotGiven = NOT_GIVEN,
+ goto_options: content_create_params.GotoOptions | NotGiven = NOT_GIVEN,
+ html: str | NotGiven = NOT_GIVEN,
+ reject_request_pattern: List[str] | NotGiven = NOT_GIVEN,
+ reject_resource_types: List[
+ Literal[
+ "document",
+ "stylesheet",
+ "image",
+ "media",
+ "font",
+ "script",
+ "texttrack",
+ "xhr",
+ "fetch",
+ "prefetch",
+ "eventsource",
+ "websocket",
+ "manifest",
+ "signedexchange",
+ "ping",
+ "cspviolationreport",
+ "preflight",
+ "other",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
+ set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
+ url: str | NotGiven = NOT_GIVEN,
+ user_agent: str | NotGiven = NOT_GIVEN,
+ viewport: content_create_params.Viewport | NotGiven = NOT_GIVEN,
+ wait_for_selector: content_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
+ wait_for_timeout: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> str:
+ """Fetches rendered HTML content from provided URL or HTML.
+
+ Check available options
+ like `gotoOptions` and `waitFor*` to control page load behaviour.
+
+ Args:
+ account_id: Account ID.
+
+ cache_ttl: Cache TTL default is 5s. Set to 0 to disable.
+
+ add_script_tag: Adds a `