diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 58fc28e9381..c07a6a74f27 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,6 +8,10 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
+ pull_request:
+ branches-ignore:
+ - 'stl-preview-head/**'
+ - 'stl-preview-base/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -18,6 +22,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
@@ -35,10 +40,10 @@ jobs:
- name: Run lints
run: ./scripts/lint
- upload:
- if: github.repository == 'stainless-sdks/cloudflare-python'
+ build:
+ if: github.repository == 'stainless-sdks/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
- name: upload
+ name: build
permissions:
contents: read
id-token: write
@@ -46,6 +51,20 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Install dependencies
+ run: rye sync --all-features
+
+ - name: Run build
+ run: rye build
+
- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
@@ -63,6 +82,7 @@ jobs:
timeout-minutes: 30
name: test
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
@@ -84,7 +104,7 @@ jobs:
timeout-minutes: 10
name: examples
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.repository == 'cloudflare/cloudflare-python'
+ if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml
new file mode 100644
index 00000000000..a694a70bb2f
--- /dev/null
+++ b/.github/workflows/detect-breaking-changes.yml
@@ -0,0 +1,35 @@
+name: CI
+on:
+ pull_request:
+ branches:
+ - main
+ - next
+
+jobs:
+ detect_breaking_changes:
+ runs-on: 'ubuntu-latest'
+ name: detect-breaking-changes
+ if: github.repository == 'cloudflare/cloudflare-python'
+ steps:
+ - name: Calculate fetch-depth
+ run: |
+ echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
+
+ - uses: actions/checkout@v4
+ with:
+ # Ensure we can check out the pull request base in the script below.
+ fetch-depth: ${{ env.FETCH_DEPTH }}
+
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+ - name: Install dependencies
+ run: |
+ rye sync --all-features
+
+ - name: Detect breaking changes
+ run: ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 87797408001..95ceb189aa4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
.prism.log
-.vscode
_dev
__pycache__
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 025a1cbcb11..934f2cc033c 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.3.1"
+ ".": "4.4.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 590d127c2cb..90c188b3c25 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 1752
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b15b44e0efd207de48e7e74e742b0b4b190c74f12a941a1a0ef59a51656a5224.yml
-openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e
-config_hash: 8601d43fd5ccaf9e3d08f26748a5a63a
+configured_endpoints: 1783
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e408a7cdec2dae3d1a18842dcc59280c56050fb042569139aec3fe0f12e0d461.yml
+openapi_spec_hash: 7e210c76f5dd4c79b3e67204ad279b81
+config_hash: 1d1f62e87686c0d8571be460876f347c
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000000..5b01030785f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "python.analysis.importFormat": "relative",
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e63418f4e7a..98b7449657a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,102 @@
# Changelog
+## 4.4.0 (2025-08-02)
+
+Full Changelog: [v4.3.1...v4.4.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v4.4.0)
+
+### Features
+
+* **api:** api update ([4f45fd3](https://github.com/cloudflare/cloudflare-python/commit/4f45fd34ff28ffc24a0dd6e184e84cb9e600048b))
+* **api:** api update ([1a01a4c](https://github.com/cloudflare/cloudflare-python/commit/1a01a4cef3884c2342cc9fc3091f15f175c10f64))
+* **api:** api update ([0ea1719](https://github.com/cloudflare/cloudflare-python/commit/0ea1719087ab998f84f42b4531a31ac211fc499a))
+* **api:** api update ([e0e13d1](https://github.com/cloudflare/cloudflare-python/commit/e0e13d1e05ee85b87e97a525ba226bc1e2978d61))
+* **api:** api update ([053f18f](https://github.com/cloudflare/cloudflare-python/commit/053f18f518d9a667b36a6787a9a098acda63ee16))
+* **api:** api update ([a51aa98](https://github.com/cloudflare/cloudflare-python/commit/a51aa985775acb99497a9c477d7dc09139c2aac9))
+* **api:** api update ([2528e34](https://github.com/cloudflare/cloudflare-python/commit/2528e345a3ba076ccbe8625662aa380616632332))
+* **api:** api update ([ff93fa7](https://github.com/cloudflare/cloudflare-python/commit/ff93fa75d4fb56cd32905f0b038b4bbf7f5461a7))
+* **api:** api update ([f36b1b3](https://github.com/cloudflare/cloudflare-python/commit/f36b1b337c568609dcb285729cdfd9ad645abf85))
+* **api:** api update ([f34ac3b](https://github.com/cloudflare/cloudflare-python/commit/f34ac3bd57d88ae4a7b85191191ab8681d47b85d))
+* **api:** api update ([798ad9b](https://github.com/cloudflare/cloudflare-python/commit/798ad9bbc747d55eddc313bcb44505d29bd54850))
+* **api:** api update ([da95a3c](https://github.com/cloudflare/cloudflare-python/commit/da95a3cd4f8964b00fba8ae4c1d92e9560d795d4))
+* **api:** api update ([9dc28ef](https://github.com/cloudflare/cloudflare-python/commit/9dc28ef7777e9ca06064d9a892c9090f162c0880))
+* **api:** api update ([6ddf7bd](https://github.com/cloudflare/cloudflare-python/commit/6ddf7bdcc9c35488d04d741bdeaea32d9fc3df87))
+* **api:** api update ([b607779](https://github.com/cloudflare/cloudflare-python/commit/b607779817e42a725f1829b6ae1bec472995d1fa))
+* **api:** api update ([d62a22f](https://github.com/cloudflare/cloudflare-python/commit/d62a22f109cbd7e17d03f635744d10b8bc62468b))
+* **api:** api update ([f180318](https://github.com/cloudflare/cloudflare-python/commit/f18031897607bed8160e374ad16f5e6fa44e9a6b))
+* **api:** api update ([1a667f2](https://github.com/cloudflare/cloudflare-python/commit/1a667f27d3339aac885d2c757a1805f16dbb7aee))
+* **api:** api update ([c7ead27](https://github.com/cloudflare/cloudflare-python/commit/c7ead27c8046a2be4bfc9f1ac3bb10b6845fe106))
+* **api:** api update ([f9de8af](https://github.com/cloudflare/cloudflare-python/commit/f9de8af04c3de32ba9749af92432545af3aed49f))
+* **api:** api update ([d0bc41a](https://github.com/cloudflare/cloudflare-python/commit/d0bc41a0c0a45911045c66543f66aebd66d7da2e))
+* **api:** api update ([0925597](https://github.com/cloudflare/cloudflare-python/commit/0925597d91bfb6c529426f41d023be7f8b97ffd3))
+* **api:** api update ([5745f74](https://github.com/cloudflare/cloudflare-python/commit/5745f74557e1289536cb11fa6e701411b2621066))
+* **api:** api update ([1a935f1](https://github.com/cloudflare/cloudflare-python/commit/1a935f11a343cca19171cf5de8c38f58856ae738))
+* **api:** api update ([54d6d21](https://github.com/cloudflare/cloudflare-python/commit/54d6d217d4f3b8ae2b87db2eb426819839f38315))
+* **api:** api update ([ae7588d](https://github.com/cloudflare/cloudflare-python/commit/ae7588d0b75a63f629fe304f434c616d521b5f3d))
+* **api:** api update ([7773d8a](https://github.com/cloudflare/cloudflare-python/commit/7773d8abc67e3a475fe2cd7c73301f3e9c7044bb))
+* **api:** api update ([d43aff4](https://github.com/cloudflare/cloudflare-python/commit/d43aff4a49f54e2b66cd1cf173a1bbbbd67e9de6))
+* **api:** api update ([90035b1](https://github.com/cloudflare/cloudflare-python/commit/90035b1ef5df466e26f5569005042342f34685a4))
+* **api:** api update ([4b25769](https://github.com/cloudflare/cloudflare-python/commit/4b2576975390342d64a58d6181e8a3f77f58e7b0))
+* **api:** api update ([4ab783f](https://github.com/cloudflare/cloudflare-python/commit/4ab783f798c1d2ac041afe9cc0f1829131a4cbba))
+* **api:** api update ([094a1c0](https://github.com/cloudflare/cloudflare-python/commit/094a1c0f2481b8e41ad5f06c12ada4d22776299f))
+* **api:** api update ([0084a4d](https://github.com/cloudflare/cloudflare-python/commit/0084a4d643e56ef69978eb3868b73beb4e9c24e2))
+* **api:** api update ([1bea8ae](https://github.com/cloudflare/cloudflare-python/commit/1bea8ae838936eab4da1b81092e6a184d4cbee38))
+* **api:** api update ([ad06dcd](https://github.com/cloudflare/cloudflare-python/commit/ad06dcd9de8fa91a2876359c865fd3441c7efee5))
+* **api:** api update ([b9c025b](https://github.com/cloudflare/cloudflare-python/commit/b9c025b2745b45eb9d4ce743dd4d4131d0b9034b))
+* **api:** api update ([20da11a](https://github.com/cloudflare/cloudflare-python/commit/20da11a728f7581238769b01e9b6dce525d7e235))
+* **api:** api update ([aef7eb7](https://github.com/cloudflare/cloudflare-python/commit/aef7eb77a0565f001bcef1d28e1adddcbdcda821))
+* **api:** api update ([5364bb7](https://github.com/cloudflare/cloudflare-python/commit/5364bb7fafdd4d85525232ee90c4e7b4dbae4488))
+* **api:** api update ([0d26a36](https://github.com/cloudflare/cloudflare-python/commit/0d26a36fbcd6c82968489f22c2db349aeb020878))
+* **api:** api update ([8a99cf5](https://github.com/cloudflare/cloudflare-python/commit/8a99cf5e25f69079acbef07f32f2b728a0f10849))
+* **api:** api update ([4ec7e83](https://github.com/cloudflare/cloudflare-python/commit/4ec7e833fd5ee4250b96231366343131d0008b72))
+* **api:** api update ([a46cf0d](https://github.com/cloudflare/cloudflare-python/commit/a46cf0d8fdfc88a45ce131656a0a7c3cb9c53fcc))
+* **api:** api update ([c6096ae](https://github.com/cloudflare/cloudflare-python/commit/c6096aeb9836a7d19c358d0a0217649d9e5455dd))
+* clean up environment call outs ([f24f43d](https://github.com/cloudflare/cloudflare-python/commit/f24f43d8132d0efc31d49954209549932bba6f75))
+* **client:** support file upload requests ([2bfa20a](https://github.com/cloudflare/cloudflare-python/commit/2bfa20a5ce735617e95729fa7f7e15e7b7aa34cc))
+
+
+### Bug Fixes
+
+* **api:** add missing `items` param ([f1eda00](https://github.com/cloudflare/cloudflare-python/commit/f1eda003cec7a593680d7e58106fad0e029cf5ee))
+* **client:** don't send Content-Type header on GET requests ([43041fb](https://github.com/cloudflare/cloudflare-python/commit/43041fba5e43c7e8022c5ece6d98d055e150a47b))
+* dns record example ([8f2f7a4](https://github.com/cloudflare/cloudflare-python/commit/8f2f7a4662883ae4cb85f956dda2b82a7ed952e4))
+* dns record example ([9085347](https://github.com/cloudflare/cloudflare-python/commit/908534756a4f8321407ced2dea94531e895989b8))
+* **parsing:** correctly handle nested discriminated unions ([9e6eb88](https://github.com/cloudflare/cloudflare-python/commit/9e6eb8890842b715b91c029ed3ad46b52d6fa9b3))
+* **parsing:** ignore empty metadata ([7569336](https://github.com/cloudflare/cloudflare-python/commit/7569336edf388157a87d85747180c925c9a4227a))
+* **parsing:** parse extra field types ([5c5c79d](https://github.com/cloudflare/cloudflare-python/commit/5c5c79d6d3d3601c38fc470d49d03d1e46716b7d))
+* radar types ([42c2209](https://github.com/cloudflare/cloudflare-python/commit/42c22098266df3dc6ebc0c19cfec97b6d851c9cd))
+* radar types ([234b609](https://github.com/cloudflare/cloudflare-python/commit/234b609b77d476c89f92fb289d02a1aaf6decf01))
+* **types:** add missing types ([8c44db9](https://github.com/cloudflare/cloudflare-python/commit/8c44db926c36c9734fcf7f07a7b82fc609f29297))
+
+
+### Chores
+
+* **api:** Skip broken prism test for updating custom DLP entries ([71baeb0](https://github.com/cloudflare/cloudflare-python/commit/71baeb0e4ca8145723f85233fa05cc42958a92e0))
+* **api:** skip broken prism tests ([c87b536](https://github.com/cloudflare/cloudflare-python/commit/c87b53618d2d3fde0d9f76e910bd9166d52b3b9a))
+* **api:** update composite API spec ([9cce5ac](https://github.com/cloudflare/cloudflare-python/commit/9cce5acde48c47ed3a59e5662ba87e8a38e83414))
+* **api:** upload OpenAPI schema from api-schemas ([be94ae0](https://github.com/cloudflare/cloudflare-python/commit/be94ae004837ec8e2c6fa132747a8378337ecb93))
+* **api:** upload stainless config from cloudflare-config ([da40430](https://github.com/cloudflare/cloudflare-python/commit/da40430abf95b44de17abbc172bcfb7477b08ec7))
+* **api:** upload stainless config from cloudflare-config ([cde1ea6](https://github.com/cloudflare/cloudflare-python/commit/cde1ea60050d99f02a275d3fb84625afd79154e7))
+* **api:** upload stainless config from cloudflare-config ([daa7fe0](https://github.com/cloudflare/cloudflare-python/commit/daa7fe0beca11ed9ba77bcf2d16a67ae9a8e83c0))
+* **api:** upload stainless config from cloudflare-config ([5d2c28c](https://github.com/cloudflare/cloudflare-python/commit/5d2c28c0fff36330feeacacbfa7039a5d3291e14))
+* **api:** upload stainless config from cloudflare-config ([8b866ab](https://github.com/cloudflare/cloudflare-python/commit/8b866ab3e5d548593a824fb4407fbacdd9a94fe0))
+* **api:** upload stainless config from cloudflare-config ([4456fdb](https://github.com/cloudflare/cloudflare-python/commit/4456fdb5bfc62a726f66f3705a3bddd8fc73407b))
+* **api:** upload stainless config from cloudflare-config ([d903656](https://github.com/cloudflare/cloudflare-python/commit/d903656ac46dffde681ddd97cdae697184e1c440))
+* **api:** upload stainless config from cloudflare-config ([f548ad4](https://github.com/cloudflare/cloudflare-python/commit/f548ad490f3f7d7b887a7c6691eae3234209f258))
+* **api:** upload stainless config from cloudflare-config ([0d5adaa](https://github.com/cloudflare/cloudflare-python/commit/0d5adaab4397dc11b3730304e796fb331102424b))
+* **api:** upload stainless config from cloudflare-config ([f47f76b](https://github.com/cloudflare/cloudflare-python/commit/f47f76b7499ed679f722ffcbfba3abafe77be702))
+* **api:** upload stainless config from cloudflare-config ([b0defd7](https://github.com/cloudflare/cloudflare-python/commit/b0defd7fef30a561cd1ce0adcf7444c3973d5bb8))
+* **api:** upload stainless config from cloudflare-config ([543a81b](https://github.com/cloudflare/cloudflare-python/commit/543a81b65159c05bef60ccf5d6dfd838fcfb6ca5))
+* **api:** upload stainless config from cloudflare-config ([e4b71d8](https://github.com/cloudflare/cloudflare-python/commit/e4b71d892d68eb6b6d491162e9b47f26b3407169))
+* **api:** upload stainless config from cloudflare-config ([c9fa067](https://github.com/cloudflare/cloudflare-python/commit/c9fa067b88ebeda085c44c2f014b8ee3c087e55a))
+* **api:** upload stainless config from cloudflare-config ([960e4e4](https://github.com/cloudflare/cloudflare-python/commit/960e4e4a5fd933107270c5808fc3ea45372a9de0))
+* **api:** upload stainless config from cloudflare-config ([d00a8be](https://github.com/cloudflare/cloudflare-python/commit/d00a8be88733a8a5aa1af3abdb942e47befc2b47))
+* **internal:** bump pinned h11 dep ([a151be0](https://github.com/cloudflare/cloudflare-python/commit/a151be01332015a572bfe280f9708a2abf82dbaf))
+* **internal:** codegen related update ([371845c](https://github.com/cloudflare/cloudflare-python/commit/371845cca805cc6fa3bb84680d4e5d698c38235e))
+* **package:** mark python 3.13 as supported ([9e18f39](https://github.com/cloudflare/cloudflare-python/commit/9e18f39e933b396a425b0a3f6976a1130e7218c2))
+* **project:** add settings file for vscode ([967462d](https://github.com/cloudflare/cloudflare-python/commit/967462dfb5a37e4b7334fc0ce24c08abc37f3e62))
+* **readme:** fix version rendering on pypi ([d3d7dd6](https://github.com/cloudflare/cloudflare-python/commit/d3d7dd61af8899c760d066d53c69e5b0e4e99fe8))
+* **types:** rebuild Pydantic models after all types are defined ([cf574a4](https://github.com/cloudflare/cloudflare-python/commit/cf574a4c28ea55613d66da64bd55d89d1ffb8859))
+
## 4.3.1 (2025-06-16)
Full Changelog: [v4.3.0...v4.3.1](https://github.com/cloudflare/cloudflare-python/compare/v4.3.0...v4.3.1)
diff --git a/README.md b/README.md
index 755e3162353..4e08fb20437 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Cloudflare Python API library
-[](https://pypi.org/project/cloudflare/)
+
+[)](https://pypi.org/project/cloudflare/)
The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
@@ -70,6 +71,41 @@ asyncio.run(main())
Functionality between the synchronous and asynchronous clients is otherwise identical.
+### With aiohttp
+
+By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
+
+You can enable this by installing `aiohttp`:
+
+```sh
+# install from PyPI
+pip install cloudflare[aiohttp]
+```
+
+Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
+
+```python
+import asyncio
+from cloudflare import DefaultAioHttpClient
+from cloudflare import AsyncCloudflare
+
+
+async def main() -> None:
+ async with AsyncCloudflare(
+ api_token="Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY",
+ http_client=DefaultAioHttpClient(),
+ ) as client:
+ zone = await client.zones.create(
+ account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
+ name="example.com",
+ type="full",
+ )
+ print(zone.id)
+
+
+asyncio.run(main())
+```
+
## Using types
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
@@ -244,7 +280,7 @@ client.with_options(max_retries=5).zones.get(
### Timeouts
By default requests time out after 1 minute. You can configure this with a `timeout` option,
-which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
+which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
```python
from cloudflare import Cloudflare
diff --git a/api.md b/api.md
index 04738525ed2..c5cae6b98aa 100644
--- a/api.md
+++ b/api.md
@@ -110,8 +110,8 @@ from cloudflare.types.accounts.tokens import PermissionGroupListResponse, Permis
Methods:
-- client.accounts.tokens.permission_groups.list(\*, account_id) -> SyncSinglePage[PermissionGroupListResponse]
-- client.accounts.tokens.permission_groups.get(\*, account_id) -> SyncSinglePage[PermissionGroupGetResponse]
+- client.accounts.tokens.permission_groups.list(\*, account_id, \*\*params) -> SyncSinglePage[PermissionGroupListResponse]
+- client.accounts.tokens.permission_groups.get(\*, account_id, \*\*params) -> Optional[PermissionGroupGetResponse]
### Value
@@ -297,7 +297,7 @@ from cloudflare.types.user.tokens import PermissionGroupListResponse
Methods:
-- client.user.tokens.permission_groups.list() -> SyncSinglePage[PermissionGroupListResponse]
+- client.user.tokens.permission_groups.list(\*\*params) -> SyncSinglePage[PermissionGroupListResponse]
### Value
@@ -760,7 +760,7 @@ from cloudflare.types.ssl import RecommendationGetResponse
Methods:
-- client.ssl.recommendations.get(\*, zone_id) -> Optional[RecommendationGetResponse]
+- client.ssl.recommendations.get(\*, zone_id) -> RecommendationGetResponse
## Universal
@@ -809,16 +809,10 @@ Methods:
## SmartRouting
-Types:
-
-```python
-from cloudflare.types.argo import SmartRoutingEditResponse, SmartRoutingGetResponse
-```
-
Methods:
-- client.argo.smart_routing.edit(\*, zone_id, \*\*params) -> SmartRoutingEditResponse
-- client.argo.smart_routing.get(\*, zone_id) -> SmartRoutingGetResponse
+- client.argo.smart_routing.edit(\*, zone_id, \*\*params) -> object
+- client.argo.smart_routing.get(\*, zone_id) -> object
## TieredCaching
@@ -2396,16 +2390,19 @@ Types:
```python
from cloudflare.types.workers.scripts import (
- Deployment,
DeploymentCreateResponse,
+ DeploymentListResponse,
+ DeploymentDeleteResponse,
DeploymentGetResponse,
)
```
Methods:
-- client.workers.scripts.deployments.create(script_name, \*, account_id, \*\*params) -> Optional[DeploymentCreateResponse]
-- client.workers.scripts.deployments.get(script_name, \*, account_id) -> Optional[DeploymentGetResponse]
+- client.workers.scripts.deployments.create(script_name, \*, account_id, \*\*params) -> DeploymentCreateResponse
+- client.workers.scripts.deployments.list(script_name, \*, account_id) -> DeploymentListResponse
+- client.workers.scripts.deployments.delete(deployment_id, \*, account_id, script_name) -> DeploymentDeleteResponse
+- client.workers.scripts.deployments.get(deployment_id, \*, account_id, script_name) -> DeploymentGetResponse
### Versions
@@ -2570,15 +2567,9 @@ Methods:
### Metadata
-Types:
-
-```python
-from cloudflare.types.kv.namespaces import MetadataGetResponse
-```
-
Methods:
-- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> Optional[MetadataGetResponse]
+- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> object
### Values
@@ -2606,7 +2597,7 @@ from cloudflare.types.durable_objects import Namespace
Methods:
-- client.durable_objects.namespaces.list(\*, account_id) -> SyncSinglePage[Namespace]
+- client.durable_objects.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Namespace]
### Objects
@@ -2649,8 +2640,9 @@ 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.list(queue_id, \*, account_id) -> SyncSinglePage[Consumer]
- client.queues.consumers.delete(consumer_id, \*, account_id, queue_id) -> ConsumerDeleteResponse
-- client.queues.consumers.get(queue_id, \*, account_id) -> SyncSinglePage[Consumer]
+- client.queues.consumers.get(consumer_id, \*, account_id, queue_id) -> Optional[Consumer]
## Messages
@@ -3368,17 +3360,62 @@ Types:
```python
from cloudflare.types.brand_protection import (
Info,
- RuleMatch,
- ScanStatus,
Submit,
- URLInfoModelResults,
+ BrandProtectionSubmitResponse,
+ BrandProtectionURLInfoResponse,
)
```
Methods:
-- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit]
-- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info]
+- client.brand_protection.submit(\*, account_id) -> BrandProtectionSubmitResponse
+- client.brand_protection.url_info(\*, account_id) -> SyncSinglePage[BrandProtectionURLInfoResponse]
+
+## Queries
+
+Methods:
+
+- client.brand_protection.queries.create(\*, account_id, \*\*params) -> None
+- client.brand_protection.queries.delete(\*, account_id, \*\*params) -> None
+
+## Matches
+
+Types:
+
+```python
+from cloudflare.types.brand_protection import MatchDownloadResponse, MatchGetResponse
+```
+
+Methods:
+
+- client.brand_protection.matches.download(\*, account_id, \*\*params) -> MatchDownloadResponse
+- client.brand_protection.matches.get(\*, account_id, \*\*params) -> MatchGetResponse
+
+## Logos
+
+Types:
+
+```python
+from cloudflare.types.brand_protection import LogoCreateResponse
+```
+
+Methods:
+
+- client.brand_protection.logos.create(\*, account_id, \*\*params) -> LogoCreateResponse
+- client.brand_protection.logos.delete(logo_id, \*, account_id) -> None
+
+## LogoMatches
+
+Types:
+
+```python
+from cloudflare.types.brand_protection import LogoMatchDownloadResponse, LogoMatchGetResponse
+```
+
+Methods:
+
+- client.brand_protection.logo_matches.download(\*, account_id, \*\*params) -> LogoMatchDownloadResponse
+- client.brand_protection.logo_matches.get(\*, account_id, \*\*params) -> LogoMatchGetResponse
# Diagnostics
@@ -3394,6 +3431,29 @@ Methods:
- client.diagnostics.traceroutes.create(\*, account_id, \*\*params) -> SyncSinglePage[Traceroute]
+## EndpointHealthchecks
+
+Types:
+
+```python
+from cloudflare.types.diagnostics import (
+ EndpointHealthcheck,
+ EndpointHealthcheckCreateResponse,
+ EndpointHealthcheckUpdateResponse,
+ EndpointHealthcheckListResponse,
+ EndpointHealthcheckDeleteResponse,
+ EndpointHealthcheckGetResponse,
+)
+```
+
+Methods:
+
+- client.diagnostics.endpoint_healthchecks.create(\*, account_id, \*\*params) -> Optional[EndpointHealthcheckCreateResponse]
+- client.diagnostics.endpoint_healthchecks.update(id, \*, account_id, \*\*params) -> Optional[EndpointHealthcheckUpdateResponse]
+- client.diagnostics.endpoint_healthchecks.list(\*, account_id) -> Optional[EndpointHealthcheckListResponse]
+- client.diagnostics.endpoint_healthchecks.delete(id, \*, account_id) -> EndpointHealthcheckDeleteResponse
+- client.diagnostics.endpoint_healthchecks.get(id, \*, account_id) -> Optional[EndpointHealthcheckGetResponse]
+
# Images
## V1
@@ -3929,8 +3989,10 @@ Types:
```python
from cloudflare.types.magic_transit import (
+ ConnectorCreateResponse,
ConnectorUpdateResponse,
ConnectorListResponse,
+ ConnectorDeleteResponse,
ConnectorEditResponse,
ConnectorGetResponse,
)
@@ -3938,8 +4000,10 @@ from cloudflare.types.magic_transit import (
Methods:
+- client.magic_transit.connectors.create(\*, account_id, \*\*params) -> ConnectorCreateResponse
- client.magic_transit.connectors.update(connector_id, \*, account_id, \*\*params) -> ConnectorUpdateResponse
- client.magic_transit.connectors.list(\*, account_id) -> SyncSinglePage[ConnectorListResponse]
+- client.magic_transit.connectors.delete(connector_id, \*, account_id) -> ConnectorDeleteResponse
- client.magic_transit.connectors.edit(connector_id, \*, account_id, \*\*params) -> ConnectorEditResponse
- client.magic_transit.connectors.get(connector_id, \*, account_id) -> ConnectorGetResponse
@@ -4444,7 +4508,6 @@ from cloudflare.types.rules import (
Redirect,
ListCreateResponse,
ListUpdateResponse,
- ListListResponse,
ListDeleteResponse,
ListGetResponse,
)
@@ -4454,7 +4517,7 @@ Methods:
- client.rules.lists.create(\*, account_id, \*\*params) -> ListCreateResponse
- client.rules.lists.update(list_id, \*, account_id, \*\*params) -> ListUpdateResponse
-- client.rules.lists.list(\*, account_id) -> ListListResponse
+- client.rules.lists.list(\*, account_id) -> SyncSinglePage[ListsList]
- client.rules.lists.delete(list_id, \*, account_id) -> ListDeleteResponse
- client.rules.lists.get(list_id, \*, account_id) -> ListGetResponse
@@ -4480,9 +4543,7 @@ from cloudflare.types.rules.lists import (
ListItem,
ItemCreateResponse,
ItemUpdateResponse,
- ItemListResponse,
ItemDeleteResponse,
- ItemGetResponse,
)
```
@@ -4490,9 +4551,9 @@ Methods:
- client.rules.lists.items.create(list_id, \*, account_id, \*\*params) -> ItemCreateResponse
- client.rules.lists.items.update(list_id, \*, account_id, \*\*params) -> ItemUpdateResponse
-- client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> ItemListResponse
-- client.rules.lists.items.delete(list_id, \*, account_id) -> ItemDeleteResponse
-- client.rules.lists.items.get(item_id, \*, account_id, list_id) -> ItemGetResponse
+- client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> SyncCursorPagination[object]
+- client.rules.lists.items.delete(list_id, \*, account_id, \*\*params) -> ItemDeleteResponse
+- client.rules.lists.items.get(item_id, \*, account_id, list_id) -> object
# Stream
@@ -6377,7 +6438,7 @@ from cloudflare.types.zero_trust.dlp.datasets import NewVersion
Methods:
- client.zero_trust.dlp.datasets.upload.create(dataset_id, \*, account_id) -> Optional[NewVersion]
-- client.zero_trust.dlp.datasets.upload.edit(version, \*, account_id, dataset_id, \*\*params) -> Optional[Dataset]
+- client.zero_trust.dlp.datasets.upload.edit(version, dataset, \*, account_id, dataset_id, \*\*params) -> Optional[Dataset]
#### Versions
@@ -6401,7 +6462,7 @@ from cloudflare.types.zero_trust.dlp.datasets.versions import EntryCreateRespons
Methods:
-- client.zero_trust.dlp.datasets.versions.entries.create(entry_id, \*, account_id, dataset_id, version, \*\*params) -> Optional[EntryCreateResponse]
+- client.zero_trust.dlp.datasets.versions.entries.create(entry_id, dataset_version_entry, \*, account_id, dataset_id, version, \*\*params) -> Optional[EntryCreateResponse]
### Patterns
@@ -6508,7 +6569,9 @@ from cloudflare.types.zero_trust.dlp.profiles import PredefinedProfile
Methods:
+- client.zero_trust.dlp.profiles.predefined.create(\*, account_id, \*\*params) -> Optional[Profile]
- client.zero_trust.dlp.profiles.predefined.update(profile_id, \*, account_id, \*\*params) -> Optional[Profile]
+- client.zero_trust.dlp.profiles.predefined.delete(profile_id, \*, account_id) -> object
- client.zero_trust.dlp.profiles.predefined.get(profile_id, \*, account_id) -> Optional[Profile]
### Limits
@@ -6538,11 +6601,59 @@ from cloudflare.types.zero_trust.dlp import (
Methods:
-- client.zero_trust.dlp.entries.create(\*, account_id, \*\*params) -> Optional[EntryCreateResponse]
-- client.zero_trust.dlp.entries.update(entry_id, \*, account_id, \*\*params) -> Optional[EntryUpdateResponse]
-- client.zero_trust.dlp.entries.list(\*, account_id) -> SyncSinglePage[EntryListResponse]
-- client.zero_trust.dlp.entries.delete(entry_id, \*, account_id) -> object
-- client.zero_trust.dlp.entries.get(entry_id, \*, account_id) -> Optional[EntryGetResponse]
+- client.zero_trust.dlp.entries.create(\*, account_id, \*\*params) -> Optional[EntryCreateResponse]
+- client.zero_trust.dlp.entries.update(entry_id, \*, account_id, \*\*params) -> Optional[EntryUpdateResponse]
+- client.zero_trust.dlp.entries.list(\*, account_id) -> SyncSinglePage[EntryListResponse]
+- client.zero_trust.dlp.entries.delete(entry_id, \*, account_id) -> object
+- client.zero_trust.dlp.entries.get(entry_id, \*, account_id) -> Optional[EntryGetResponse]
+
+#### Custom
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.dlp.entries import CustomCreateResponse, CustomUpdateResponse
+```
+
+Methods:
+
+- client.zero_trust.dlp.entries.custom.create(\*, account_id, \*\*params) -> Optional[CustomCreateResponse]
+- client.zero_trust.dlp.entries.custom.update(entry_id, \*, account_id, \*\*params) -> Optional[CustomUpdateResponse]
+- client.zero_trust.dlp.entries.custom.delete(entry_id, \*, account_id) -> object
+
+#### Predefined
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.dlp.entries import (
+ PredefinedCreateResponse,
+ PredefinedUpdateResponse,
+)
+```
+
+Methods:
+
+- client.zero_trust.dlp.entries.predefined.create(\*, account_id, \*\*params) -> Optional[PredefinedCreateResponse]
+- client.zero_trust.dlp.entries.predefined.update(entry_id, \*, account_id, \*\*params) -> Optional[PredefinedUpdateResponse]
+- client.zero_trust.dlp.entries.predefined.delete(entry_id, \*, account_id) -> object
+
+#### Integration
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.dlp.entries import (
+ IntegrationCreateResponse,
+ IntegrationUpdateResponse,
+)
+```
+
+Methods:
+
+- client.zero_trust.dlp.entries.integration.create(\*, account_id, \*\*params) -> Optional[IntegrationCreateResponse]
+- client.zero_trust.dlp.entries.integration.update(entry_id, \*, account_id, \*\*params) -> Optional[IntegrationUpdateResponse]
+- client.zero_trust.dlp.entries.integration.delete(entry_id, \*, account_id) -> object
## Gateway
@@ -7095,7 +7206,7 @@ from cloudflare.types.radar.ai import ToMarkdownCreateResponse
Methods:
-- client.radar.ai.to_markdown.create(\*, account_id, \*\*params) -> SyncSinglePage[ToMarkdownCreateResponse]
+- client.radar.ai.to_markdown.create(body, \*, account_id, \*\*params) -> SyncSinglePage[ToMarkdownCreateResponse]
### Inference
@@ -7280,6 +7391,44 @@ Methods:
- client.radar.bgp.ips.timeseries(\*\*params) -> IPTimeseriesResponse
+## Bots
+
+Types:
+
+```python
+from cloudflare.types.radar import (
+ BotListResponse,
+ BotGetResponse,
+ BotSummaryResponse,
+ BotTimeseriesResponse,
+ BotTimeseriesGroupsResponse,
+)
+```
+
+Methods:
+
+- client.radar.bots.list(\*\*params) -> BotListResponse
+- client.radar.bots.get(bot_slug, \*\*params) -> BotGetResponse
+- client.radar.bots.summary(dimension, \*\*params) -> BotSummaryResponse
+- client.radar.bots.timeseries(\*\*params) -> BotTimeseriesResponse
+- client.radar.bots.timeseries_groups(dimension, \*\*params) -> BotTimeseriesGroupsResponse
+
+### WebCrawlers
+
+Types:
+
+```python
+from cloudflare.types.radar.bots import (
+ WebCrawlerSummaryResponse,
+ WebCrawlerTimeseriesGroupsResponse,
+)
+```
+
+Methods:
+
+- client.radar.bots.web_crawlers.summary(dimension, \*\*params) -> WebCrawlerSummaryResponse
+- client.radar.bots.web_crawlers.timeseries_groups(dimension, \*\*params) -> WebCrawlerTimeseriesGroupsResponse
+
## Datasets
Types:
@@ -8644,15 +8793,20 @@ Methods:
Types:
```python
-from cloudflare.types.snippets import Snippet, SnippetDeleteResponse
+from cloudflare.types.snippets import (
+ SnippetUpdateResponse,
+ SnippetListResponse,
+ SnippetDeleteResponse,
+ SnippetGetResponse,
+)
```
Methods:
-- client.snippets.update(snippet_name, \*, zone_id, \*\*params) -> Optional[Snippet]
-- client.snippets.list(\*, zone_id) -> SyncSinglePage[Snippet]
-- client.snippets.delete(snippet_name, \*, zone_id) -> SnippetDeleteResponse
-- client.snippets.get(snippet_name, \*, zone_id) -> Optional[Snippet]
+- client.snippets.update(snippet_name, \*, zone_id, \*\*params) -> SnippetUpdateResponse
+- client.snippets.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[SnippetListResponse]
+- client.snippets.delete(snippet_name, \*, zone_id) -> str
+- client.snippets.get(snippet_name, \*, zone_id) -> SnippetGetResponse
## Content
@@ -8672,7 +8826,7 @@ Methods:
- client.snippets.rules.update(\*, zone_id, \*\*params) -> SyncSinglePage[RuleUpdateResponse]
- client.snippets.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse]
-- client.snippets.rules.delete(\*, zone_id) -> RuleDeleteResponse
+- client.snippets.rules.delete(\*, zone_id) -> SyncSinglePage[RuleDeleteResponse]
# Calls
@@ -8755,6 +8909,19 @@ Methods:
- client.cloudforce_one.scans.config.delete(config_id, \*, account_id) -> object
- client.cloudforce_one.scans.config.edit(config_id, \*, account_id, \*\*params) -> Optional[ConfigEditResponse]
+## BinaryStorage
+
+Types:
+
+```python
+from cloudflare.types.cloudforce_one import BinaryStorageCreateResponse
+```
+
+Methods:
+
+- client.cloudforce_one.binary_storage.create(\*, account_id, \*\*params) -> BinaryStorageCreateResponse
+- client.cloudforce_one.binary_storage.get(hash, \*, account_id) -> None
+
## Requests
Types:
@@ -9032,26 +9199,6 @@ 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
Types:
@@ -9739,13 +9886,17 @@ Methods:
Types:
```python
-from cloudflare.types.custom_pages import CustomPageUpdateResponse, CustomPageGetResponse
+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.list(\*, account_id, zone_id) -> SyncSinglePage[CustomPageListResponse]
- client.custom_pages.get(identifier, \*, account_id, zone_id) -> Optional[CustomPageGetResponse]
# SecretsStore
diff --git a/bin/check-release-environment b/bin/check-release-environment
index b659e91535b..b845b0f4c96 100644
--- a/bin/check-release-environment
+++ b/bin/check-release-environment
@@ -3,7 +3,7 @@
errors=()
if [ -z "${PYPI_TOKEN}" ]; then
- errors+=("The CLOUDFLARE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
+ errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi
lenErrors=${#errors[@]}
diff --git a/examples/dns/record.py b/examples/dns/record.py
index 72b89316a58..87b3d4fd17a 100644
--- a/examples/dns/record.py
+++ b/examples/dns/record.py
@@ -14,6 +14,7 @@
type="A",
name="www.mydns.com",
content="198.51.100.1",
+ ttl=1,
proxied=True,
)
assert record is not None
diff --git a/pyproject.toml b/pyproject.toml
index b1f6854f5f6..5cc7b8ef6b1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
-version = "4.3.1"
+version = "4.4.0"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
@@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
@@ -37,6 +38,8 @@ classifiers = [
Homepage = "https://github.com/cloudflare/cloudflare-python"
Repository = "https://github.com/cloudflare/cloudflare-python"
+[project.optional-dependencies]
+aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
[tool.rye]
managed = true
diff --git a/requirements-dev.lock b/requirements-dev.lock
index d30c3e08170..f3ae899edd1 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -10,6 +10,13 @@
# universal: false
-e file:.
+aiohappyeyeballs==2.6.1
+ # via aiohttp
+aiohttp==3.12.8
+ # via cloudflare
+ # via httpx-aiohttp
+aiosignal==1.3.2
+ # via aiohttp
annotated-types==0.6.0
# via pydantic
anyio==4.4.0
@@ -17,6 +24,10 @@ anyio==4.4.0
# via httpx
argcomplete==3.1.2
# via nox
+async-timeout==5.0.1
+ # via aiohttp
+attrs==25.3.0
+ # via aiohttp
certifi==2023.7.22
# via httpcore
# via httpx
@@ -34,16 +45,23 @@ execnet==2.1.1
# via pytest-xdist
filelock==3.12.4
# via virtualenv
-h11==0.14.0
+frozenlist==1.6.2
+ # via aiohttp
+ # via aiosignal
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via cloudflare
+ # via httpx-aiohttp
# via respx
+httpx-aiohttp==0.1.8
+ # via cloudflare
idna==3.4
# via anyio
# via httpx
+ # via yarl
importlib-metadata==7.0.0
iniconfig==2.0.0
# via pytest
@@ -51,6 +69,9 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
+multidict==6.4.4
+ # via aiohttp
+ # via yarl
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
@@ -65,6 +86,9 @@ platformdirs==3.11.0
# via virtualenv
pluggy==1.5.0
# via pytest
+propcache==0.3.1
+ # via aiohttp
+ # via yarl
pydantic==2.10.3
# via cloudflare
pydantic-core==2.27.1
@@ -98,11 +122,14 @@ tomli==2.0.2
typing-extensions==4.12.2
# via anyio
# via cloudflare
+ # via multidict
# via mypy
# via pydantic
# via pydantic-core
# via pyright
virtualenv==20.24.5
# via nox
+yarl==1.20.0
+ # via aiohttp
zipp==3.17.0
# via importlib-metadata
diff --git a/requirements.lock b/requirements.lock
index 4752e59fd63..c8746cc1925 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -10,11 +10,22 @@
# universal: false
-e file:.
+aiohappyeyeballs==2.6.1
+ # via aiohttp
+aiohttp==3.12.8
+ # via cloudflare
+ # via httpx-aiohttp
+aiosignal==1.3.2
+ # via aiohttp
annotated-types==0.6.0
# via pydantic
anyio==4.4.0
# via cloudflare
# via httpx
+async-timeout==5.0.1
+ # via aiohttp
+attrs==25.3.0
+ # via aiohttp
certifi==2023.7.22
# via httpcore
# via httpx
@@ -22,15 +33,28 @@ distro==1.8.0
# via cloudflare
exceptiongroup==1.2.2
# via anyio
-h11==0.14.0
+frozenlist==1.6.2
+ # via aiohttp
+ # via aiosignal
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via cloudflare
+ # via httpx-aiohttp
+httpx-aiohttp==0.1.8
+ # via cloudflare
idna==3.4
# via anyio
# via httpx
+ # via yarl
+multidict==6.4.4
+ # via aiohttp
+ # via yarl
+propcache==0.3.1
+ # via aiohttp
+ # via yarl
pydantic==2.10.3
# via cloudflare
pydantic-core==2.27.1
@@ -41,5 +65,8 @@ sniffio==1.3.0
typing-extensions==4.12.2
# via anyio
# via cloudflare
+ # via multidict
# via pydantic
# via pydantic-core
+yarl==1.20.0
+ # via aiohttp
diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes
new file mode 100755
index 00000000000..fb28f3a261a
--- /dev/null
+++ b/scripts/detect-breaking-changes
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+set -e
+
+cd "$(dirname "$0")/.."
+
+echo "==> Detecting breaking changes"
+
+TEST_PATHS=( tests/api_resources tests/test_client.py tests/test_response.py )
+
+for PATHSPEC in "${TEST_PATHS[@]}"; do
+ # Try to check out previous versions of the test files
+ # with the current SDK.
+ git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true
+done
+
+# Instead of running the tests, use the linter to check if an
+# older test is no longer compatible with the latest SDK.
+./scripts/lint
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index 6ba857e8d3b..fc6462eccf8 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -exuo pipefail
-RESPONSE=$(curl -X POST "$URL" \
+FILENAME=$(basename dist/*.whl)
+
+RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \
-H "Authorization: Bearer $AUTH" \
-H "Content-Type: application/json")
@@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi
-UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
- -H "Content-Type: application/gzip" \
- --data-binary @- "$SIGNED_URL" 2>&1)
+UPLOAD_RESPONSE=$(curl -v -X PUT \
+ -H "Content-Type: binary/octet-stream" \
+ --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1)
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA/$FILENAME'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
diff --git a/src/cloudflare/__init__.py b/src/cloudflare/__init__.py
index 9ce8e45d0c0..9d76c218a03 100644
--- a/src/cloudflare/__init__.py
+++ b/src/cloudflare/__init__.py
@@ -36,7 +36,7 @@
UnprocessableEntityError,
APIResponseValidationError,
)
-from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
+from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
from ._utils._logs import setup_logging as _setup_logging
__all__ = [
@@ -78,6 +78,7 @@
"DEFAULT_CONNECTION_LIMITS",
"DefaultHttpxClient",
"DefaultAsyncHttpxClient",
+ "DefaultAioHttpClient",
]
if not _t.TYPE_CHECKING:
diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py
index d6d981cb568..3024dbff06e 100644
--- a/src/cloudflare/_base_client.py
+++ b/src/cloudflare/_base_client.py
@@ -553,6 +553,18 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
+ is_body_allowed = options.method.lower() != "get"
+
+ if is_body_allowed:
+ if isinstance(json_data, bytes):
+ kwargs["content"] = json_data
+ else:
+ kwargs["json"] = json_data if is_given(json_data) else None
+ kwargs["files"] = files
+ else:
+ headers.pop("Content-Type", None)
+ kwargs.pop("data", None)
+
# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
@@ -564,8 +576,6 @@ 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 if is_given(json_data) else None,
- files=files,
**kwargs,
)
@@ -1331,6 +1341,24 @@ def __init__(self, **kwargs: Any) -> None:
super().__init__(**kwargs)
+try:
+ import httpx_aiohttp
+except ImportError:
+
+ class _DefaultAioHttpClient(httpx.AsyncClient):
+ def __init__(self, **_kwargs: Any) -> None:
+ raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra")
+else:
+
+ class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
+ def __init__(self, **kwargs: Any) -> None:
+ kwargs.setdefault("timeout", DEFAULT_TIMEOUT)
+ kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS)
+ kwargs.setdefault("follow_redirects", True)
+
+ super().__init__(**kwargs)
+
+
if TYPE_CHECKING:
DefaultAsyncHttpxClient = httpx.AsyncClient
"""An alias to `httpx.AsyncClient` that provides the same defaults that this SDK
@@ -1339,8 +1367,12 @@ def __init__(self, **kwargs: Any) -> None:
This is useful because overriding the `http_client` with your own instance of
`httpx.AsyncClient` will result in httpx's defaults being used, not ours.
"""
+
+ DefaultAioHttpClient = httpx.AsyncClient
+ """An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`."""
else:
DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient
+ DefaultAioHttpClient = _DefaultAioHttpClient
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index 141eaf0be63..77031e103b3 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -170,7 +170,6 @@
from .resources.billing.billing import BillingResource, AsyncBillingResource
from .resources.logpush.logpush import LogpushResource, AsyncLogpushResource
from .resources.workers.workers import WorkersResource, AsyncWorkersResource
- from .resources.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource
from .resources.accounts.accounts import AccountsResource, AsyncAccountsResource
from .resources.alerting.alerting import AlertingResource, AsyncAlertingResource
from .resources.firewall.firewall import FirewallResource, AsyncFirewallResource
@@ -214,6 +213,7 @@
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.brand_protection.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource
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
diff --git a/src/cloudflare/_files.py b/src/cloudflare/_files.py
index 8c03622633a..0c0ce12faaa 100644
--- a/src/cloudflare/_files.py
+++ b/src/cloudflare/_files.py
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], _read_file_content(file[1]), *file[2:])
+ return (file[0], read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-def _read_file_content(file: FileContent) -> HttpxFileContent:
+def read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return pathlib.Path(file).read_bytes()
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], await _async_read_file_content(file[1]), *file[2:])
+ return (file[0], await async_read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
+async def async_read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return await anyio.Path(file).read_bytes()
diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py
index 7bf82bb0bde..ddf07fa569b 100644
--- a/src/cloudflare/_models.py
+++ b/src/cloudflare/_models.py
@@ -2,9 +2,10 @@
import os
import inspect
-from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
+from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
from datetime import date, datetime
from typing_extensions import (
+ List,
Unpack,
Literal,
ClassVar,
@@ -208,14 +209,18 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride]
else:
fields_values[name] = field_get_default(field)
+ extra_field_type = _get_extra_fields_type(__cls)
+
_extra = {}
for key, value in values.items():
if key not in model_fields:
+ parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
+
if PYDANTIC_V2:
- _extra[key] = value
+ _extra[key] = parsed
else:
_fields_set.add(key)
- fields_values[key] = value
+ fields_values[key] = parsed
object.__setattr__(m, "__dict__", fields_values)
@@ -367,7 +372,24 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
if type_ is None:
raise RuntimeError(f"Unexpected field type is None for {key}")
- return construct_type(value=value, type_=type_)
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
+
+
+def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
+ if not PYDANTIC_V2:
+ # TODO
+ return None
+
+ schema = cls.__pydantic_core_schema__
+ if schema["type"] == "model":
+ fields = schema["schema"]
+ if fields["type"] == "model-fields":
+ extras = fields.get("extras_schema")
+ if extras and "cls" in extras:
+ # mypy can't narrow the type
+ return extras["cls"] # type: ignore[no-any-return]
+
+ return None
def is_basemodel(type_: type) -> bool:
@@ -421,7 +443,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
return cast(_T, construct_type(value=value, type_=type_))
-def construct_type(*, value: object, type_: object) -> object:
+def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
"""Loose coercion to the expected type with construction of nested values.
If the given value does not match the expected type then it is returned as-is.
@@ -439,8 +461,10 @@ def construct_type(*, value: object, type_: object) -> object:
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
- if is_annotated_type(type_):
- meta: tuple[Any, ...] = get_args(type_)[1:]
+ if metadata is not None and len(metadata) > 0:
+ meta: tuple[Any, ...] = tuple(metadata)
+ elif is_annotated_type(type_):
+ meta = get_args(type_)[1:]
type_ = extract_type_arg(type_, 0)
else:
meta = tuple()
diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py
index 0d479c2e651..d584d122921 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.3.1" # x-release-please-version
+__version__ = "4.4.0" # x-release-please-version
diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py
index e3e3af888d9..98fd039cbc1 100644
--- a/src/cloudflare/resources/abuse_reports.py
+++ b/src/cloudflare/resources/abuse_reports.py
@@ -48,57 +48,30 @@ def with_streaming_response(self) -> AbuseReportsResourceWithStreamingResponse:
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_dmca"],
+ address1: str,
+ agent_name: str,
+ agree: Literal[1],
+ city: str,
+ country: str,
email: str,
email2: str,
+ host_notification: Literal["send"],
name: str,
+ original_work: str,
+ owner_notification: Literal["send"],
+ signature: str,
+ state: str,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -110,22 +83,9 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
-
- act: The abuse report type
-
- 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/).
+ report_type: The abuse report type.
- 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/).
+ 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/).
@@ -139,29 +99,19 @@ def create(
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
+ country: 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
+ 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/).
- 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
+ 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
-
- 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.
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
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/).
@@ -169,36 +119,31 @@ def create(
owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
- 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.
-
- reported_country: Text containing 2 characters
-
- reported_user_agent: Text not exceeding 255 characters
-
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
+ urls: A list of valid URLs separated by ‘\n’ (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/).
+
+ 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/).
- title: Text not exceeding 255 characters
+ reported_country: Text containing 2 characters
- trademark_number: Text not exceeding 1000 characters
+ reported_user_agent: Text not exceeding 255 characters
- trademark_office: Text not exceeding 1000 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/).
- trademark_symbol: Text not exceeding 1000 characters
+ title: Text not exceeding 255 characters
extra_headers: Send extra headers
@@ -213,57 +158,26 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_trademark"],
email: str,
email2: str,
+ host_notification: Literal["send"],
+ justification: str,
name: str,
+ owner_notification: Literal["send"],
+ trademark_number: str,
+ trademark_office: str,
+ trademark_symbol: str,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -275,96 +189,53 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
-
- 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
-
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.
-
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ characters.
- original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ name: 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.
- 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.
+ trademark_number: Text not exceeding 1000 characters
- reported_country: Text containing 2 characters
+ trademark_office: Text not exceeding 1000 characters
- reported_user_agent: Text not exceeding 255 characters
+ trademark_symbol: Text not exceeding 1000 characters
- 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
+ urls: A list of valid URLs separated by ‘\n’ (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/).
- 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
+ comments: Any additional comments about the infringement not exceeding 2000 characters
- state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 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
- trademark_number: Text not exceeding 1000 characters
-
- trademark_office: Text not exceeding 1000 characters
-
- trademark_symbol: Text not exceeding 1000 characters
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -378,57 +249,26 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_general"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -440,64 +280,41 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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: A list of IP addresses separated by ‘\n’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
- ought to be unique
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ ought to be unique.
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
@@ -508,28 +325,15 @@ def create(
reported_user_agent: Text not exceeding 255 characters
- 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/).
+ source_ips: A list of IP addresses separated by ‘\n’ (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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -543,57 +347,24 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_phishing"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -605,97 +376,51 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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
+ 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/).
- 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
+ reported_country: Text containing 2 characters
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ reported_user_agent: Text not exceeding 255 characters
- 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
+ tele: Text not exceeding 20 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.
+ title: Text not exceeding 255 characters
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
- reported_country: Text containing 2 characters
-
- reported_user_agent: Text not exceeding 255 characters
-
- 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
-
- extra_headers: Send extra headers
+ extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -708,57 +433,25 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_children"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ ncmec_notification: Literal["send", "send-anon"],
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -770,34 +463,35 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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/).
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
comments: Any additional comments about the infringement not exceeding 2000 characters
@@ -807,59 +501,15 @@ def create(
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -873,57 +523,23 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_threat"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -935,96 +551,47 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
-
- 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
-
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
+ characters.
- 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
+ name: 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.
- 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.
+ urls: A list of valid URLs separated by ‘\n’ (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/).
- reported_country: Text containing 2 characters
-
- reported_user_agent: Text not exceeding 255 characters
+ comments: Any additional comments about the infringement not exceeding 2000 characters
- 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
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- 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
+ reported_country: Text containing 2 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/).
+ reported_user_agent: Text not exceeding 255 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
- trademark_number: Text not exceeding 1000 characters
-
- trademark_office: Text not exceeding 1000 characters
-
- trademark_symbol: Text not exceeding 1000 characters
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1038,57 +605,21 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_registrar_whois"],
email: str,
email2: str,
name: str,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -1100,9 +631,9 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
@@ -1112,84 +643,28 @@ def create(
name: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- 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/).
-
- 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/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- 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/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1203,57 +678,24 @@ def create(
@overload
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_ncsei"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
name: str,
+ ncsei_subject_representation: bool,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -1265,34 +707,30 @@ def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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/).
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
comments: Any additional comments about the infringement not exceeding 2000 characters
@@ -1302,59 +740,15 @@ def create(
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1365,60 +759,117 @@ def create(
"""
...
- @required_args(["account_id", "act", "email", "email2", "name", "urls"])
+ @required_args(
+ [
+ "account_id",
+ "act",
+ "address1",
+ "agent_name",
+ "agree",
+ "city",
+ "country",
+ "email",
+ "email2",
+ "host_notification",
+ "name",
+ "original_work",
+ "owner_notification",
+ "signature",
+ "state",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "owner_notification",
+ "trademark_number",
+ "trademark_office",
+ "trademark_symbol",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "owner_notification",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "ncmec_notification",
+ "owner_notification",
+ "urls",
+ ],
+ ["account_id", "act", "email", "email2", "name", "owner_notification", "urls"],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "name",
+ "ncsei_subject_representation",
+ "owner_notification",
+ "urls",
+ ],
+ )
def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_dmca"]
+ | Literal["abuse_trademark"]
+ | Literal["abuse_general"]
+ | Literal["abuse_phishing"]
+ | Literal["abuse_children"]
+ | Literal["abuse_threat"]
+ | Literal["abuse_registrar_whois"]
+ | Literal["abuse_ncsei"],
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
email: str,
email2: str,
+ host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
name: str,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"],
+ signature: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
+ justification: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | 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,
@@ -1435,35 +886,35 @@ def create(
body=maybe_transform(
{
"act": act,
- "email": email,
- "email2": email2,
- "name": name,
- "urls": urls,
"address1": address1,
"agent_name": agent_name,
"agree": agree,
"city": city,
- "comments": comments,
- "company": company,
"country": country,
- "destination_ips": destination_ips,
+ "email": email,
+ "email2": email2,
"host_notification": host_notification,
- "justification": justification,
- "ncmec_notification": ncmec_notification,
- "ncsei_subject_representation": ncsei_subject_representation,
+ "name": name,
"original_work": original_work,
"owner_notification": owner_notification,
- "ports_protocols": ports_protocols,
- "reported_country": reported_country,
- "reported_user_agent": reported_user_agent,
"signature": signature,
- "source_ips": source_ips,
"state": state,
+ "urls": urls,
+ "comments": comments,
+ "company": company,
+ "reported_country": reported_country,
+ "reported_user_agent": reported_user_agent,
"tele": tele,
"title": title,
+ "justification": justification,
"trademark_number": trademark_number,
"trademark_office": trademark_office,
"trademark_symbol": trademark_symbol,
+ "destination_ips": destination_ips,
+ "ports_protocols": ports_protocols,
+ "source_ips": source_ips,
+ "ncmec_notification": ncmec_notification,
+ "ncsei_subject_representation": ncsei_subject_representation,
},
abuse_report_create_params.AbuseReportCreateParams,
),
@@ -1501,57 +952,30 @@ def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingRespo
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_dmca"],
+ address1: str,
+ agent_name: str,
+ agree: Literal[1],
+ city: str,
+ country: str,
email: str,
email2: str,
+ host_notification: Literal["send"],
name: str,
+ original_work: str,
+ owner_notification: Literal["send"],
+ signature: str,
+ state: str,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -1563,22 +987,9 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
-
- 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/).
-
- 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/).
+ 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/).
@@ -1592,29 +1003,19 @@ async def create(
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
+ country: 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
+ 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/).
- 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
+ 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
-
- 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.
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
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/).
@@ -1622,36 +1023,31 @@ async def create(
owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
- 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.
-
- reported_country: Text containing 2 characters
-
- reported_user_agent: Text not exceeding 255 characters
-
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
+ urls: A list of valid URLs separated by ‘\n’ (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/).
+
+ 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/).
- title: Text not exceeding 255 characters
+ reported_country: Text containing 2 characters
- trademark_number: Text not exceeding 1000 characters
+ reported_user_agent: Text not exceeding 255 characters
- trademark_office: Text not exceeding 1000 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/).
- trademark_symbol: Text not exceeding 1000 characters
+ title: Text not exceeding 255 characters
extra_headers: Send extra headers
@@ -1666,57 +1062,26 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_trademark"],
email: str,
email2: str,
+ host_notification: Literal["send"],
+ justification: str,
name: str,
+ owner_notification: Literal["send"],
+ trademark_number: str,
+ trademark_office: str,
+ trademark_symbol: str,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -1728,96 +1093,53 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
-
- 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
-
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
+ characters.
- 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
+ name: 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.
- 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.
+ trademark_number: Text not exceeding 1000 characters
- reported_country: Text containing 2 characters
+ trademark_office: Text not exceeding 1000 characters
- reported_user_agent: Text not exceeding 255 characters
+ trademark_symbol: Text not exceeding 1000 characters
- 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
+ urls: A list of valid URLs separated by ‘\n’ (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/).
- 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
+ comments: Any additional comments about the infringement not exceeding 2000 characters
- state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 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
- trademark_number: Text not exceeding 1000 characters
-
- trademark_office: Text not exceeding 1000 characters
-
- trademark_symbol: Text not exceeding 1000 characters
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1831,57 +1153,26 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_general"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -1893,64 +1184,41 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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: A list of IP addresses separated by ‘\n’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
- ought to be unique
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ ought to be unique.
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
@@ -1961,28 +1229,15 @@ async def create(
reported_user_agent: Text not exceeding 255 characters
- 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/).
+ source_ips: A list of IP addresses separated by ‘\n’ (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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1996,57 +1251,24 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_phishing"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -2058,96 +1280,50 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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
-
- 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.
-
- 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/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2161,57 +1337,25 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_children"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ ncmec_notification: Literal["send", "send-anon"],
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -2223,34 +1367,35 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
+ host_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. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ 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.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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/).
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
comments: Any additional comments about the infringement not exceeding 2000 characters
@@ -2260,59 +1405,15 @@ async def create(
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2326,57 +1427,23 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_threat"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
+ justification: str,
name: str,
+ owner_notification: Literal["send", "send-anon"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -2388,96 +1455,47 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
-
- 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
-
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.
-
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ characters.
- original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ name: 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.
- 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.
-
- reported_country: Text containing 2 characters
+ urls: A list of valid URLs separated by ‘\n’ (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/).
- reported_user_agent: Text not exceeding 255 characters
+ comments: Any additional comments about the infringement not exceeding 2000 characters
- 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
+ company: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- 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
+ reported_country: Text containing 2 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/).
+ reported_user_agent: Text not exceeding 255 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
- trademark_number: Text not exceeding 1000 characters
-
- trademark_office: Text not exceeding 1000 characters
-
- trademark_symbol: Text not exceeding 1000 characters
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2491,57 +1509,21 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_registrar_whois"],
email: str,
email2: str,
name: str,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -2553,9 +1535,9 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
@@ -2565,84 +1547,28 @@ async def create(
name: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- 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/).
-
- 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
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2656,57 +1582,24 @@ async def create(
@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",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_ncsei"],
email: str,
email2: str,
+ host_notification: Literal["send", "send-anon"],
name: str,
+ ncsei_subject_representation: bool,
+ owner_notification: Literal["send", "send-anon", "none"],
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
# 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,
@@ -2718,34 +1611,30 @@ async def create(
Submit the Abuse Report of a particular type
Args:
- report_type: The abuse report type
+ report_type: The abuse report type.
- act: The abuse report type
+ act: The abuse report type.
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/).
-
- 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/).
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
+ name: Text not exceeding 255 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/).
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ urls: A list of valid URLs separated by ‘\n’ (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/).
comments: Any additional comments about the infringement not exceeding 2000 characters
@@ -2755,59 +1644,15 @@ async def create(
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
-
- 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.
-
- 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/).
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- 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.
-
reported_country: Text containing 2 characters
reported_user_agent: Text not exceeding 255 characters
- 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
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2818,60 +1663,117 @@ async def create(
"""
...
- @required_args(["account_id", "act", "email", "email2", "name", "urls"])
+ @required_args(
+ [
+ "account_id",
+ "act",
+ "address1",
+ "agent_name",
+ "agree",
+ "city",
+ "country",
+ "email",
+ "email2",
+ "host_notification",
+ "name",
+ "original_work",
+ "owner_notification",
+ "signature",
+ "state",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "owner_notification",
+ "trademark_number",
+ "trademark_office",
+ "trademark_symbol",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "owner_notification",
+ "urls",
+ ],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "justification",
+ "name",
+ "ncmec_notification",
+ "owner_notification",
+ "urls",
+ ],
+ ["account_id", "act", "email", "email2", "name", "owner_notification", "urls"],
+ [
+ "account_id",
+ "act",
+ "email",
+ "email2",
+ "host_notification",
+ "name",
+ "ncsei_subject_representation",
+ "owner_notification",
+ "urls",
+ ],
+ )
async def create(
self,
- report_type: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ report_type: str,
*,
account_id: str,
- act: Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ],
+ act: Literal["abuse_dmca"]
+ | Literal["abuse_trademark"]
+ | Literal["abuse_general"]
+ | Literal["abuse_phishing"]
+ | Literal["abuse_children"]
+ | Literal["abuse_threat"]
+ | Literal["abuse_registrar_whois"]
+ | Literal["abuse_ncsei"],
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
email: str,
email2: str,
+ host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
name: str,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"],
+ signature: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
urls: str,
- 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,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- justification: 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,
- owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: 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,
+ justification: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
+ destination_ips: str | NotGiven = NOT_GIVEN,
+ ports_protocols: str | NotGiven = NOT_GIVEN,
+ source_ips: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | 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,
@@ -2888,35 +1790,35 @@ async def create(
body=await async_maybe_transform(
{
"act": act,
- "email": email,
- "email2": email2,
- "name": name,
- "urls": urls,
"address1": address1,
"agent_name": agent_name,
"agree": agree,
"city": city,
- "comments": comments,
- "company": company,
"country": country,
- "destination_ips": destination_ips,
+ "email": email,
+ "email2": email2,
"host_notification": host_notification,
- "justification": justification,
- "ncmec_notification": ncmec_notification,
- "ncsei_subject_representation": ncsei_subject_representation,
+ "name": name,
"original_work": original_work,
"owner_notification": owner_notification,
- "ports_protocols": ports_protocols,
- "reported_country": reported_country,
- "reported_user_agent": reported_user_agent,
"signature": signature,
- "source_ips": source_ips,
"state": state,
+ "urls": urls,
+ "comments": comments,
+ "company": company,
+ "reported_country": reported_country,
+ "reported_user_agent": reported_user_agent,
"tele": tele,
"title": title,
+ "justification": justification,
"trademark_number": trademark_number,
"trademark_office": trademark_office,
"trademark_symbol": trademark_symbol,
+ "destination_ips": destination_ips,
+ "ports_protocols": ports_protocols,
+ "source_ips": source_ips,
+ "ncmec_notification": ncmec_notification,
+ "ncsei_subject_representation": ncsei_subject_representation,
},
abuse_report_create_params.AbuseReportCreateParams,
),
diff --git a/src/cloudflare/resources/accounts/tokens/permission_groups.py b/src/cloudflare/resources/accounts/tokens/permission_groups.py
index d98d5235ce0..34419575c03 100644
--- a/src/cloudflare/resources/accounts/tokens/permission_groups.py
+++ b/src/cloudflare/resources/accounts/tokens/permission_groups.py
@@ -2,9 +2,12 @@
from __future__ import annotations
+from typing import Type, Optional, cast
+
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 (
@@ -13,8 +16,10 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
+from ...._wrappers import ResultWrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
from ...._base_client import AsyncPaginator, make_request_options
+from ....types.accounts.tokens import permission_group_get_params, permission_group_list_params
from ....types.accounts.tokens.permission_group_get_response import PermissionGroupGetResponse
from ....types.accounts.tokens.permission_group_list_response import PermissionGroupListResponse
@@ -45,6 +50,8 @@ def list(
self,
*,
account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
@@ -58,6 +65,10 @@ def list(
Args:
account_id: Account identifier tag.
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -72,7 +83,17 @@ def list(
f"/accounts/{account_id}/tokens/permission_groups",
page=SyncSinglePage[PermissionGroupListResponse],
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(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_list_params.PermissionGroupListParams,
+ ),
),
model=PermissionGroupListResponse,
)
@@ -81,19 +102,25 @@ def get(
self,
*,
account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
- ) -> SyncSinglePage[PermissionGroupGetResponse]:
+ ) -> Optional[PermissionGroupGetResponse]:
"""
Find all available permission groups for Account Owned API Tokens
Args:
account_id: Account identifier tag.
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -104,13 +131,23 @@ 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_api_list(
+ return self._get(
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
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_get_params.PermissionGroupGetParams,
+ ),
+ post_parser=ResultWrapper[Optional[PermissionGroupGetResponse]]._unwrapper,
),
- model=PermissionGroupGetResponse,
+ cast_to=cast(Type[Optional[PermissionGroupGetResponse]], ResultWrapper[PermissionGroupGetResponse]),
)
@@ -138,6 +175,8 @@ def list(
self,
*,
account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
@@ -151,6 +190,10 @@ def list(
Args:
account_id: Account identifier tag.
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -165,28 +208,44 @@ def 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
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_list_params.PermissionGroupListParams,
+ ),
),
model=PermissionGroupListResponse,
)
- def get(
+ async def get(
self,
*,
account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
- ) -> AsyncPaginator[PermissionGroupGetResponse, AsyncSinglePage[PermissionGroupGetResponse]]:
+ ) -> Optional[PermissionGroupGetResponse]:
"""
Find all available permission groups for Account Owned API Tokens
Args:
account_id: Account identifier tag.
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -197,13 +256,23 @@ 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_api_list(
+ return await self._get(
f"/accounts/{account_id}/tokens/permission_groups",
- page=AsyncSinglePage[PermissionGroupGetResponse],
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=await async_maybe_transform(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_get_params.PermissionGroupGetParams,
+ ),
+ post_parser=ResultWrapper[Optional[PermissionGroupGetResponse]]._unwrapper,
),
- model=PermissionGroupGetResponse,
+ cast_to=cast(Type[Optional[PermissionGroupGetResponse]], ResultWrapper[PermissionGroupGetResponse]),
)
diff --git a/src/cloudflare/resources/accounts/tokens/tokens.py b/src/cloudflare/resources/accounts/tokens/tokens.py
index 4f50160a6df..d2f34383499 100644
--- a/src/cloudflare/resources/accounts/tokens/tokens.py
+++ b/src/cloudflare/resources/accounts/tokens/tokens.py
@@ -145,10 +145,10 @@ def update(
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
- status: Literal["active", "disabled", "expired"],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: Literal["active", "disabled", "expired"] | 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,
@@ -168,13 +168,13 @@ def update(
policies: List of access policies assigned to the token.
- status: Status of the token.
-
expires_on: The expiration time on or after which the JWT MUST NOT be accepted for
processing.
not_before: The time before which the token MUST NOT be accepted for processing.
+ status: Status of the token.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -193,10 +193,10 @@ def update(
{
"name": name,
"policies": policies,
- "status": status,
"condition": condition,
"expires_on": expires_on,
"not_before": not_before,
+ "status": status,
},
token_update_params.TokenUpdateParams,
),
@@ -492,10 +492,10 @@ async def update(
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
- status: Literal["active", "disabled", "expired"],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: Literal["active", "disabled", "expired"] | 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,
@@ -515,13 +515,13 @@ async def update(
policies: List of access policies assigned to the token.
- status: Status of the token.
-
expires_on: The expiration time on or after which the JWT MUST NOT be accepted for
processing.
not_before: The time before which the token MUST NOT be accepted for processing.
+ status: Status of the token.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -540,10 +540,10 @@ async def update(
{
"name": name,
"policies": policies,
- "status": status,
"condition": condition,
"expires_on": expires_on,
"not_before": not_before,
+ "status": status,
},
token_update_params.TokenUpdateParams,
),
diff --git a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
index c93b5901764..3a0eb8e44c0 100644
--- a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
+++ b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py
@@ -147,8 +147,8 @@ def edit(
account_id: str,
prefix_id: str,
asn_prepend_count: int | NotGiven = NOT_GIVEN,
+ auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN,
on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN,
- withdraw_if_no_route: bool | 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,
@@ -169,9 +169,10 @@ def edit(
asn_prepend_count: Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute
- withdraw_if_no_route: Controls whether the BGP prefix is automatically withdrawn when prefix is
- withdrawn from Magic routing table (for Magic Transit customers using Direct
- CNI)
+ auto_advertise_withdraw: Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no
+ matching BGP prefix in the Magic routing table. When true, Cloudflare will
+ automatically withdraw the BGP prefix when there are no matching BGP routes, and
+ will resume advertising when there is at least one matching BGP route.
extra_headers: Send extra headers
@@ -192,8 +193,8 @@ def edit(
body=maybe_transform(
{
"asn_prepend_count": asn_prepend_count,
+ "auto_advertise_withdraw": auto_advertise_withdraw,
"on_demand": on_demand,
- "withdraw_if_no_route": withdraw_if_no_route,
},
bgp_prefix_edit_params.BGPPrefixEditParams,
),
@@ -379,8 +380,8 @@ async def edit(
account_id: str,
prefix_id: str,
asn_prepend_count: int | NotGiven = NOT_GIVEN,
+ auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN,
on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN,
- withdraw_if_no_route: bool | 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,
@@ -401,9 +402,10 @@ async def edit(
asn_prepend_count: Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute
- withdraw_if_no_route: Controls whether the BGP prefix is automatically withdrawn when prefix is
- withdrawn from Magic routing table (for Magic Transit customers using Direct
- CNI)
+ auto_advertise_withdraw: Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no
+ matching BGP prefix in the Magic routing table. When true, Cloudflare will
+ automatically withdraw the BGP prefix when there are no matching BGP routes, and
+ will resume advertising when there is at least one matching BGP route.
extra_headers: Send extra headers
@@ -424,8 +426,8 @@ async def edit(
body=await async_maybe_transform(
{
"asn_prepend_count": asn_prepend_count,
+ "auto_advertise_withdraw": auto_advertise_withdraw,
"on_demand": on_demand,
- "withdraw_if_no_route": withdraw_if_no_route,
},
bgp_prefix_edit_params.BGPPrefixEditParams,
),
diff --git a/src/cloudflare/resources/ai/finetunes/assets.py b/src/cloudflare/resources/ai/finetunes/assets.py
index f1da603332b..18937f9a7e9 100644
--- a/src/cloudflare/resources/ai/finetunes/assets.py
+++ b/src/cloudflare/resources/ai/finetunes/assets.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Mapping, cast
+from typing import Mapping, cast
import httpx
@@ -16,7 +16,6 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
from ....types.ai.finetunes import asset_create_params
from ....types.ai.finetunes.asset_create_response import AssetCreateResponse
@@ -90,13 +89,9 @@ def create(
body=maybe_transform(body, asset_create_params.AssetCreateParams),
files=files,
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[AssetCreateResponse]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[AssetCreateResponse], ResultWrapper[AssetCreateResponse]),
+ cast_to=AssetCreateResponse,
)
@@ -166,13 +161,9 @@ async def create(
body=await async_maybe_transform(body, asset_create_params.AssetCreateParams),
files=files,
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[AssetCreateResponse]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[AssetCreateResponse], ResultWrapper[AssetCreateResponse]),
+ cast_to=AssetCreateResponse,
)
diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
index 39718458f87..6cd68186485 100644
--- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Type, Optional, cast
from typing_extensions import Literal
@@ -52,6 +53,9 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon
"""
return SchemaValidationResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def update(
self,
operation_id: str,
@@ -105,6 +109,9 @@ def update(
cast_to=SchemaValidationUpdateResponse,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def edit(
self,
*,
@@ -146,6 +153,9 @@ def edit(
cast_to=cast(Type[SettingsMultipleRequest], ResultWrapper[SettingsMultipleRequest]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def get(
self,
operation_id: str,
@@ -207,6 +217,9 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR
"""
return AsyncSchemaValidationResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def update(
self,
operation_id: str,
@@ -260,6 +273,9 @@ async def update(
cast_to=SchemaValidationUpdateResponse,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def edit(
self,
*,
@@ -303,6 +319,9 @@ async def edit(
cast_to=cast(Type[SettingsMultipleRequest], ResultWrapper[SettingsMultipleRequest]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def get(
self,
operation_id: str,
@@ -348,14 +367,20 @@ class SchemaValidationResourceWithRawResponse:
def __init__(self, schema_validation: SchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = to_raw_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_raw_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_raw_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -363,14 +388,20 @@ class AsyncSchemaValidationResourceWithRawResponse:
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = async_to_raw_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = async_to_raw_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = async_to_raw_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -378,14 +409,20 @@ class SchemaValidationResourceWithStreamingResponse:
def __init__(self, schema_validation: SchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = to_streamed_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_streamed_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_streamed_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -393,12 +430,18 @@ class AsyncSchemaValidationResourceWithStreamingResponse:
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = async_to_streamed_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = async_to_streamed_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = async_to_streamed_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
index 37610d80629..cb8a1d877f0 100644
--- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Optional
from typing_extensions import Literal
@@ -44,6 +45,9 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon
"""
return SchemaValidationResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def update(
self,
*,
@@ -106,6 +110,9 @@ def update(
cast_to=Settings,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def edit(
self,
*,
@@ -169,6 +176,9 @@ def edit(
cast_to=Settings,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def get(
self,
*,
@@ -225,6 +235,9 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR
"""
return AsyncSchemaValidationResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def update(
self,
*,
@@ -287,6 +300,9 @@ async def update(
cast_to=Settings,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def edit(
self,
*,
@@ -350,6 +366,9 @@ async def edit(
cast_to=Settings,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def get(
self,
*,
@@ -390,14 +409,20 @@ class SchemaValidationResourceWithRawResponse:
def __init__(self, schema_validation: SchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = to_raw_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_raw_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_raw_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -405,14 +430,20 @@ class AsyncSchemaValidationResourceWithRawResponse:
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = async_to_raw_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = async_to_raw_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = async_to_raw_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -420,14 +451,20 @@ class SchemaValidationResourceWithStreamingResponse:
def __init__(self, schema_validation: SchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = to_streamed_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_streamed_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_streamed_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -435,12 +472,18 @@ class AsyncSchemaValidationResourceWithStreamingResponse:
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
self._schema_validation = schema_validation
- self.update = async_to_streamed_response_wrapper(
- schema_validation.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.update # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = async_to_streamed_response_wrapper(
- schema_validation.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = async_to_streamed_response_wrapper(
- schema_validation.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ schema_validation.get # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
index eba45a77d93..7c30d79edfe 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+import typing_extensions
+
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
@@ -42,6 +44,9 @@ def with_streaming_response(self) -> HostsResourceWithStreamingResponse:
"""
return HostsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
*,
@@ -115,6 +120,9 @@ def with_streaming_response(self) -> AsyncHostsResourceWithStreamingResponse:
"""
return AsyncHostsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
*,
@@ -172,8 +180,10 @@ class HostsResourceWithRawResponse:
def __init__(self, hosts: HostsResource) -> None:
self._hosts = hosts
- self.list = to_raw_response_wrapper(
- hosts.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ hosts.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -181,8 +191,10 @@ class AsyncHostsResourceWithRawResponse:
def __init__(self, hosts: AsyncHostsResource) -> None:
self._hosts = hosts
- self.list = async_to_raw_response_wrapper(
- hosts.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ hosts.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -190,8 +202,10 @@ class HostsResourceWithStreamingResponse:
def __init__(self, hosts: HostsResource) -> None:
self._hosts = hosts
- self.list = to_streamed_response_wrapper(
- hosts.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ hosts.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -199,6 +213,8 @@ class AsyncHostsResourceWithStreamingResponse:
def __init__(self, hosts: AsyncHostsResource) -> None:
self._hosts = hosts
- self.list = async_to_streamed_response_wrapper(
- hosts.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ hosts.list # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
index a75cd28dbfb..20e77b84e56 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Any, List, cast
from typing_extensions import Literal
@@ -45,6 +46,9 @@ def with_streaming_response(self) -> OperationsResourceWithStreamingResponse:
"""
return OperationsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
schema_id: str,
@@ -148,6 +152,9 @@ def with_streaming_response(self) -> AsyncOperationsResourceWithStreamingRespons
"""
return AsyncOperationsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
schema_id: str,
@@ -235,8 +242,10 @@ class OperationsResourceWithRawResponse:
def __init__(self, operations: OperationsResource) -> None:
self._operations = operations
- self.list = to_raw_response_wrapper(
- operations.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ operations.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -244,8 +253,10 @@ class AsyncOperationsResourceWithRawResponse:
def __init__(self, operations: AsyncOperationsResource) -> None:
self._operations = operations
- self.list = async_to_raw_response_wrapper(
- operations.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ operations.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -253,8 +264,10 @@ class OperationsResourceWithStreamingResponse:
def __init__(self, operations: OperationsResource) -> None:
self._operations = operations
- self.list = to_streamed_response_wrapper(
- operations.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ operations.list # pyright: ignore[reportDeprecated],
+ )
)
@@ -262,6 +275,8 @@ class AsyncOperationsResourceWithStreamingResponse:
def __init__(self, operations: AsyncOperationsResource) -> None:
self._operations = operations
- self.list = async_to_streamed_response_wrapper(
- operations.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ operations.list # pyright: ignore[reportDeprecated],
+ )
)
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 3c2921267ff..7fe1f96a09b 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Type, Mapping, cast
from typing_extensions import Literal
@@ -77,6 +78,9 @@ def with_streaming_response(self) -> UserSchemasResourceWithStreamingResponse:
"""
return UserSchemasResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def create(
self,
*,
@@ -143,6 +147,9 @@ def create(
cast_to=cast(Type[SchemaUpload], ResultWrapper[SchemaUpload]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
*,
@@ -203,6 +210,9 @@ def list(
model=PublicSchema,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def delete(
self,
schema_id: str,
@@ -241,6 +251,9 @@ def delete(
cast_to=UserSchemaDeleteResponse,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def edit(
self,
schema_id: str,
@@ -289,6 +302,9 @@ def edit(
cast_to=cast(Type[PublicSchema], ResultWrapper[PublicSchema]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def get(
self,
schema_id: str,
@@ -364,6 +380,9 @@ def with_streaming_response(self) -> AsyncUserSchemasResourceWithStreamingRespon
"""
return AsyncUserSchemasResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def create(
self,
*,
@@ -430,6 +449,9 @@ async def create(
cast_to=cast(Type[SchemaUpload], ResultWrapper[SchemaUpload]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
def list(
self,
*,
@@ -490,6 +512,9 @@ def list(
model=PublicSchema,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def delete(
self,
schema_id: str,
@@ -528,6 +553,9 @@ async def delete(
cast_to=UserSchemaDeleteResponse,
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def edit(
self,
schema_id: str,
@@ -576,6 +604,9 @@ async def edit(
cast_to=cast(Type[PublicSchema], ResultWrapper[PublicSchema]),
)
+ @typing_extensions.deprecated(
+ "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead."
+ )
async def get(
self,
schema_id: str,
@@ -629,20 +660,30 @@ class UserSchemasResourceWithRawResponse:
def __init__(self, user_schemas: UserSchemasResource) -> None:
self._user_schemas = user_schemas
- self.create = to_raw_response_wrapper(
- user_schemas.create,
+ self.create = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ user_schemas.create # pyright: ignore[reportDeprecated],
+ )
)
- self.list = to_raw_response_wrapper(
- user_schemas.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ user_schemas.list # pyright: ignore[reportDeprecated],
+ )
)
- self.delete = to_raw_response_wrapper(
- user_schemas.delete,
+ self.delete = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ user_schemas.delete # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_raw_response_wrapper(
- user_schemas.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ user_schemas.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_raw_response_wrapper(
- user_schemas.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ user_schemas.get # pyright: ignore[reportDeprecated],
+ )
)
@cached_property
@@ -658,20 +699,30 @@ class AsyncUserSchemasResourceWithRawResponse:
def __init__(self, user_schemas: AsyncUserSchemasResource) -> None:
self._user_schemas = user_schemas
- self.create = async_to_raw_response_wrapper(
- user_schemas.create,
+ self.create = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ user_schemas.create # pyright: ignore[reportDeprecated],
+ )
)
- self.list = async_to_raw_response_wrapper(
- user_schemas.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ user_schemas.list # pyright: ignore[reportDeprecated],
+ )
)
- self.delete = async_to_raw_response_wrapper(
- user_schemas.delete,
+ self.delete = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ user_schemas.delete # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = async_to_raw_response_wrapper(
- user_schemas.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ user_schemas.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = async_to_raw_response_wrapper(
- user_schemas.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ user_schemas.get # pyright: ignore[reportDeprecated],
+ )
)
@cached_property
@@ -687,20 +738,30 @@ class UserSchemasResourceWithStreamingResponse:
def __init__(self, user_schemas: UserSchemasResource) -> None:
self._user_schemas = user_schemas
- self.create = to_streamed_response_wrapper(
- user_schemas.create,
+ self.create = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ user_schemas.create # pyright: ignore[reportDeprecated],
+ )
)
- self.list = to_streamed_response_wrapper(
- user_schemas.list,
+ self.list = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ user_schemas.list # pyright: ignore[reportDeprecated],
+ )
)
- self.delete = to_streamed_response_wrapper(
- user_schemas.delete,
+ self.delete = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ user_schemas.delete # pyright: ignore[reportDeprecated],
+ )
)
- self.edit = to_streamed_response_wrapper(
- user_schemas.edit,
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ user_schemas.edit # pyright: ignore[reportDeprecated],
+ )
)
- self.get = to_streamed_response_wrapper(
- user_schemas.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ user_schemas.get # pyright: ignore[reportDeprecated],
+ )
)
@cached_property
@@ -716,20 +777,30 @@ class AsyncUserSchemasResourceWithStreamingResponse:
def __init__(self, user_schemas: AsyncUserSchemasResource) -> None:
self._user_schemas = user_schemas
- self.create = async_to_streamed_response_wrapper(
- user_schemas.create,
- )
- self.list = async_to_streamed_response_wrapper(
- user_schemas.list,
- )
- self.delete = async_to_streamed_response_wrapper(
- user_schemas.delete,
- )
- self.edit = async_to_streamed_response_wrapper(
- user_schemas.edit,
- )
- self.get = async_to_streamed_response_wrapper(
- user_schemas.get,
+ self.create = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ user_schemas.create # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.list = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ user_schemas.list # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.delete = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ user_schemas.delete # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.edit = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ user_schemas.edit # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ user_schemas.get # pyright: ignore[reportDeprecated],
+ )
)
@cached_property
diff --git a/src/cloudflare/resources/argo/smart_routing.py b/src/cloudflare/resources/argo/smart_routing.py
index 28c30e54c30..b30c361b30b 100644
--- a/src/cloudflare/resources/argo/smart_routing.py
+++ b/src/cloudflare/resources/argo/smart_routing.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, cast
+from typing import Type, Optional, cast
from typing_extensions import Literal
import httpx
@@ -20,8 +20,6 @@
from ..._wrappers import ResultWrapper
from ...types.argo import smart_routing_edit_params
from ..._base_client import make_request_options
-from ...types.argo.smart_routing_get_response import SmartRoutingGetResponse
-from ...types.argo.smart_routing_edit_response import SmartRoutingEditResponse
__all__ = ["SmartRoutingResource", "AsyncSmartRoutingResource"]
@@ -57,12 +55,12 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SmartRoutingEditResponse:
+ ) -> object:
"""
- Updates enablement of Argo Smart Routing.
+ Configures the value of the Argo Smart Routing enablement setting.
Args:
- zone_id: Identifier
+ zone_id: Specifies the zone associated with the API call.
value: Enables Argo Smart Routing.
@@ -76,22 +74,17 @@ def edit(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- SmartRoutingEditResponse,
- self._patch(
- f"/zones/{zone_id}/argo/smart_routing",
- body=maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[SmartRoutingEditResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._patch(
+ f"/zones/{zone_id}/argo/smart_routing",
+ body=maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
def get(
@@ -104,12 +97,12 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SmartRoutingGetResponse:
+ ) -> object:
"""
- Get Argo Smart Routing setting
+ Retrieves the value of Argo Smart Routing enablement setting.
Args:
- zone_id: Identifier
+ zone_id: Specifies the zone associated with the API call.
extra_headers: Send extra headers
@@ -121,21 +114,16 @@ def get(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- SmartRoutingGetResponse,
- self._get(
- f"/zones/{zone_id}/argo/smart_routing",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[SmartRoutingGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/zones/{zone_id}/argo/smart_routing",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
@@ -170,12 +158,12 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SmartRoutingEditResponse:
+ ) -> object:
"""
- Updates enablement of Argo Smart Routing.
+ Configures the value of the Argo Smart Routing enablement setting.
Args:
- zone_id: Identifier
+ zone_id: Specifies the zone associated with the API call.
value: Enables Argo Smart Routing.
@@ -189,22 +177,17 @@ async def edit(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- SmartRoutingEditResponse,
- await self._patch(
- f"/zones/{zone_id}/argo/smart_routing",
- body=await async_maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[SmartRoutingEditResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._patch(
+ f"/zones/{zone_id}/argo/smart_routing",
+ body=await async_maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
async def get(
@@ -217,12 +200,12 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SmartRoutingGetResponse:
+ ) -> object:
"""
- Get Argo Smart Routing setting
+ Retrieves the value of Argo Smart Routing enablement setting.
Args:
- zone_id: Identifier
+ zone_id: Specifies the zone associated with the API call.
extra_headers: Send extra headers
@@ -234,21 +217,16 @@ async def get(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- SmartRoutingGetResponse,
- await self._get(
- f"/zones/{zone_id}/argo/smart_routing",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[SmartRoutingGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/zones/{zone_id}/argo/smart_routing",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py
index f3a541ea1f7..540928b30e3 100644
--- a/src/cloudflare/resources/bot_management.py
+++ b/src/cloudflare/resources/bot_management.py
@@ -51,7 +51,7 @@ def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
@@ -128,7 +128,8 @@ def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -152,7 +153,7 @@ def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -232,7 +233,8 @@ def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -264,7 +266,7 @@ def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -345,7 +347,8 @@ def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -379,7 +382,7 @@ def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
@@ -457,7 +460,8 @@ def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as
they are released.
@@ -486,7 +490,7 @@ def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
@@ -609,7 +613,7 @@ async def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
@@ -686,7 +690,8 @@ async def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -710,7 +715,7 @@ async def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -790,7 +795,8 @@ async def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -822,7 +828,7 @@ async def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -903,7 +909,8 @@ async def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
@@ -937,7 +944,7 @@ async def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
@@ -1015,7 +1022,8 @@ async def update(
Args:
zone_id: Identifier.
- ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value
+ `only_on_ad_pages` is currently not available for Enterprise customers.
auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as
they are released.
@@ -1044,7 +1052,7 @@ async def update(
self,
*,
zone_id: str,
- ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/brand_protection/__init__.py b/src/cloudflare/resources/brand_protection/__init__.py
new file mode 100644
index 00000000000..1660f110c9b
--- /dev/null
+++ b/src/cloudflare/resources/brand_protection/__init__.py
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .logos import (
+ LogosResource,
+ AsyncLogosResource,
+ LogosResourceWithRawResponse,
+ AsyncLogosResourceWithRawResponse,
+ LogosResourceWithStreamingResponse,
+ AsyncLogosResourceWithStreamingResponse,
+)
+from .matches import (
+ MatchesResource,
+ AsyncMatchesResource,
+ MatchesResourceWithRawResponse,
+ AsyncMatchesResourceWithRawResponse,
+ MatchesResourceWithStreamingResponse,
+ AsyncMatchesResourceWithStreamingResponse,
+)
+from .queries import (
+ QueriesResource,
+ AsyncQueriesResource,
+ QueriesResourceWithRawResponse,
+ AsyncQueriesResourceWithRawResponse,
+ QueriesResourceWithStreamingResponse,
+ AsyncQueriesResourceWithStreamingResponse,
+)
+from .logo_matches import (
+ LogoMatchesResource,
+ AsyncLogoMatchesResource,
+ LogoMatchesResourceWithRawResponse,
+ AsyncLogoMatchesResourceWithRawResponse,
+ LogoMatchesResourceWithStreamingResponse,
+ AsyncLogoMatchesResourceWithStreamingResponse,
+)
+from .brand_protection import (
+ BrandProtectionResource,
+ AsyncBrandProtectionResource,
+ BrandProtectionResourceWithRawResponse,
+ AsyncBrandProtectionResourceWithRawResponse,
+ BrandProtectionResourceWithStreamingResponse,
+ AsyncBrandProtectionResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "QueriesResource",
+ "AsyncQueriesResource",
+ "QueriesResourceWithRawResponse",
+ "AsyncQueriesResourceWithRawResponse",
+ "QueriesResourceWithStreamingResponse",
+ "AsyncQueriesResourceWithStreamingResponse",
+ "MatchesResource",
+ "AsyncMatchesResource",
+ "MatchesResourceWithRawResponse",
+ "AsyncMatchesResourceWithRawResponse",
+ "MatchesResourceWithStreamingResponse",
+ "AsyncMatchesResourceWithStreamingResponse",
+ "LogosResource",
+ "AsyncLogosResource",
+ "LogosResourceWithRawResponse",
+ "AsyncLogosResourceWithRawResponse",
+ "LogosResourceWithStreamingResponse",
+ "AsyncLogosResourceWithStreamingResponse",
+ "LogoMatchesResource",
+ "AsyncLogoMatchesResource",
+ "LogoMatchesResourceWithRawResponse",
+ "AsyncLogoMatchesResourceWithRawResponse",
+ "LogoMatchesResourceWithStreamingResponse",
+ "AsyncLogoMatchesResourceWithStreamingResponse",
+ "BrandProtectionResource",
+ "AsyncBrandProtectionResource",
+ "BrandProtectionResourceWithRawResponse",
+ "AsyncBrandProtectionResourceWithRawResponse",
+ "BrandProtectionResourceWithStreamingResponse",
+ "AsyncBrandProtectionResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection/brand_protection.py
similarity index 55%
rename from src/cloudflare/resources/brand_protection.py
rename to src/cloudflare/resources/brand_protection/brand_protection.py
index 659ee0c7e7c..d6662b3fbe0 100644
--- a/src/cloudflare/resources/brand_protection.py
+++ b/src/cloudflare/resources/brand_protection/brand_protection.py
@@ -2,30 +2,74 @@
from __future__ import annotations
-from typing import List, Type, Iterable, Optional, cast
-
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 (
+from .logos import (
+ LogosResource,
+ AsyncLogosResource,
+ LogosResourceWithRawResponse,
+ AsyncLogosResourceWithRawResponse,
+ LogosResourceWithStreamingResponse,
+ AsyncLogosResourceWithStreamingResponse,
+)
+from .matches import (
+ MatchesResource,
+ AsyncMatchesResource,
+ MatchesResourceWithRawResponse,
+ AsyncMatchesResourceWithRawResponse,
+ MatchesResourceWithStreamingResponse,
+ AsyncMatchesResourceWithStreamingResponse,
+)
+from .queries import (
+ QueriesResource,
+ AsyncQueriesResource,
+ QueriesResourceWithRawResponse,
+ AsyncQueriesResourceWithRawResponse,
+ QueriesResourceWithStreamingResponse,
+ AsyncQueriesResourceWithStreamingResponse,
+)
+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.brand_protection import brand_protection_submit_params, brand_protection_url_info_params
-from ..types.brand_protection.info import Info
-from ..types.brand_protection.submit import Submit
+from ...pagination import SyncSinglePage, AsyncSinglePage
+from .logo_matches import (
+ LogoMatchesResource,
+ AsyncLogoMatchesResource,
+ LogoMatchesResourceWithRawResponse,
+ AsyncLogoMatchesResourceWithRawResponse,
+ LogoMatchesResourceWithStreamingResponse,
+ AsyncLogoMatchesResourceWithStreamingResponse,
+)
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.brand_protection.brand_protection_submit_response import BrandProtectionSubmitResponse
+from ...types.brand_protection.brand_protection_url_info_response import BrandProtectionURLInfoResponse
__all__ = ["BrandProtectionResource", "AsyncBrandProtectionResource"]
class BrandProtectionResource(SyncAPIResource):
+ @cached_property
+ def queries(self) -> QueriesResource:
+ return QueriesResource(self._client)
+
+ @cached_property
+ def matches(self) -> MatchesResource:
+ return MatchesResource(self._client)
+
+ @cached_property
+ def logos(self) -> LogosResource:
+ return LogosResource(self._client)
+
+ @cached_property
+ def logo_matches(self) -> LogoMatchesResource:
+ return LogoMatchesResource(self._client)
+
@cached_property
def with_raw_response(self) -> BrandProtectionResourceWithRawResponse:
"""
@@ -49,22 +93,17 @@ def submit(
self,
*,
account_id: str,
- url: 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,
- ) -> Optional[Submit]:
+ ) -> BrandProtectionSubmitResponse:
"""
- Submit suspicious URL for scanning.
+ Return new URL submissions
Args:
- account_id: Identifier.
-
- url: URL(s) to filter submissions results by.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -77,40 +116,27 @@ def submit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._post(
f"/accounts/{account_id}/brand-protection/submit",
- body=maybe_transform({"url": url}, brand_protection_submit_params.BrandProtectionSubmitParams),
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[Submit]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]),
+ cast_to=BrandProtectionSubmitResponse,
)
def url_info(
self,
*,
account_id: str,
- url: List[str] | NotGiven = NOT_GIVEN,
- url_id: Iterable[int] | 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,
- ) -> Optional[Info]:
+ ) -> SyncSinglePage[BrandProtectionURLInfoResponse]:
"""
- Gets phishing details about a URL.
+ Return submitted URLs based on ID
Args:
- account_id: Identifier.
-
- url: Submission URL(s) to filter submission results by.
-
- url_id: Submission ID(s) to filter submission results by.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -121,27 +147,33 @@ def url_info(
"""
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}/brand-protection/url-info",
+ page=SyncSinglePage[BrandProtectionURLInfoResponse],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "url": url,
- "url_id": url_id,
- },
- brand_protection_url_info_params.BrandProtectionURLInfoParams,
- ),
- post_parser=ResultWrapper[Optional[Info]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]),
+ model=BrandProtectionURLInfoResponse,
)
class AsyncBrandProtectionResource(AsyncAPIResource):
+ @cached_property
+ def queries(self) -> AsyncQueriesResource:
+ return AsyncQueriesResource(self._client)
+
+ @cached_property
+ def matches(self) -> AsyncMatchesResource:
+ return AsyncMatchesResource(self._client)
+
+ @cached_property
+ def logos(self) -> AsyncLogosResource:
+ return AsyncLogosResource(self._client)
+
+ @cached_property
+ def logo_matches(self) -> AsyncLogoMatchesResource:
+ return AsyncLogoMatchesResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncBrandProtectionResourceWithRawResponse:
"""
@@ -165,22 +197,17 @@ async def submit(
self,
*,
account_id: str,
- url: 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,
- ) -> Optional[Submit]:
+ ) -> BrandProtectionSubmitResponse:
"""
- Submit suspicious URL for scanning.
+ Return new URL submissions
Args:
- account_id: Identifier.
-
- url: URL(s) to filter submissions results by.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -193,40 +220,27 @@ async def submit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._post(
f"/accounts/{account_id}/brand-protection/submit",
- body=await async_maybe_transform({"url": url}, brand_protection_submit_params.BrandProtectionSubmitParams),
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[Submit]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]),
+ cast_to=BrandProtectionSubmitResponse,
)
- async def url_info(
+ def url_info(
self,
*,
account_id: str,
- url: List[str] | NotGiven = NOT_GIVEN,
- url_id: Iterable[int] | 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,
- ) -> Optional[Info]:
+ ) -> AsyncPaginator[BrandProtectionURLInfoResponse, AsyncSinglePage[BrandProtectionURLInfoResponse]]:
"""
- Gets phishing details about a URL.
+ Return submitted URLs based on ID
Args:
- account_id: Identifier.
-
- url: Submission URL(s) to filter submission results by.
-
- url_id: Submission ID(s) to filter submission results by.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -237,23 +251,13 @@ async def url_info(
"""
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}/brand-protection/url-info",
+ page=AsyncSinglePage[BrandProtectionURLInfoResponse],
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=await async_maybe_transform(
- {
- "url": url,
- "url_id": url_id,
- },
- brand_protection_url_info_params.BrandProtectionURLInfoParams,
- ),
- post_parser=ResultWrapper[Optional[Info]]._unwrapper,
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]),
+ model=BrandProtectionURLInfoResponse,
)
@@ -268,6 +272,22 @@ def __init__(self, brand_protection: BrandProtectionResource) -> None:
brand_protection.url_info,
)
+ @cached_property
+ def queries(self) -> QueriesResourceWithRawResponse:
+ return QueriesResourceWithRawResponse(self._brand_protection.queries)
+
+ @cached_property
+ def matches(self) -> MatchesResourceWithRawResponse:
+ return MatchesResourceWithRawResponse(self._brand_protection.matches)
+
+ @cached_property
+ def logos(self) -> LogosResourceWithRawResponse:
+ return LogosResourceWithRawResponse(self._brand_protection.logos)
+
+ @cached_property
+ def logo_matches(self) -> LogoMatchesResourceWithRawResponse:
+ return LogoMatchesResourceWithRawResponse(self._brand_protection.logo_matches)
+
class AsyncBrandProtectionResourceWithRawResponse:
def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None:
@@ -280,6 +300,22 @@ def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None:
brand_protection.url_info,
)
+ @cached_property
+ def queries(self) -> AsyncQueriesResourceWithRawResponse:
+ return AsyncQueriesResourceWithRawResponse(self._brand_protection.queries)
+
+ @cached_property
+ def matches(self) -> AsyncMatchesResourceWithRawResponse:
+ return AsyncMatchesResourceWithRawResponse(self._brand_protection.matches)
+
+ @cached_property
+ def logos(self) -> AsyncLogosResourceWithRawResponse:
+ return AsyncLogosResourceWithRawResponse(self._brand_protection.logos)
+
+ @cached_property
+ def logo_matches(self) -> AsyncLogoMatchesResourceWithRawResponse:
+ return AsyncLogoMatchesResourceWithRawResponse(self._brand_protection.logo_matches)
+
class BrandProtectionResourceWithStreamingResponse:
def __init__(self, brand_protection: BrandProtectionResource) -> None:
@@ -292,6 +328,22 @@ def __init__(self, brand_protection: BrandProtectionResource) -> None:
brand_protection.url_info,
)
+ @cached_property
+ def queries(self) -> QueriesResourceWithStreamingResponse:
+ return QueriesResourceWithStreamingResponse(self._brand_protection.queries)
+
+ @cached_property
+ def matches(self) -> MatchesResourceWithStreamingResponse:
+ return MatchesResourceWithStreamingResponse(self._brand_protection.matches)
+
+ @cached_property
+ def logos(self) -> LogosResourceWithStreamingResponse:
+ return LogosResourceWithStreamingResponse(self._brand_protection.logos)
+
+ @cached_property
+ def logo_matches(self) -> LogoMatchesResourceWithStreamingResponse:
+ return LogoMatchesResourceWithStreamingResponse(self._brand_protection.logo_matches)
+
class AsyncBrandProtectionResourceWithStreamingResponse:
def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None:
@@ -303,3 +355,19 @@ def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None:
self.url_info = async_to_streamed_response_wrapper(
brand_protection.url_info,
)
+
+ @cached_property
+ def queries(self) -> AsyncQueriesResourceWithStreamingResponse:
+ return AsyncQueriesResourceWithStreamingResponse(self._brand_protection.queries)
+
+ @cached_property
+ def matches(self) -> AsyncMatchesResourceWithStreamingResponse:
+ return AsyncMatchesResourceWithStreamingResponse(self._brand_protection.matches)
+
+ @cached_property
+ def logos(self) -> AsyncLogosResourceWithStreamingResponse:
+ return AsyncLogosResourceWithStreamingResponse(self._brand_protection.logos)
+
+ @cached_property
+ def logo_matches(self) -> AsyncLogoMatchesResourceWithStreamingResponse:
+ return AsyncLogoMatchesResourceWithStreamingResponse(self._brand_protection.logo_matches)
diff --git a/src/cloudflare/resources/brand_protection/logo_matches.py b/src/cloudflare/resources/brand_protection/logo_matches.py
new file mode 100644
index 00000000000..06acaf78175
--- /dev/null
+++ b/src/cloudflare/resources/brand_protection/logo_matches.py
@@ -0,0 +1,302 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+
+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 ..._base_client import make_request_options
+from ...types.brand_protection import logo_match_get_params, logo_match_download_params
+from ...types.brand_protection.logo_match_get_response import LogoMatchGetResponse
+from ...types.brand_protection.logo_match_download_response import LogoMatchDownloadResponse
+
+__all__ = ["LogoMatchesResource", "AsyncLogoMatchesResource"]
+
+
+class LogoMatchesResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> LogoMatchesResourceWithRawResponse:
+ """
+ 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 LogoMatchesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> LogoMatchesResourceWithStreamingResponse:
+ """
+ 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 LogoMatchesResourceWithStreamingResponse(self)
+
+ def download(
+ self,
+ *,
+ account_id: str,
+ limit: str | NotGiven = NOT_GIVEN,
+ logo_id: List[str] | NotGiven = NOT_GIVEN,
+ offset: 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,
+ ) -> LogoMatchDownloadResponse:
+ """
+ Return matches as CSV for logo queries based on ID
+
+ Args:
+ 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(
+ f"/accounts/{account_id}/brand-protection/logo-matches/download",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "logo_id": logo_id,
+ "offset": offset,
+ },
+ logo_match_download_params.LogoMatchDownloadParams,
+ ),
+ ),
+ cast_to=LogoMatchDownloadResponse,
+ )
+
+ def get(
+ self,
+ *,
+ account_id: str,
+ limit: str | NotGiven = NOT_GIVEN,
+ logo_id: List[str] | NotGiven = NOT_GIVEN,
+ offset: 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,
+ ) -> LogoMatchGetResponse:
+ """
+ Return matches for logo queries based on ID
+
+ Args:
+ 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(
+ f"/accounts/{account_id}/brand-protection/logo-matches",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "logo_id": logo_id,
+ "offset": offset,
+ },
+ logo_match_get_params.LogoMatchGetParams,
+ ),
+ ),
+ cast_to=LogoMatchGetResponse,
+ )
+
+
+class AsyncLogoMatchesResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncLogoMatchesResourceWithRawResponse:
+ """
+ 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 AsyncLogoMatchesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncLogoMatchesResourceWithStreamingResponse:
+ """
+ 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 AsyncLogoMatchesResourceWithStreamingResponse(self)
+
+ async def download(
+ self,
+ *,
+ account_id: str,
+ limit: str | NotGiven = NOT_GIVEN,
+ logo_id: List[str] | NotGiven = NOT_GIVEN,
+ offset: 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,
+ ) -> LogoMatchDownloadResponse:
+ """
+ Return matches as CSV for logo queries based on ID
+
+ Args:
+ 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 await self._get(
+ f"/accounts/{account_id}/brand-protection/logo-matches/download",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "limit": limit,
+ "logo_id": logo_id,
+ "offset": offset,
+ },
+ logo_match_download_params.LogoMatchDownloadParams,
+ ),
+ ),
+ cast_to=LogoMatchDownloadResponse,
+ )
+
+ async def get(
+ self,
+ *,
+ account_id: str,
+ limit: str | NotGiven = NOT_GIVEN,
+ logo_id: List[str] | NotGiven = NOT_GIVEN,
+ offset: 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,
+ ) -> LogoMatchGetResponse:
+ """
+ Return matches for logo queries based on ID
+
+ Args:
+ 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 await self._get(
+ f"/accounts/{account_id}/brand-protection/logo-matches",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "limit": limit,
+ "logo_id": logo_id,
+ "offset": offset,
+ },
+ logo_match_get_params.LogoMatchGetParams,
+ ),
+ ),
+ cast_to=LogoMatchGetResponse,
+ )
+
+
+class LogoMatchesResourceWithRawResponse:
+ def __init__(self, logo_matches: LogoMatchesResource) -> None:
+ self._logo_matches = logo_matches
+
+ self.download = to_raw_response_wrapper(
+ logo_matches.download,
+ )
+ self.get = to_raw_response_wrapper(
+ logo_matches.get,
+ )
+
+
+class AsyncLogoMatchesResourceWithRawResponse:
+ def __init__(self, logo_matches: AsyncLogoMatchesResource) -> None:
+ self._logo_matches = logo_matches
+
+ self.download = async_to_raw_response_wrapper(
+ logo_matches.download,
+ )
+ self.get = async_to_raw_response_wrapper(
+ logo_matches.get,
+ )
+
+
+class LogoMatchesResourceWithStreamingResponse:
+ def __init__(self, logo_matches: LogoMatchesResource) -> None:
+ self._logo_matches = logo_matches
+
+ self.download = to_streamed_response_wrapper(
+ logo_matches.download,
+ )
+ self.get = to_streamed_response_wrapper(
+ logo_matches.get,
+ )
+
+
+class AsyncLogoMatchesResourceWithStreamingResponse:
+ def __init__(self, logo_matches: AsyncLogoMatchesResource) -> None:
+ self._logo_matches = logo_matches
+
+ self.download = async_to_streamed_response_wrapper(
+ logo_matches.download,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ logo_matches.get,
+ )
diff --git a/src/cloudflare/resources/brand_protection/logos.py b/src/cloudflare/resources/brand_protection/logos.py
new file mode 100644
index 00000000000..501c867f185
--- /dev/null
+++ b/src/cloudflare/resources/brand_protection/logos.py
@@ -0,0 +1,283 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
+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 ..._base_client import make_request_options
+from ...types.brand_protection import logo_create_params
+from ...types.brand_protection.logo_create_response import LogoCreateResponse
+
+__all__ = ["LogosResource", "AsyncLogosResource"]
+
+
+class LogosResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> LogosResourceWithRawResponse:
+ """
+ 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 LogosResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> LogosResourceWithStreamingResponse:
+ """
+ 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 LogosResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ match_type: str | NotGiven = NOT_GIVEN,
+ tag: str | NotGiven = NOT_GIVEN,
+ threshold: float | NotGiven = NOT_GIVEN,
+ image: FileTypes | 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,
+ ) -> LogoCreateResponse:
+ """
+ Return new saved logo queries created from image files
+
+ Args:
+ 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._post(
+ f"/accounts/{account_id}/brand-protection/logos",
+ body=maybe_transform({"image": image}, logo_create_params.LogoCreateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "match_type": match_type,
+ "tag": tag,
+ "threshold": threshold,
+ },
+ logo_create_params.LogoCreateParams,
+ ),
+ ),
+ cast_to=LogoCreateResponse,
+ )
+
+ def delete(
+ self,
+ logo_id: str,
+ *,
+ 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,
+ ) -> None:
+ """
+ Return a success message after deleting saved logo queries by ID
+
+ Args:
+ 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 logo_id:
+ raise ValueError(f"Expected a non-empty value for `logo_id` but received {logo_id!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ f"/accounts/{account_id}/brand-protection/logos/{logo_id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncLogosResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncLogosResourceWithRawResponse:
+ """
+ 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 AsyncLogosResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncLogosResourceWithStreamingResponse:
+ """
+ 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 AsyncLogosResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ match_type: str | NotGiven = NOT_GIVEN,
+ tag: str | NotGiven = NOT_GIVEN,
+ threshold: float | NotGiven = NOT_GIVEN,
+ image: FileTypes | 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,
+ ) -> LogoCreateResponse:
+ """
+ Return new saved logo queries created from image files
+
+ Args:
+ 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 await self._post(
+ f"/accounts/{account_id}/brand-protection/logos",
+ body=await async_maybe_transform({"image": image}, logo_create_params.LogoCreateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "match_type": match_type,
+ "tag": tag,
+ "threshold": threshold,
+ },
+ logo_create_params.LogoCreateParams,
+ ),
+ ),
+ cast_to=LogoCreateResponse,
+ )
+
+ async def delete(
+ self,
+ logo_id: str,
+ *,
+ 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,
+ ) -> None:
+ """
+ Return a success message after deleting saved logo queries by ID
+
+ Args:
+ 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 logo_id:
+ raise ValueError(f"Expected a non-empty value for `logo_id` but received {logo_id!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ f"/accounts/{account_id}/brand-protection/logos/{logo_id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class LogosResourceWithRawResponse:
+ def __init__(self, logos: LogosResource) -> None:
+ self._logos = logos
+
+ self.create = to_raw_response_wrapper(
+ logos.create,
+ )
+ self.delete = to_raw_response_wrapper(
+ logos.delete,
+ )
+
+
+class AsyncLogosResourceWithRawResponse:
+ def __init__(self, logos: AsyncLogosResource) -> None:
+ self._logos = logos
+
+ self.create = async_to_raw_response_wrapper(
+ logos.create,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ logos.delete,
+ )
+
+
+class LogosResourceWithStreamingResponse:
+ def __init__(self, logos: LogosResource) -> None:
+ self._logos = logos
+
+ self.create = to_streamed_response_wrapper(
+ logos.create,
+ )
+ self.delete = to_streamed_response_wrapper(
+ logos.delete,
+ )
+
+
+class AsyncLogosResourceWithStreamingResponse:
+ def __init__(self, logos: AsyncLogosResource) -> None:
+ self._logos = logos
+
+ self.create = async_to_streamed_response_wrapper(
+ logos.create,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ logos.delete,
+ )
diff --git a/src/cloudflare/resources/brand_protection/matches.py b/src/cloudflare/resources/brand_protection/matches.py
new file mode 100644
index 00000000000..2161d09e260
--- /dev/null
+++ b/src/cloudflare/resources/brand_protection/matches.py
@@ -0,0 +1,308 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+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 ..._base_client import make_request_options
+from ...types.brand_protection import match_get_params, match_download_params
+from ...types.brand_protection.match_get_response import MatchGetResponse
+from ...types.brand_protection.match_download_response import MatchDownloadResponse
+
+__all__ = ["MatchesResource", "AsyncMatchesResource"]
+
+
+class MatchesResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> MatchesResourceWithRawResponse:
+ """
+ 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 MatchesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> MatchesResourceWithStreamingResponse:
+ """
+ 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 MatchesResourceWithStreamingResponse(self)
+
+ def download(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ include_domain_id: bool | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> MatchDownloadResponse:
+ """
+ Return matches as CSV for string queries based on ID
+
+ Args:
+ 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(
+ f"/accounts/{account_id}/brand-protection/matches/download",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "id": id,
+ "include_domain_id": include_domain_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ match_download_params.MatchDownloadParams,
+ ),
+ ),
+ cast_to=MatchDownloadResponse,
+ )
+
+ def get(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ include_domain_id: bool | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> MatchGetResponse:
+ """
+ Return matches for string queries based on ID
+
+ Args:
+ 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(
+ f"/accounts/{account_id}/brand-protection/matches",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "id": id,
+ "include_domain_id": include_domain_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ match_get_params.MatchGetParams,
+ ),
+ ),
+ cast_to=MatchGetResponse,
+ )
+
+
+class AsyncMatchesResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncMatchesResourceWithRawResponse:
+ """
+ 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 AsyncMatchesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncMatchesResourceWithStreamingResponse:
+ """
+ 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 AsyncMatchesResourceWithStreamingResponse(self)
+
+ async def download(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ include_domain_id: bool | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> MatchDownloadResponse:
+ """
+ Return matches as CSV for string queries based on ID
+
+ Args:
+ 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 await self._get(
+ f"/accounts/{account_id}/brand-protection/matches/download",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "id": id,
+ "include_domain_id": include_domain_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ match_download_params.MatchDownloadParams,
+ ),
+ ),
+ cast_to=MatchDownloadResponse,
+ )
+
+ async def get(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ include_domain_id: bool | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> MatchGetResponse:
+ """
+ Return matches for string queries based on ID
+
+ Args:
+ 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 await self._get(
+ f"/accounts/{account_id}/brand-protection/matches",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "id": id,
+ "include_domain_id": include_domain_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ match_get_params.MatchGetParams,
+ ),
+ ),
+ cast_to=MatchGetResponse,
+ )
+
+
+class MatchesResourceWithRawResponse:
+ def __init__(self, matches: MatchesResource) -> None:
+ self._matches = matches
+
+ self.download = to_raw_response_wrapper(
+ matches.download,
+ )
+ self.get = to_raw_response_wrapper(
+ matches.get,
+ )
+
+
+class AsyncMatchesResourceWithRawResponse:
+ def __init__(self, matches: AsyncMatchesResource) -> None:
+ self._matches = matches
+
+ self.download = async_to_raw_response_wrapper(
+ matches.download,
+ )
+ self.get = async_to_raw_response_wrapper(
+ matches.get,
+ )
+
+
+class MatchesResourceWithStreamingResponse:
+ def __init__(self, matches: MatchesResource) -> None:
+ self._matches = matches
+
+ self.download = to_streamed_response_wrapper(
+ matches.download,
+ )
+ self.get = to_streamed_response_wrapper(
+ matches.get,
+ )
+
+
+class AsyncMatchesResourceWithStreamingResponse:
+ def __init__(self, matches: AsyncMatchesResource) -> None:
+ self._matches = matches
+
+ self.download = async_to_streamed_response_wrapper(
+ matches.download,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ matches.get,
+ )
diff --git a/src/cloudflare/resources/brand_protection/queries.py b/src/cloudflare/resources/brand_protection/queries.py
new file mode 100644
index 00000000000..185534191d0
--- /dev/null
+++ b/src/cloudflare/resources/brand_protection/queries.py
@@ -0,0 +1,335 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import datetime
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, 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 ..._base_client import make_request_options
+from ...types.brand_protection import query_create_params, query_delete_params
+
+__all__ = ["QueriesResource", "AsyncQueriesResource"]
+
+
+class QueriesResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> QueriesResourceWithRawResponse:
+ """
+ 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 QueriesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> QueriesResourceWithStreamingResponse:
+ """
+ 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 QueriesResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ query_scan: bool | NotGiven = NOT_GIVEN,
+ query_tag: str | NotGiven = NOT_GIVEN,
+ max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
+ min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
+ body_scan: bool | NotGiven = NOT_GIVEN,
+ string_matches: object | NotGiven = NOT_GIVEN,
+ body_tag: 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,
+ ) -> None:
+ """
+ Return a success message after creating new saved string queries
+
+ Args:
+ 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}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._post(
+ f"/accounts/{account_id}/brand-protection/queries",
+ body=maybe_transform(
+ {
+ "max_time": max_time,
+ "min_time": min_time,
+ "body_scan": body_scan,
+ "string_matches": string_matches,
+ "body_tag": body_tag,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "id": id,
+ "query_scan": query_scan,
+ "query_tag": query_tag,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ ),
+ cast_to=NoneType,
+ )
+
+ def delete(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ scan: bool | NotGiven = NOT_GIVEN,
+ tag: 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,
+ ) -> None:
+ """
+ Return a success message after deleting saved string queries by ID
+
+ Args:
+ 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}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ f"/accounts/{account_id}/brand-protection/queries",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "id": id,
+ "scan": scan,
+ "tag": tag,
+ },
+ query_delete_params.QueryDeleteParams,
+ ),
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncQueriesResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncQueriesResourceWithRawResponse:
+ """
+ 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 AsyncQueriesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncQueriesResourceWithStreamingResponse:
+ """
+ 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 AsyncQueriesResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ query_scan: bool | NotGiven = NOT_GIVEN,
+ query_tag: str | NotGiven = NOT_GIVEN,
+ max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
+ min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
+ body_scan: bool | NotGiven = NOT_GIVEN,
+ string_matches: object | NotGiven = NOT_GIVEN,
+ body_tag: 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,
+ ) -> None:
+ """
+ Return a success message after creating new saved string queries
+
+ Args:
+ 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}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._post(
+ f"/accounts/{account_id}/brand-protection/queries",
+ body=await async_maybe_transform(
+ {
+ "max_time": max_time,
+ "min_time": min_time,
+ "body_scan": body_scan,
+ "string_matches": string_matches,
+ "body_tag": body_tag,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "id": id,
+ "query_scan": query_scan,
+ "query_tag": query_tag,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ ),
+ cast_to=NoneType,
+ )
+
+ async def delete(
+ self,
+ *,
+ account_id: str,
+ id: str | NotGiven = NOT_GIVEN,
+ scan: bool | NotGiven = NOT_GIVEN,
+ tag: 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,
+ ) -> None:
+ """
+ Return a success message after deleting saved string queries by ID
+
+ Args:
+ 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}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ f"/accounts/{account_id}/brand-protection/queries",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "id": id,
+ "scan": scan,
+ "tag": tag,
+ },
+ query_delete_params.QueryDeleteParams,
+ ),
+ ),
+ cast_to=NoneType,
+ )
+
+
+class QueriesResourceWithRawResponse:
+ def __init__(self, queries: QueriesResource) -> None:
+ self._queries = queries
+
+ self.create = to_raw_response_wrapper(
+ queries.create,
+ )
+ self.delete = to_raw_response_wrapper(
+ queries.delete,
+ )
+
+
+class AsyncQueriesResourceWithRawResponse:
+ def __init__(self, queries: AsyncQueriesResource) -> None:
+ self._queries = queries
+
+ self.create = async_to_raw_response_wrapper(
+ queries.create,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ queries.delete,
+ )
+
+
+class QueriesResourceWithStreamingResponse:
+ def __init__(self, queries: QueriesResource) -> None:
+ self._queries = queries
+
+ self.create = to_streamed_response_wrapper(
+ queries.create,
+ )
+ self.delete = to_streamed_response_wrapper(
+ queries.delete,
+ )
+
+
+class AsyncQueriesResourceWithStreamingResponse:
+ def __init__(self, queries: AsyncQueriesResource) -> None:
+ self._queries = queries
+
+ self.create = async_to_streamed_response_wrapper(
+ queries.create,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ queries.delete,
+ )
diff --git a/src/cloudflare/resources/browser_rendering/pdf.py b/src/cloudflare/resources/browser_rendering/pdf.py
index 4b82c076245..d9fd71a2c3b 100644
--- a/src/cloudflare/resources/browser_rendering/pdf.py
+++ b/src/cloudflare/resources/browser_rendering/pdf.py
@@ -85,6 +85,7 @@ def create(
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
+ pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN,
reject_request_pattern: List[str] | NotGiven = NOT_GIVEN,
reject_resource_types: List[
Literal[
@@ -158,6 +159,8 @@ def create(
html: Set the content of the page, eg: `
Hello World!!
`. Either `html` or
`url` must be set.
+ pdf_options: Check [options](https://pptr.dev/api/puppeteer.pdfoptions).
+
reject_request_pattern: Block undesired requests that match the provided regex patterns, eg.
'/^.\\**\\..(css)'.
@@ -199,6 +202,7 @@ def create(
"emulate_media_type": emulate_media_type,
"goto_options": goto_options,
"html": html,
+ "pdf_options": pdf_options,
"reject_request_pattern": reject_request_pattern,
"reject_resource_types": reject_resource_types,
"set_extra_http_headers": set_extra_http_headers,
@@ -280,6 +284,7 @@ async def create(
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
+ pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN,
reject_request_pattern: List[str] | NotGiven = NOT_GIVEN,
reject_resource_types: List[
Literal[
@@ -353,6 +358,8 @@ async def create(
html: Set the content of the page, eg: `Hello World!!
`. Either `html` or
`url` must be set.
+ pdf_options: Check [options](https://pptr.dev/api/puppeteer.pdfoptions).
+
reject_request_pattern: Block undesired requests that match the provided regex patterns, eg.
'/^.\\**\\..(css)'.
@@ -394,6 +401,7 @@ async def create(
"emulate_media_type": emulate_media_type,
"goto_options": goto_options,
"html": html,
+ "pdf_options": pdf_options,
"reject_request_pattern": reject_request_pattern,
"reject_resource_types": reject_resource_types,
"set_extra_http_headers": set_extra_http_headers,
diff --git a/src/cloudflare/resources/cloudforce_one/__init__.py b/src/cloudflare/resources/cloudforce_one/__init__.py
index 0a703327c39..6dede9235d6 100644
--- a/src/cloudflare/resources/cloudforce_one/__init__.py
+++ b/src/cloudflare/resources/cloudforce_one/__init__.py
@@ -24,6 +24,14 @@
ThreatEventsResourceWithStreamingResponse,
AsyncThreatEventsResourceWithStreamingResponse,
)
+from .binary_storage import (
+ BinaryStorageResource,
+ AsyncBinaryStorageResource,
+ BinaryStorageResourceWithRawResponse,
+ AsyncBinaryStorageResourceWithRawResponse,
+ BinaryStorageResourceWithStreamingResponse,
+ AsyncBinaryStorageResourceWithStreamingResponse,
+)
from .cloudforce_one import (
CloudforceOneResource,
AsyncCloudforceOneResource,
@@ -40,6 +48,12 @@
"AsyncScansResourceWithRawResponse",
"ScansResourceWithStreamingResponse",
"AsyncScansResourceWithStreamingResponse",
+ "BinaryStorageResource",
+ "AsyncBinaryStorageResource",
+ "BinaryStorageResourceWithRawResponse",
+ "AsyncBinaryStorageResourceWithRawResponse",
+ "BinaryStorageResourceWithStreamingResponse",
+ "AsyncBinaryStorageResourceWithStreamingResponse",
"RequestsResource",
"AsyncRequestsResource",
"RequestsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/cloudforce_one/binary_storage.py b/src/cloudflare/resources/cloudforce_one/binary_storage.py
new file mode 100644
index 00000000000..2daaa1ea809
--- /dev/null
+++ b/src/cloudflare/resources/cloudforce_one/binary_storage.py
@@ -0,0 +1,287 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Mapping, cast
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
+from ..._utils import extract_files, maybe_transform, deepcopy_minimal, 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 ..._base_client import make_request_options
+from ...types.cloudforce_one import binary_storage_create_params
+from ...types.cloudforce_one.binary_storage_create_response import BinaryStorageCreateResponse
+
+__all__ = ["BinaryStorageResource", "AsyncBinaryStorageResource"]
+
+
+class BinaryStorageResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> BinaryStorageResourceWithRawResponse:
+ """
+ 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 BinaryStorageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BinaryStorageResourceWithStreamingResponse:
+ """
+ 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 BinaryStorageResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ file: FileTypes,
+ # 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,
+ ) -> BinaryStorageCreateResponse:
+ """
+ Posts a file to Binary Storage
+
+ Args:
+ account_id: Account ID.
+
+ file: The binary file content to upload.
+
+ 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}")
+ body = deepcopy_minimal({"file": file})
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ return self._post(
+ f"/accounts/{account_id}/cloudforce-one/binary",
+ body=maybe_transform(body, binary_storage_create_params.BinaryStorageCreateParams),
+ files=files,
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BinaryStorageCreateResponse,
+ )
+
+ def get(
+ self,
+ hash: str,
+ *,
+ 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,
+ ) -> None:
+ """
+ Retrieves a file from Binary Storage
+
+ Args:
+ account_id: Account ID.
+
+ hash: hash of the binary
+
+ 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 hash:
+ raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ f"/accounts/{account_id}/cloudforce-one/binary/{hash}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncBinaryStorageResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncBinaryStorageResourceWithRawResponse:
+ """
+ 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 AsyncBinaryStorageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBinaryStorageResourceWithStreamingResponse:
+ """
+ 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 AsyncBinaryStorageResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ file: FileTypes,
+ # 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,
+ ) -> BinaryStorageCreateResponse:
+ """
+ Posts a file to Binary Storage
+
+ Args:
+ account_id: Account ID.
+
+ file: The binary file content to upload.
+
+ 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}")
+ body = deepcopy_minimal({"file": file})
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ return await self._post(
+ f"/accounts/{account_id}/cloudforce-one/binary",
+ body=await async_maybe_transform(body, binary_storage_create_params.BinaryStorageCreateParams),
+ files=files,
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BinaryStorageCreateResponse,
+ )
+
+ async def get(
+ self,
+ hash: str,
+ *,
+ 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,
+ ) -> None:
+ """
+ Retrieves a file from Binary Storage
+
+ Args:
+ account_id: Account ID.
+
+ hash: hash of the binary
+
+ 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 hash:
+ raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ f"/accounts/{account_id}/cloudforce-one/binary/{hash}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class BinaryStorageResourceWithRawResponse:
+ def __init__(self, binary_storage: BinaryStorageResource) -> None:
+ self._binary_storage = binary_storage
+
+ self.create = to_raw_response_wrapper(
+ binary_storage.create,
+ )
+ self.get = to_raw_response_wrapper(
+ binary_storage.get,
+ )
+
+
+class AsyncBinaryStorageResourceWithRawResponse:
+ def __init__(self, binary_storage: AsyncBinaryStorageResource) -> None:
+ self._binary_storage = binary_storage
+
+ self.create = async_to_raw_response_wrapper(
+ binary_storage.create,
+ )
+ self.get = async_to_raw_response_wrapper(
+ binary_storage.get,
+ )
+
+
+class BinaryStorageResourceWithStreamingResponse:
+ def __init__(self, binary_storage: BinaryStorageResource) -> None:
+ self._binary_storage = binary_storage
+
+ self.create = to_streamed_response_wrapper(
+ binary_storage.create,
+ )
+ self.get = to_streamed_response_wrapper(
+ binary_storage.get,
+ )
+
+
+class AsyncBinaryStorageResourceWithStreamingResponse:
+ def __init__(self, binary_storage: AsyncBinaryStorageResource) -> None:
+ self._binary_storage = binary_storage
+
+ self.create = async_to_streamed_response_wrapper(
+ binary_storage.create,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ binary_storage.get,
+ )
diff --git a/src/cloudflare/resources/cloudforce_one/cloudforce_one.py b/src/cloudflare/resources/cloudforce_one/cloudforce_one.py
index 889e3108322..9e8c0f29a09 100644
--- a/src/cloudflare/resources/cloudforce_one/cloudforce_one.py
+++ b/src/cloudflare/resources/cloudforce_one/cloudforce_one.py
@@ -12,6 +12,14 @@
ScansResourceWithStreamingResponse,
AsyncScansResourceWithStreamingResponse,
)
+from .binary_storage import (
+ BinaryStorageResource,
+ AsyncBinaryStorageResource,
+ BinaryStorageResourceWithRawResponse,
+ AsyncBinaryStorageResourceWithRawResponse,
+ BinaryStorageResourceWithStreamingResponse,
+ AsyncBinaryStorageResourceWithStreamingResponse,
+)
from .requests.requests import (
RequestsResource,
AsyncRequestsResource,
@@ -37,6 +45,10 @@ class CloudforceOneResource(SyncAPIResource):
def scans(self) -> ScansResource:
return ScansResource(self._client)
+ @cached_property
+ def binary_storage(self) -> BinaryStorageResource:
+ return BinaryStorageResource(self._client)
+
@cached_property
def requests(self) -> RequestsResource:
return RequestsResource(self._client)
@@ -70,6 +82,10 @@ class AsyncCloudforceOneResource(AsyncAPIResource):
def scans(self) -> AsyncScansResource:
return AsyncScansResource(self._client)
+ @cached_property
+ def binary_storage(self) -> AsyncBinaryStorageResource:
+ return AsyncBinaryStorageResource(self._client)
+
@cached_property
def requests(self) -> AsyncRequestsResource:
return AsyncRequestsResource(self._client)
@@ -106,6 +122,10 @@ def __init__(self, cloudforce_one: CloudforceOneResource) -> None:
def scans(self) -> ScansResourceWithRawResponse:
return ScansResourceWithRawResponse(self._cloudforce_one.scans)
+ @cached_property
+ def binary_storage(self) -> BinaryStorageResourceWithRawResponse:
+ return BinaryStorageResourceWithRawResponse(self._cloudforce_one.binary_storage)
+
@cached_property
def requests(self) -> RequestsResourceWithRawResponse:
return RequestsResourceWithRawResponse(self._cloudforce_one.requests)
@@ -123,6 +143,10 @@ def __init__(self, cloudforce_one: AsyncCloudforceOneResource) -> None:
def scans(self) -> AsyncScansResourceWithRawResponse:
return AsyncScansResourceWithRawResponse(self._cloudforce_one.scans)
+ @cached_property
+ def binary_storage(self) -> AsyncBinaryStorageResourceWithRawResponse:
+ return AsyncBinaryStorageResourceWithRawResponse(self._cloudforce_one.binary_storage)
+
@cached_property
def requests(self) -> AsyncRequestsResourceWithRawResponse:
return AsyncRequestsResourceWithRawResponse(self._cloudforce_one.requests)
@@ -140,6 +164,10 @@ def __init__(self, cloudforce_one: CloudforceOneResource) -> None:
def scans(self) -> ScansResourceWithStreamingResponse:
return ScansResourceWithStreamingResponse(self._cloudforce_one.scans)
+ @cached_property
+ def binary_storage(self) -> BinaryStorageResourceWithStreamingResponse:
+ return BinaryStorageResourceWithStreamingResponse(self._cloudforce_one.binary_storage)
+
@cached_property
def requests(self) -> RequestsResourceWithStreamingResponse:
return RequestsResourceWithStreamingResponse(self._cloudforce_one.requests)
@@ -157,6 +185,10 @@ def __init__(self, cloudforce_one: AsyncCloudforceOneResource) -> None:
def scans(self) -> AsyncScansResourceWithStreamingResponse:
return AsyncScansResourceWithStreamingResponse(self._cloudforce_one.scans)
+ @cached_property
+ def binary_storage(self) -> AsyncBinaryStorageResourceWithStreamingResponse:
+ return AsyncBinaryStorageResourceWithStreamingResponse(self._cloudforce_one.binary_storage)
+
@cached_property
def requests(self) -> AsyncRequestsResourceWithStreamingResponse:
return AsyncRequestsResourceWithStreamingResponse(self._cloudforce_one.requests)
diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py
index b25651cac31..66ed45034a8 100644
--- a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py
+++ b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py
@@ -40,14 +40,6 @@
DatasetsResourceWithStreamingResponse,
AsyncDatasetsResourceWithStreamingResponse,
)
-from .insights import (
- InsightsResource,
- AsyncInsightsResource,
- InsightsResourceWithRawResponse,
- AsyncInsightsResourceWithRawResponse,
- InsightsResourceWithStreamingResponse,
- AsyncInsightsResourceWithStreamingResponse,
-)
from .attackers import (
AttackersResource,
AsyncAttackersResource,
@@ -172,12 +164,6 @@
"AsyncTargetIndustriesResourceWithRawResponse",
"TargetIndustriesResourceWithStreamingResponse",
"AsyncTargetIndustriesResourceWithStreamingResponse",
- "InsightsResource",
- "AsyncInsightsResource",
- "InsightsResourceWithRawResponse",
- "AsyncInsightsResourceWithRawResponse",
- "InsightsResourceWithStreamingResponse",
- "AsyncInsightsResourceWithStreamingResponse",
"ThreatEventsResource",
"AsyncThreatEventsResource",
"ThreatEventsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py b/src/cloudflare/resources/cloudforce_one/threat_events/insights.py
deleted file mode 100644
index 97373be775d..00000000000
--- a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py
+++ /dev/null
@@ -1,531 +0,0 @@
-# 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 ...._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.cloudforce_one.threat_events import insight_edit_params, insight_create_params
-from ....types.cloudforce_one.threat_events.insight_get_response import InsightGetResponse
-from ....types.cloudforce_one.threat_events.insight_edit_response import InsightEditResponse
-from ....types.cloudforce_one.threat_events.insight_create_response import InsightCreateResponse
-from ....types.cloudforce_one.threat_events.insight_delete_response import InsightDeleteResponse
-
-__all__ = ["InsightsResource", "AsyncInsightsResource"]
-
-
-class InsightsResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> InsightsResourceWithRawResponse:
- """
- 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 InsightsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> InsightsResourceWithStreamingResponse:
- """
- 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 InsightsResourceWithStreamingResponse(self)
-
- def create(
- self,
- event_id: str,
- *,
- account_id: str,
- content: 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,
- ) -> InsightCreateResponse:
- """
- Adds an insight to an event
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- return self._post(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create",
- body=maybe_transform({"content": content}, insight_create_params.InsightCreateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightCreateResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]),
- )
-
- def delete(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_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,
- ) -> InsightDeleteResponse:
- """
- Deletes an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return self._delete(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]),
- )
-
- def edit(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_id: str,
- content: 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,
- ) -> InsightEditResponse:
- """
- Updates an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return self._patch(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- body=maybe_transform({"content": content}, insight_edit_params.InsightEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightEditResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightEditResponse], ResultWrapper[InsightEditResponse]),
- )
-
- def get(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_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,
- ) -> InsightGetResponse:
- """
- Reads an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return self._get(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightGetResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightGetResponse], ResultWrapper[InsightGetResponse]),
- )
-
-
-class AsyncInsightsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncInsightsResourceWithRawResponse:
- """
- 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 AsyncInsightsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncInsightsResourceWithStreamingResponse:
- """
- 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 AsyncInsightsResourceWithStreamingResponse(self)
-
- async def create(
- self,
- event_id: str,
- *,
- account_id: str,
- content: 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,
- ) -> InsightCreateResponse:
- """
- Adds an insight to an event
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- return await self._post(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create",
- body=await async_maybe_transform({"content": content}, insight_create_params.InsightCreateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightCreateResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]),
- )
-
- async def delete(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_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,
- ) -> InsightDeleteResponse:
- """
- Deletes an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return await self._delete(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]),
- )
-
- async def edit(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_id: str,
- content: 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,
- ) -> InsightEditResponse:
- """
- Updates an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return await self._patch(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- body=await async_maybe_transform({"content": content}, insight_edit_params.InsightEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightEditResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightEditResponse], ResultWrapper[InsightEditResponse]),
- )
-
- async def get(
- self,
- insight_id: str,
- *,
- account_id: str,
- event_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,
- ) -> InsightGetResponse:
- """
- Reads an event insight
-
- Args:
- account_id: Account ID.
-
- event_id: Event UUID.
-
- insight_id: Insight UUID.
-
- 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 event_id:
- raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
- if not insight_id:
- raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
- return await self._get(
- f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[InsightGetResponse]._unwrapper,
- ),
- cast_to=cast(Type[InsightGetResponse], ResultWrapper[InsightGetResponse]),
- )
-
-
-class InsightsResourceWithRawResponse:
- def __init__(self, insights: InsightsResource) -> None:
- self._insights = insights
-
- self.create = to_raw_response_wrapper(
- insights.create,
- )
- self.delete = to_raw_response_wrapper(
- insights.delete,
- )
- self.edit = to_raw_response_wrapper(
- insights.edit,
- )
- self.get = to_raw_response_wrapper(
- insights.get,
- )
-
-
-class AsyncInsightsResourceWithRawResponse:
- def __init__(self, insights: AsyncInsightsResource) -> None:
- self._insights = insights
-
- self.create = async_to_raw_response_wrapper(
- insights.create,
- )
- self.delete = async_to_raw_response_wrapper(
- insights.delete,
- )
- self.edit = async_to_raw_response_wrapper(
- insights.edit,
- )
- self.get = async_to_raw_response_wrapper(
- insights.get,
- )
-
-
-class InsightsResourceWithStreamingResponse:
- def __init__(self, insights: InsightsResource) -> None:
- self._insights = insights
-
- self.create = to_streamed_response_wrapper(
- insights.create,
- )
- self.delete = to_streamed_response_wrapper(
- insights.delete,
- )
- self.edit = to_streamed_response_wrapper(
- insights.edit,
- )
- self.get = to_streamed_response_wrapper(
- insights.get,
- )
-
-
-class AsyncInsightsResourceWithStreamingResponse:
- def __init__(self, insights: AsyncInsightsResource) -> None:
- self._insights = insights
-
- self.create = async_to_streamed_response_wrapper(
- insights.create,
- )
- self.delete = async_to_streamed_response_wrapper(
- insights.delete,
- )
- self.edit = async_to_streamed_response_wrapper(
- insights.edit,
- )
- self.get = async_to_streamed_response_wrapper(
- insights.get,
- )
diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py
index a313c5426f1..ed760b3907c 100644
--- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py
+++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py
@@ -40,14 +40,6 @@
RelateResourceWithStreamingResponse,
AsyncRelateResourceWithStreamingResponse,
)
-from .insights import (
- InsightsResource,
- AsyncInsightsResource,
- InsightsResourceWithRawResponse,
- AsyncInsightsResourceWithRawResponse,
- InsightsResourceWithStreamingResponse,
- AsyncInsightsResourceWithStreamingResponse,
-)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import maybe_transform, async_maybe_transform
from .attackers import (
@@ -176,10 +168,6 @@ def event_tags(self) -> EventTagsResource:
def target_industries(self) -> TargetIndustriesResource:
return TargetIndustriesResource(self._client)
- @cached_property
- def insights(self) -> InsightsResource:
- return InsightsResource(self._client)
-
@cached_property
def with_raw_response(self) -> ThreatEventsResourceWithRawResponse:
"""
@@ -203,8 +191,6 @@ def create(
self,
*,
path_account_id: str,
- attacker: str,
- attacker_country: str,
category: str,
date: Union[str, datetime],
event: str,
@@ -212,6 +198,8 @@ def create(
raw: threat_event_create_params.Raw,
tlp: str,
body_account_id: float | NotGiven = NOT_GIVEN,
+ attacker: str | NotGiven = NOT_GIVEN,
+ attacker_country: str | NotGiven = NOT_GIVEN,
dataset_id: str | NotGiven = NOT_GIVEN,
indicator: str | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
@@ -225,10 +213,10 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ThreatEventCreateResponse:
"""
- Events must be created in a client-specific dataset, which means the `datasetId`
- parameter must be defined. To create a dataset, see the
+ To create a dataset, see the
[`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/)
- endpoint.
+ endpoint. When `datasetId` parameter is unspecified, it will be created in a
+ default dataset named `Cloudforce One Threat Events`.
Args:
path_account_id: Account ID.
@@ -247,8 +235,6 @@ def create(
f"/accounts/{path_account_id}/cloudforce-one/events/create",
body=maybe_transform(
{
- "attacker": attacker,
- "attacker_country": attacker_country,
"category": category,
"date": date,
"event": event,
@@ -256,6 +242,8 @@ def create(
"raw": raw,
"tlp": tlp,
"body_account_id": body_account_id,
+ "attacker": attacker,
+ "attacker_country": attacker_country,
"dataset_id": dataset_id,
"indicator": indicator,
"tags": tags,
@@ -289,8 +277,9 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ThreatEventListResponse:
"""
- The `datasetId` must be defined (to list existing datasets (and their IDs), use
- the
+ When `datasetId` is unspecified, events will be listed from the
+ `Cloudforce One Threat Events` dataset. To list existing datasets (and their
+ IDs), use the
[`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/)
endpoint). Also, must provide query parameters.
@@ -419,7 +408,7 @@ def bulk_create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=ThreatEventBulkCreateResponse,
+ cast_to=float,
)
def edit(
@@ -434,6 +423,8 @@ def edit(
event: str | NotGiven = NOT_GIVEN,
indicator: str | NotGiven = NOT_GIVEN,
indicator_type: str | NotGiven = NOT_GIVEN,
+ insight: str | NotGiven = NOT_GIVEN,
+ raw: threat_event_edit_params.Raw | NotGiven = NOT_GIVEN,
target_country: str | NotGiven = NOT_GIVEN,
target_industry: str | NotGiven = NOT_GIVEN,
tlp: str | NotGiven = NOT_GIVEN,
@@ -475,6 +466,8 @@ def edit(
"event": event,
"indicator": indicator,
"indicator_type": indicator_type,
+ "insight": insight,
+ "raw": raw,
"target_country": target_country,
"target_industry": target_industry,
"tlp": tlp,
@@ -573,10 +566,6 @@ def event_tags(self) -> AsyncEventTagsResource:
def target_industries(self) -> AsyncTargetIndustriesResource:
return AsyncTargetIndustriesResource(self._client)
- @cached_property
- def insights(self) -> AsyncInsightsResource:
- return AsyncInsightsResource(self._client)
-
@cached_property
def with_raw_response(self) -> AsyncThreatEventsResourceWithRawResponse:
"""
@@ -600,8 +589,6 @@ async def create(
self,
*,
path_account_id: str,
- attacker: str,
- attacker_country: str,
category: str,
date: Union[str, datetime],
event: str,
@@ -609,6 +596,8 @@ async def create(
raw: threat_event_create_params.Raw,
tlp: str,
body_account_id: float | NotGiven = NOT_GIVEN,
+ attacker: str | NotGiven = NOT_GIVEN,
+ attacker_country: str | NotGiven = NOT_GIVEN,
dataset_id: str | NotGiven = NOT_GIVEN,
indicator: str | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
@@ -622,10 +611,10 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ThreatEventCreateResponse:
"""
- Events must be created in a client-specific dataset, which means the `datasetId`
- parameter must be defined. To create a dataset, see the
+ To create a dataset, see the
[`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/)
- endpoint.
+ endpoint. When `datasetId` parameter is unspecified, it will be created in a
+ default dataset named `Cloudforce One Threat Events`.
Args:
path_account_id: Account ID.
@@ -644,8 +633,6 @@ async def create(
f"/accounts/{path_account_id}/cloudforce-one/events/create",
body=await async_maybe_transform(
{
- "attacker": attacker,
- "attacker_country": attacker_country,
"category": category,
"date": date,
"event": event,
@@ -653,6 +640,8 @@ async def create(
"raw": raw,
"tlp": tlp,
"body_account_id": body_account_id,
+ "attacker": attacker,
+ "attacker_country": attacker_country,
"dataset_id": dataset_id,
"indicator": indicator,
"tags": tags,
@@ -686,8 +675,9 @@ async def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ThreatEventListResponse:
"""
- The `datasetId` must be defined (to list existing datasets (and their IDs), use
- the
+ When `datasetId` is unspecified, events will be listed from the
+ `Cloudforce One Threat Events` dataset. To list existing datasets (and their
+ IDs), use the
[`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/)
endpoint). Also, must provide query parameters.
@@ -816,7 +806,7 @@ async def bulk_create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=ThreatEventBulkCreateResponse,
+ cast_to=float,
)
async def edit(
@@ -831,6 +821,8 @@ async def edit(
event: str | NotGiven = NOT_GIVEN,
indicator: str | NotGiven = NOT_GIVEN,
indicator_type: str | NotGiven = NOT_GIVEN,
+ insight: str | NotGiven = NOT_GIVEN,
+ raw: threat_event_edit_params.Raw | NotGiven = NOT_GIVEN,
target_country: str | NotGiven = NOT_GIVEN,
target_industry: str | NotGiven = NOT_GIVEN,
tlp: str | NotGiven = NOT_GIVEN,
@@ -872,6 +864,8 @@ async def edit(
"event": event,
"indicator": indicator,
"indicator_type": indicator_type,
+ "insight": insight,
+ "raw": raw,
"target_country": target_country,
"target_industry": target_industry,
"tlp": tlp,
@@ -992,10 +986,6 @@ def event_tags(self) -> EventTagsResourceWithRawResponse:
def target_industries(self) -> TargetIndustriesResourceWithRawResponse:
return TargetIndustriesResourceWithRawResponse(self._threat_events.target_industries)
- @cached_property
- def insights(self) -> InsightsResourceWithRawResponse:
- return InsightsResourceWithRawResponse(self._threat_events.insights)
-
class AsyncThreatEventsResourceWithRawResponse:
def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
@@ -1064,10 +1054,6 @@ def event_tags(self) -> AsyncEventTagsResourceWithRawResponse:
def target_industries(self) -> AsyncTargetIndustriesResourceWithRawResponse:
return AsyncTargetIndustriesResourceWithRawResponse(self._threat_events.target_industries)
- @cached_property
- def insights(self) -> AsyncInsightsResourceWithRawResponse:
- return AsyncInsightsResourceWithRawResponse(self._threat_events.insights)
-
class ThreatEventsResourceWithStreamingResponse:
def __init__(self, threat_events: ThreatEventsResource) -> None:
@@ -1136,10 +1122,6 @@ def event_tags(self) -> EventTagsResourceWithStreamingResponse:
def target_industries(self) -> TargetIndustriesResourceWithStreamingResponse:
return TargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries)
- @cached_property
- def insights(self) -> InsightsResourceWithStreamingResponse:
- return InsightsResourceWithStreamingResponse(self._threat_events.insights)
-
class AsyncThreatEventsResourceWithStreamingResponse:
def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
@@ -1207,7 +1189,3 @@ def event_tags(self) -> AsyncEventTagsResourceWithStreamingResponse:
@cached_property
def target_industries(self) -> AsyncTargetIndustriesResourceWithStreamingResponse:
return AsyncTargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries)
-
- @cached_property
- def insights(self) -> AsyncInsightsResourceWithStreamingResponse:
- return AsyncInsightsResourceWithStreamingResponse(self._threat_events.insights)
diff --git a/src/cloudflare/resources/custom_pages.py b/src/cloudflare/resources/custom_pages.py
index 4016622ad10..ae9584e5072 100644
--- a/src/cloudflare/resources/custom_pages.py
+++ b/src/cloudflare/resources/custom_pages.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Optional, cast
+from typing import Type, Optional, cast
from typing_extensions import Literal
import httpx
@@ -22,6 +22,7 @@
from .._base_client import AsyncPaginator, make_request_options
from ..types.custom_pages import custom_page_update_params
from ..types.custom_pages.custom_page_get_response import CustomPageGetResponse
+from ..types.custom_pages.custom_page_list_response import CustomPageListResponse
from ..types.custom_pages.custom_page_update_response import CustomPageUpdateResponse
__all__ = ["CustomPagesResource", "AsyncCustomPagesResource"]
@@ -49,7 +50,15 @@ def with_streaming_response(self) -> CustomPagesResourceWithStreamingResponse:
def update(
self,
- identifier: str,
+ identifier: Literal[
+ "waf_block",
+ "ip_block",
+ "country_challenge",
+ "500_errors",
+ "1000_errors",
+ "managed_challenge",
+ "ratelimit_block",
+ ],
*,
state: Literal["default", "customized"],
url: str,
@@ -66,7 +75,7 @@ def update(
Updates the configuration of an existing custom page.
Args:
- identifier: Identifier
+ identifier: Error Page Types
state: The custom page state.
@@ -98,28 +107,23 @@ def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[CustomPageUpdateResponse],
- self._put(
- f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
- body=maybe_transform(
- {
- "state": state,
- "url": url,
- },
- custom_page_update_params.CustomPageUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CustomPageUpdateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CustomPageUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._put(
+ f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
+ body=maybe_transform(
+ {
+ "state": state,
+ "url": url,
+ },
+ custom_page_update_params.CustomPageUpdateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomPageUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[CustomPageUpdateResponse]], ResultWrapper[CustomPageUpdateResponse]),
)
def list(
@@ -133,7 +137,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[object]:
+ ) -> SyncSinglePage[CustomPageListResponse]:
"""
Fetches all the custom pages.
@@ -164,16 +168,24 @@ def list(
account_or_zone_id = zone_id
return self._get_api_list(
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
- page=SyncSinglePage[object],
+ page=SyncSinglePage[CustomPageListResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=object,
+ model=CustomPageListResponse,
)
def get(
self,
- identifier: str,
+ identifier: Literal[
+ "waf_block",
+ "ip_block",
+ "country_challenge",
+ "500_errors",
+ "1000_errors",
+ "managed_challenge",
+ "ratelimit_block",
+ ],
*,
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
@@ -188,7 +200,7 @@ def get(
Fetches the details of a custom page.
Args:
- identifier: Identifier
+ identifier: Error Page Types
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
@@ -216,21 +228,16 @@ def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[CustomPageGetResponse],
- self._get(
- f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CustomPageGetResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CustomPageGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomPageGetResponse]]._unwrapper,
),
+ cast_to=cast(Type[Optional[CustomPageGetResponse]], ResultWrapper[CustomPageGetResponse]),
)
@@ -256,7 +263,15 @@ def with_streaming_response(self) -> AsyncCustomPagesResourceWithStreamingRespon
async def update(
self,
- identifier: str,
+ identifier: Literal[
+ "waf_block",
+ "ip_block",
+ "country_challenge",
+ "500_errors",
+ "1000_errors",
+ "managed_challenge",
+ "ratelimit_block",
+ ],
*,
state: Literal["default", "customized"],
url: str,
@@ -273,7 +288,7 @@ async def update(
Updates the configuration of an existing custom page.
Args:
- identifier: Identifier
+ identifier: Error Page Types
state: The custom page state.
@@ -305,28 +320,23 @@ async def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[CustomPageUpdateResponse],
- await self._put(
- f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
- body=await async_maybe_transform(
- {
- "state": state,
- "url": url,
- },
- custom_page_update_params.CustomPageUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CustomPageUpdateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CustomPageUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._put(
+ f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
+ body=await async_maybe_transform(
+ {
+ "state": state,
+ "url": url,
+ },
+ custom_page_update_params.CustomPageUpdateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomPageUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[CustomPageUpdateResponse]], ResultWrapper[CustomPageUpdateResponse]),
)
def list(
@@ -340,7 +350,7 @@ 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[CustomPageListResponse, AsyncSinglePage[CustomPageListResponse]]:
"""
Fetches all the custom pages.
@@ -371,16 +381,24 @@ def list(
account_or_zone_id = zone_id
return self._get_api_list(
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
- page=AsyncSinglePage[object],
+ page=AsyncSinglePage[CustomPageListResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=object,
+ model=CustomPageListResponse,
)
async def get(
self,
- identifier: str,
+ identifier: Literal[
+ "waf_block",
+ "ip_block",
+ "country_challenge",
+ "500_errors",
+ "1000_errors",
+ "managed_challenge",
+ "ratelimit_block",
+ ],
*,
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
@@ -395,7 +413,7 @@ async def get(
Fetches the details of a custom page.
Args:
- identifier: Identifier
+ identifier: Error Page Types
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
@@ -423,21 +441,16 @@ async def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[CustomPageGetResponse],
- await self._get(
- f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CustomPageGetResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CustomPageGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomPageGetResponse]]._unwrapper,
),
+ cast_to=cast(Type[Optional[CustomPageGetResponse]], ResultWrapper[CustomPageGetResponse]),
)
diff --git a/src/cloudflare/resources/diagnostics/__init__.py b/src/cloudflare/resources/diagnostics/__init__.py
index 4ccc6dce7cb..0c5fba15051 100644
--- a/src/cloudflare/resources/diagnostics/__init__.py
+++ b/src/cloudflare/resources/diagnostics/__init__.py
@@ -16,6 +16,14 @@
TraceroutesResourceWithStreamingResponse,
AsyncTraceroutesResourceWithStreamingResponse,
)
+from .endpoint_healthchecks import (
+ EndpointHealthchecksResource,
+ AsyncEndpointHealthchecksResource,
+ EndpointHealthchecksResourceWithRawResponse,
+ AsyncEndpointHealthchecksResourceWithRawResponse,
+ EndpointHealthchecksResourceWithStreamingResponse,
+ AsyncEndpointHealthchecksResourceWithStreamingResponse,
+)
__all__ = [
"TraceroutesResource",
@@ -24,6 +32,12 @@
"AsyncTraceroutesResourceWithRawResponse",
"TraceroutesResourceWithStreamingResponse",
"AsyncTraceroutesResourceWithStreamingResponse",
+ "EndpointHealthchecksResource",
+ "AsyncEndpointHealthchecksResource",
+ "EndpointHealthchecksResourceWithRawResponse",
+ "AsyncEndpointHealthchecksResourceWithRawResponse",
+ "EndpointHealthchecksResourceWithStreamingResponse",
+ "AsyncEndpointHealthchecksResourceWithStreamingResponse",
"DiagnosticsResource",
"AsyncDiagnosticsResource",
"DiagnosticsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/diagnostics/diagnostics.py b/src/cloudflare/resources/diagnostics/diagnostics.py
index e745c5cefb6..440f6803afe 100644
--- a/src/cloudflare/resources/diagnostics/diagnostics.py
+++ b/src/cloudflare/resources/diagnostics/diagnostics.py
@@ -12,6 +12,14 @@
TraceroutesResourceWithStreamingResponse,
AsyncTraceroutesResourceWithStreamingResponse,
)
+from .endpoint_healthchecks import (
+ EndpointHealthchecksResource,
+ AsyncEndpointHealthchecksResource,
+ EndpointHealthchecksResourceWithRawResponse,
+ AsyncEndpointHealthchecksResourceWithRawResponse,
+ EndpointHealthchecksResourceWithStreamingResponse,
+ AsyncEndpointHealthchecksResourceWithStreamingResponse,
+)
__all__ = ["DiagnosticsResource", "AsyncDiagnosticsResource"]
@@ -21,6 +29,10 @@ class DiagnosticsResource(SyncAPIResource):
def traceroutes(self) -> TraceroutesResource:
return TraceroutesResource(self._client)
+ @cached_property
+ def endpoint_healthchecks(self) -> EndpointHealthchecksResource:
+ return EndpointHealthchecksResource(self._client)
+
@cached_property
def with_raw_response(self) -> DiagnosticsResourceWithRawResponse:
"""
@@ -46,6 +58,10 @@ class AsyncDiagnosticsResource(AsyncAPIResource):
def traceroutes(self) -> AsyncTraceroutesResource:
return AsyncTraceroutesResource(self._client)
+ @cached_property
+ def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResource:
+ return AsyncEndpointHealthchecksResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncDiagnosticsResourceWithRawResponse:
"""
@@ -74,6 +90,10 @@ def __init__(self, diagnostics: DiagnosticsResource) -> None:
def traceroutes(self) -> TraceroutesResourceWithRawResponse:
return TraceroutesResourceWithRawResponse(self._diagnostics.traceroutes)
+ @cached_property
+ def endpoint_healthchecks(self) -> EndpointHealthchecksResourceWithRawResponse:
+ return EndpointHealthchecksResourceWithRawResponse(self._diagnostics.endpoint_healthchecks)
+
class AsyncDiagnosticsResourceWithRawResponse:
def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None:
@@ -83,6 +103,10 @@ def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None:
def traceroutes(self) -> AsyncTraceroutesResourceWithRawResponse:
return AsyncTraceroutesResourceWithRawResponse(self._diagnostics.traceroutes)
+ @cached_property
+ def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResourceWithRawResponse:
+ return AsyncEndpointHealthchecksResourceWithRawResponse(self._diagnostics.endpoint_healthchecks)
+
class DiagnosticsResourceWithStreamingResponse:
def __init__(self, diagnostics: DiagnosticsResource) -> None:
@@ -92,6 +116,10 @@ def __init__(self, diagnostics: DiagnosticsResource) -> None:
def traceroutes(self) -> TraceroutesResourceWithStreamingResponse:
return TraceroutesResourceWithStreamingResponse(self._diagnostics.traceroutes)
+ @cached_property
+ def endpoint_healthchecks(self) -> EndpointHealthchecksResourceWithStreamingResponse:
+ return EndpointHealthchecksResourceWithStreamingResponse(self._diagnostics.endpoint_healthchecks)
+
class AsyncDiagnosticsResourceWithStreamingResponse:
def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None:
@@ -100,3 +128,7 @@ def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None:
@cached_property
def traceroutes(self) -> AsyncTraceroutesResourceWithStreamingResponse:
return AsyncTraceroutesResourceWithStreamingResponse(self._diagnostics.traceroutes)
+
+ @cached_property
+ def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResourceWithStreamingResponse:
+ return AsyncEndpointHealthchecksResourceWithStreamingResponse(self._diagnostics.endpoint_healthchecks)
diff --git a/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py b/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py
new file mode 100644
index 00000000000..a82089dfc74
--- /dev/null
+++ b/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py
@@ -0,0 +1,647 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, 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.diagnostics import endpoint_healthcheck_create_params, endpoint_healthcheck_update_params
+from ...types.diagnostics.endpoint_healthcheck_get_response import EndpointHealthcheckGetResponse
+from ...types.diagnostics.endpoint_healthcheck_list_response import EndpointHealthcheckListResponse
+from ...types.diagnostics.endpoint_healthcheck_create_response import EndpointHealthcheckCreateResponse
+from ...types.diagnostics.endpoint_healthcheck_delete_response import EndpointHealthcheckDeleteResponse
+from ...types.diagnostics.endpoint_healthcheck_update_response import EndpointHealthcheckUpdateResponse
+
+__all__ = ["EndpointHealthchecksResource", "AsyncEndpointHealthchecksResource"]
+
+
+class EndpointHealthchecksResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> EndpointHealthchecksResourceWithRawResponse:
+ """
+ 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 EndpointHealthchecksResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> EndpointHealthchecksResourceWithStreamingResponse:
+ """
+ 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 EndpointHealthchecksResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ check_type: Literal["icmp"],
+ endpoint: str,
+ name: 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,
+ ) -> Optional[EndpointHealthcheckCreateResponse]:
+ """
+ Create Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ check_type: type of check to perform
+
+ endpoint: the IP address of the host to perform checks against
+
+ name: Optional name associated with this check
+
+ 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._post(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks",
+ body=maybe_transform(
+ {
+ "check_type": check_type,
+ "endpoint": endpoint,
+ "name": name,
+ },
+ endpoint_healthcheck_create_params.EndpointHealthcheckCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckCreateResponse]], ResultWrapper[EndpointHealthcheckCreateResponse]
+ ),
+ )
+
+ def update(
+ self,
+ id: str,
+ *,
+ account_id: str,
+ check_type: Literal["icmp"],
+ endpoint: str,
+ name: 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,
+ ) -> Optional[EndpointHealthcheckUpdateResponse]:
+ """
+ Update a Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ check_type: type of check to perform
+
+ endpoint: the IP address of the host to perform checks against
+
+ name: Optional name associated with this check
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._put(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ body=maybe_transform(
+ {
+ "check_type": check_type,
+ "endpoint": endpoint,
+ "name": name,
+ },
+ endpoint_healthcheck_update_params.EndpointHealthcheckUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckUpdateResponse]], ResultWrapper[EndpointHealthcheckUpdateResponse]
+ ),
+ )
+
+ def list(
+ 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,
+ ) -> Optional[EndpointHealthcheckListResponse]:
+ """
+ List Endpoint Health Checks.
+
+ Args:
+ account_id: Identifier
+
+ 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(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckListResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckListResponse]], ResultWrapper[EndpointHealthcheckListResponse]
+ ),
+ )
+
+ def delete(
+ self,
+ id: str,
+ *,
+ 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,
+ ) -> EndpointHealthcheckDeleteResponse:
+ """
+ Delete Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=EndpointHealthcheckDeleteResponse,
+ )
+
+ def get(
+ self,
+ id: str,
+ *,
+ 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,
+ ) -> Optional[EndpointHealthcheckGetResponse]:
+ """
+ Get a single Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckGetResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[EndpointHealthcheckGetResponse]], ResultWrapper[EndpointHealthcheckGetResponse]),
+ )
+
+
+class AsyncEndpointHealthchecksResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncEndpointHealthchecksResourceWithRawResponse:
+ """
+ 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 AsyncEndpointHealthchecksResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncEndpointHealthchecksResourceWithStreamingResponse:
+ """
+ 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 AsyncEndpointHealthchecksResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ check_type: Literal["icmp"],
+ endpoint: str,
+ name: 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,
+ ) -> Optional[EndpointHealthcheckCreateResponse]:
+ """
+ Create Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ check_type: type of check to perform
+
+ endpoint: the IP address of the host to perform checks against
+
+ name: Optional name associated with this check
+
+ 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 await self._post(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks",
+ body=await async_maybe_transform(
+ {
+ "check_type": check_type,
+ "endpoint": endpoint,
+ "name": name,
+ },
+ endpoint_healthcheck_create_params.EndpointHealthcheckCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckCreateResponse]], ResultWrapper[EndpointHealthcheckCreateResponse]
+ ),
+ )
+
+ async def update(
+ self,
+ id: str,
+ *,
+ account_id: str,
+ check_type: Literal["icmp"],
+ endpoint: str,
+ name: 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,
+ ) -> Optional[EndpointHealthcheckUpdateResponse]:
+ """
+ Update a Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ check_type: type of check to perform
+
+ endpoint: the IP address of the host to perform checks against
+
+ name: Optional name associated with this check
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._put(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ body=await async_maybe_transform(
+ {
+ "check_type": check_type,
+ "endpoint": endpoint,
+ "name": name,
+ },
+ endpoint_healthcheck_update_params.EndpointHealthcheckUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckUpdateResponse]], ResultWrapper[EndpointHealthcheckUpdateResponse]
+ ),
+ )
+
+ async def list(
+ 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,
+ ) -> Optional[EndpointHealthcheckListResponse]:
+ """
+ List Endpoint Health Checks.
+
+ Args:
+ account_id: Identifier
+
+ 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 await self._get(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckListResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Type[Optional[EndpointHealthcheckListResponse]], ResultWrapper[EndpointHealthcheckListResponse]
+ ),
+ )
+
+ async def delete(
+ self,
+ id: str,
+ *,
+ 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,
+ ) -> EndpointHealthcheckDeleteResponse:
+ """
+ Delete Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=EndpointHealthcheckDeleteResponse,
+ )
+
+ async def get(
+ self,
+ id: str,
+ *,
+ 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,
+ ) -> Optional[EndpointHealthcheckGetResponse]:
+ """
+ Get a single Endpoint Health Check.
+
+ Args:
+ account_id: Identifier
+
+ id: UUID.
+
+ 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 id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ f"/accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[EndpointHealthcheckGetResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[EndpointHealthcheckGetResponse]], ResultWrapper[EndpointHealthcheckGetResponse]),
+ )
+
+
+class EndpointHealthchecksResourceWithRawResponse:
+ def __init__(self, endpoint_healthchecks: EndpointHealthchecksResource) -> None:
+ self._endpoint_healthchecks = endpoint_healthchecks
+
+ self.create = to_raw_response_wrapper(
+ endpoint_healthchecks.create,
+ )
+ self.update = to_raw_response_wrapper(
+ endpoint_healthchecks.update,
+ )
+ self.list = to_raw_response_wrapper(
+ endpoint_healthchecks.list,
+ )
+ self.delete = to_raw_response_wrapper(
+ endpoint_healthchecks.delete,
+ )
+ self.get = to_raw_response_wrapper(
+ endpoint_healthchecks.get,
+ )
+
+
+class AsyncEndpointHealthchecksResourceWithRawResponse:
+ def __init__(self, endpoint_healthchecks: AsyncEndpointHealthchecksResource) -> None:
+ self._endpoint_healthchecks = endpoint_healthchecks
+
+ self.create = async_to_raw_response_wrapper(
+ endpoint_healthchecks.create,
+ )
+ self.update = async_to_raw_response_wrapper(
+ endpoint_healthchecks.update,
+ )
+ self.list = async_to_raw_response_wrapper(
+ endpoint_healthchecks.list,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ endpoint_healthchecks.delete,
+ )
+ self.get = async_to_raw_response_wrapper(
+ endpoint_healthchecks.get,
+ )
+
+
+class EndpointHealthchecksResourceWithStreamingResponse:
+ def __init__(self, endpoint_healthchecks: EndpointHealthchecksResource) -> None:
+ self._endpoint_healthchecks = endpoint_healthchecks
+
+ self.create = to_streamed_response_wrapper(
+ endpoint_healthchecks.create,
+ )
+ self.update = to_streamed_response_wrapper(
+ endpoint_healthchecks.update,
+ )
+ self.list = to_streamed_response_wrapper(
+ endpoint_healthchecks.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ endpoint_healthchecks.delete,
+ )
+ self.get = to_streamed_response_wrapper(
+ endpoint_healthchecks.get,
+ )
+
+
+class AsyncEndpointHealthchecksResourceWithStreamingResponse:
+ def __init__(self, endpoint_healthchecks: AsyncEndpointHealthchecksResource) -> None:
+ self._endpoint_healthchecks = endpoint_healthchecks
+
+ self.create = async_to_streamed_response_wrapper(
+ endpoint_healthchecks.create,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ endpoint_healthchecks.update,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ endpoint_healthchecks.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ endpoint_healthchecks.delete,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ endpoint_healthchecks.get,
+ )
diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py
index 7fe82213b8c..b55cf3ae3eb 100644
--- a/src/cloudflare/resources/dns/records.py
+++ b/src/cloudflare/resources/dns/records.py
@@ -69,13 +69,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -96,7 +96,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -112,10 +116,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -132,13 +132,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -159,7 +159,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -175,10 +179,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -195,13 +195,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -222,7 +222,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -238,10 +242,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -258,6 +258,7 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -265,7 +266,6 @@ def create(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -286,7 +286,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -305,10 +309,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -325,13 +325,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -352,7 +352,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -368,10 +372,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -388,13 +388,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -415,7 +415,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -431,10 +435,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -451,13 +451,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -478,7 +478,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -494,10 +498,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -514,13 +514,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -541,7 +541,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -562,10 +566,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -582,13 +582,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -609,7 +609,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -625,10 +629,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -645,13 +645,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -672,7 +672,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -688,10 +692,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -708,13 +708,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -735,7 +735,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -751,10 +755,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -771,13 +771,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -798,7 +798,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -814,10 +818,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -834,13 +834,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -861,7 +861,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -877,10 +881,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -897,13 +897,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -924,7 +924,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -940,10 +944,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -960,13 +960,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -987,7 +987,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1003,10 +1007,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1023,13 +1023,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1050,7 +1050,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1066,10 +1070,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1086,13 +1086,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1113,7 +1113,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1129,10 +1133,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1149,13 +1149,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1176,7 +1176,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1192,10 +1196,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1212,13 +1212,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1239,7 +1239,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1255,10 +1259,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1275,13 +1275,13 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1302,7 +1302,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1318,10 +1322,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1338,6 +1338,7 @@ def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -1345,7 +1346,6 @@ def create(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1366,7 +1366,11 @@ def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1385,10 +1389,6 @@ def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1399,12 +1399,13 @@ def create(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
def create(
self,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -1433,7 +1434,6 @@ def create(
| record_create_params.CNAMERecordSettings
| NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_create_params.CAARecordData
| record_create_params.CERTRecordData
@@ -1463,13 +1463,13 @@ def create(
body=maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
@@ -1495,13 +1495,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1524,7 +1524,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1540,10 +1544,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1561,13 +1561,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1590,7 +1590,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1606,10 +1610,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1627,13 +1627,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1656,7 +1656,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1672,10 +1676,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1693,6 +1693,7 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -1700,7 +1701,6 @@ def update(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1723,7 +1723,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1742,10 +1746,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1763,13 +1763,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1792,7 +1792,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1808,10 +1812,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1829,13 +1829,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1858,7 +1858,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1874,10 +1878,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1895,13 +1895,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1924,7 +1924,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -1940,10 +1944,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1961,13 +1961,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -1990,7 +1990,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2011,10 +2015,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2032,13 +2032,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2061,7 +2061,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2077,10 +2081,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2098,13 +2098,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2127,7 +2127,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2143,10 +2147,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2164,13 +2164,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2193,7 +2193,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2209,10 +2213,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2230,13 +2230,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2259,7 +2259,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2275,10 +2279,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2296,13 +2296,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2325,7 +2325,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2341,10 +2345,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2362,13 +2362,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2391,7 +2391,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2407,10 +2411,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2428,13 +2428,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2457,7 +2457,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2473,10 +2477,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2494,13 +2494,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2523,7 +2523,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2539,10 +2543,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2560,13 +2560,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2589,7 +2589,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2605,10 +2609,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2626,13 +2626,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2655,7 +2655,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2671,10 +2675,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2692,13 +2692,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2721,7 +2721,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2737,10 +2741,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2758,13 +2758,13 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2787,7 +2787,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2803,10 +2807,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2824,6 +2824,7 @@ def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -2831,7 +2832,6 @@ def update(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -2854,7 +2854,11 @@ def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -2873,10 +2877,6 @@ def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2887,13 +2887,14 @@ def update(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
def update(
self,
dns_record_id: str,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -2922,7 +2923,6 @@ def update(
| record_update_params.CNAMERecordSettings
| NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_update_params.CAARecordData
| record_update_params.CERTRecordData
@@ -2954,13 +2954,13 @@ def update(
body=maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
@@ -3220,13 +3220,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3249,7 +3249,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3265,10 +3269,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3286,13 +3286,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3315,7 +3315,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3331,10 +3335,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3352,13 +3352,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3381,7 +3381,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3397,10 +3401,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3418,6 +3418,7 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -3425,7 +3426,6 @@ def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3448,7 +3448,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3467,10 +3471,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3488,13 +3488,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3517,7 +3517,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3533,10 +3537,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3554,13 +3554,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3583,7 +3583,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3599,10 +3603,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3620,13 +3620,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3649,7 +3649,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3665,10 +3669,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3686,13 +3686,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3715,7 +3715,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3736,10 +3740,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3757,13 +3757,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3786,7 +3786,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3802,10 +3806,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3823,13 +3823,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3852,7 +3852,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3868,10 +3872,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3889,13 +3889,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3918,7 +3918,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -3934,10 +3938,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -3955,13 +3955,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -3984,7 +3984,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4000,10 +4004,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4021,13 +4021,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4050,7 +4050,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4066,10 +4070,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4087,13 +4087,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4116,7 +4116,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4132,10 +4136,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4153,13 +4153,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4182,7 +4182,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4198,10 +4202,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4219,13 +4219,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4248,7 +4248,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4264,10 +4268,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4285,13 +4285,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4314,7 +4314,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4330,10 +4334,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4351,13 +4351,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4380,7 +4380,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4396,10 +4400,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4417,13 +4417,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4446,7 +4446,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4462,10 +4466,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4483,13 +4483,13 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4512,7 +4512,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4528,10 +4532,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4549,6 +4549,7 @@ def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -4556,7 +4557,6 @@ def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4579,7 +4579,11 @@ def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4598,10 +4602,6 @@ def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4612,13 +4612,14 @@ def edit(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
def edit(
self,
dns_record_id: str,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -4645,7 +4646,6 @@ def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_edit_params.CAARecordData
| record_edit_params.CERTRecordData
@@ -4677,13 +4677,13 @@ def edit(
body=maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
@@ -4931,13 +4931,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -4958,7 +4958,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -4974,10 +4978,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -4994,13 +4994,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5021,7 +5021,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5037,10 +5041,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5057,13 +5057,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5084,7 +5084,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5100,10 +5104,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5120,6 +5120,7 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -5127,7 +5128,6 @@ async def create(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5148,7 +5148,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5167,10 +5171,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5187,13 +5187,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5214,7 +5214,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5230,10 +5234,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5250,13 +5250,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5277,7 +5277,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5293,10 +5297,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5313,13 +5313,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5340,7 +5340,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5356,10 +5360,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5376,13 +5376,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5403,7 +5403,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5424,10 +5428,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5444,13 +5444,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5471,7 +5471,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5487,10 +5491,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5507,13 +5507,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5534,7 +5534,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5550,10 +5554,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5570,13 +5570,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5597,7 +5597,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5613,10 +5617,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5633,13 +5633,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5660,7 +5660,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5676,10 +5680,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5696,13 +5696,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5723,7 +5723,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5739,10 +5743,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5759,13 +5759,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5786,7 +5786,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5802,10 +5806,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5822,13 +5822,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5849,7 +5849,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5865,10 +5869,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5885,13 +5885,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5912,7 +5912,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5928,10 +5932,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -5948,13 +5948,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -5975,7 +5975,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -5991,10 +5995,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6011,13 +6011,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6038,7 +6038,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6054,10 +6058,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6074,13 +6074,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6101,7 +6101,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6117,10 +6121,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6137,13 +6137,13 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6164,7 +6164,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6180,10 +6184,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6200,6 +6200,7 @@ async def create(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -6207,7 +6208,6 @@ async def create(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6228,7 +6228,11 @@ async def create(
Args:
zone_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6247,10 +6251,6 @@ async def create(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6261,12 +6261,13 @@ async def create(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
async def create(
self,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -6295,7 +6296,6 @@ async def create(
| record_create_params.CNAMERecordSettings
| NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_create_params.CAARecordData
| record_create_params.CERTRecordData
@@ -6325,13 +6325,13 @@ async def create(
body=await async_maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
@@ -6357,13 +6357,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6386,7 +6386,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6402,10 +6406,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6423,13 +6423,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6452,7 +6452,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6468,10 +6472,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6489,13 +6489,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6518,7 +6518,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6534,10 +6538,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6555,6 +6555,7 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -6562,7 +6563,6 @@ async def update(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6585,7 +6585,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6604,10 +6608,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6625,13 +6625,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6654,7 +6654,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6670,10 +6674,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6691,13 +6691,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6720,7 +6720,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6736,10 +6740,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6757,13 +6757,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6786,7 +6786,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6802,10 +6806,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6823,13 +6823,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6852,7 +6852,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6873,10 +6877,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6894,13 +6894,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6923,7 +6923,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -6939,10 +6943,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -6960,13 +6960,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -6989,7 +6989,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7005,10 +7009,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7026,13 +7026,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7055,7 +7055,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7071,10 +7075,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7092,13 +7092,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7121,7 +7121,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7137,10 +7141,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7158,13 +7158,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7187,7 +7187,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7203,10 +7207,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7224,13 +7224,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7253,7 +7253,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7269,10 +7273,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7290,13 +7290,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7319,7 +7319,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7335,10 +7339,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7356,13 +7356,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7385,7 +7385,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7401,10 +7405,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7422,13 +7422,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7451,7 +7451,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7467,10 +7471,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7488,13 +7488,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7517,7 +7517,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7533,10 +7537,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7554,13 +7554,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7583,7 +7583,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7599,10 +7603,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7620,13 +7620,13 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7649,7 +7649,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7665,10 +7669,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7686,6 +7686,7 @@ async def update(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -7693,7 +7694,6 @@ async def update(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -7716,7 +7716,11 @@ async def update(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -7735,10 +7739,6 @@ async def update(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -7749,13 +7749,14 @@ async def update(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
async def update(
self,
dns_record_id: str,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -7784,7 +7785,6 @@ async def update(
| record_update_params.CNAMERecordSettings
| NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_update_params.CAARecordData
| record_update_params.CERTRecordData
@@ -7816,13 +7816,13 @@ async def update(
body=await async_maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
@@ -8082,13 +8082,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8111,7 +8111,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8127,10 +8131,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8148,13 +8148,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["AAAA"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8177,7 +8177,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8193,10 +8197,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8214,13 +8214,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CNAME"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8243,7 +8243,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8259,10 +8263,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8280,6 +8280,7 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["MX"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
@@ -8287,7 +8288,6 @@ async def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8310,7 +8310,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8329,10 +8333,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8350,13 +8350,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NS"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8379,7 +8379,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8395,10 +8399,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8416,13 +8416,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["OPENPGPKEY"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8445,7 +8445,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8461,10 +8465,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8482,13 +8482,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["PTR"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8511,7 +8511,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8527,10 +8531,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8548,13 +8548,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TXT"],
comment: str | NotGiven = NOT_GIVEN,
content: str | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8577,7 +8577,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8598,10 +8602,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8619,13 +8619,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CAA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8648,7 +8648,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8664,10 +8668,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8685,13 +8685,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["CERT"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8714,7 +8714,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8730,10 +8734,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8751,13 +8751,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DNSKEY"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8780,7 +8780,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8796,10 +8800,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8817,13 +8817,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["DS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8846,7 +8846,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8862,10 +8866,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8883,13 +8883,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["HTTPS"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8912,7 +8912,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8928,10 +8932,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -8949,13 +8949,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["LOC"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -8978,7 +8978,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -8994,10 +8998,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9015,13 +9015,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["NAPTR"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9044,7 +9044,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9060,10 +9064,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9081,13 +9081,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SMIMEA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9110,7 +9110,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9126,10 +9130,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9147,13 +9147,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SRV"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9176,7 +9176,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9192,10 +9196,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9213,13 +9213,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SSHFP"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9242,7 +9242,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9258,10 +9262,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9279,13 +9279,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["SVCB"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9308,7 +9308,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9324,10 +9328,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9345,13 +9345,13 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["TLSA"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9374,7 +9374,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9390,10 +9394,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9411,6 +9411,7 @@ async def edit(
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["URI"],
comment: str | NotGiven = NOT_GIVEN,
data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN,
@@ -9418,7 +9419,6 @@ async def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | 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,
@@ -9441,7 +9441,11 @@ async def edit(
dns_record_id: Identifier.
- name: DNS record name (or @ for the zone apex) in Punycode.
+ name: Complete DNS record name, including the zone name, in Punycode.
+
+ ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
+ Value must be between 60 and 86400, with the minimum reduced to 30 for
+ Enterprise zones.
type: Record type.
@@ -9460,10 +9464,6 @@ async def edit(
tags: Custom tags for the DNS record. This field has no effect on DNS responses.
- ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
- Value must be between 60 and 86400, with the minimum reduced to 30 for
- Enterprise zones.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -9474,13 +9474,14 @@ async def edit(
"""
...
- @required_args(["zone_id", "name", "type"])
+ @required_args(["zone_id", "name", "ttl", "type"])
async def edit(
self,
dns_record_id: str,
*,
zone_id: str,
name: str,
+ ttl: TTLParam,
type: Literal["A"]
| Literal["AAAA"]
| Literal["CNAME"]
@@ -9507,7 +9508,6 @@ async def edit(
proxied: bool | NotGiven = NOT_GIVEN,
settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN,
tags: List[RecordTags] | NotGiven = NOT_GIVEN,
- ttl: TTLParam | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
data: record_edit_params.CAARecordData
| record_edit_params.CERTRecordData
@@ -9539,13 +9539,13 @@ async def edit(
body=await async_maybe_transform(
{
"name": name,
+ "ttl": ttl,
"type": type,
"comment": comment,
"content": content,
"proxied": proxied,
"settings": settings,
"tags": tags,
- "ttl": ttl,
"priority": priority,
"data": data,
},
diff --git a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py
index 83bc2a2f3d2..3aee3fbb2cf 100644
--- a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py
+++ b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py
@@ -13,6 +13,7 @@
AsyncObjectsResourceWithStreamingResponse,
)
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 (
@@ -21,8 +22,9 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....pagination import SyncSinglePage, AsyncSinglePage
+from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from ...._base_client import AsyncPaginator, make_request_options
+from ....types.durable_objects import namespace_list_params
from ....types.durable_objects.namespace import Namespace
__all__ = ["NamespacesResource", "AsyncNamespacesResource"]
@@ -56,19 +58,25 @@ def list(
self,
*,
account_id: str,
+ page: int | NotGiven = NOT_GIVEN,
+ per_page: int | 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[Namespace]:
+ ) -> SyncV4PagePaginationArray[Namespace]:
"""
Returns the Durable Object namespaces owned by an account.
Args:
account_id: Identifier.
+ page: Current page.
+
+ per_page: Items per-page.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -81,9 +89,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}/workers/durable_objects/namespaces",
- page=SyncSinglePage[Namespace],
+ page=SyncV4PagePaginationArray[Namespace],
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,
+ },
+ namespace_list_params.NamespaceListParams,
+ ),
),
model=Namespace,
)
@@ -117,19 +135,25 @@ def list(
self,
*,
account_id: str,
+ page: int | NotGiven = NOT_GIVEN,
+ per_page: int | 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[Namespace, AsyncSinglePage[Namespace]]:
+ ) -> AsyncPaginator[Namespace, AsyncV4PagePaginationArray[Namespace]]:
"""
Returns the Durable Object namespaces owned by an account.
Args:
account_id: Identifier.
+ page: Current page.
+
+ per_page: Items per-page.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -142,9 +166,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}/workers/durable_objects/namespaces",
- page=AsyncSinglePage[Namespace],
+ page=AsyncV4PagePaginationArray[Namespace],
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,
+ },
+ namespace_list_params.NamespaceListParams,
+ ),
),
model=Namespace,
)
diff --git a/src/cloudflare/resources/email_security/investigate/investigate.py b/src/cloudflare/resources/email_security/investigate/investigate.py
index 519073eca2a..f1474cc5c03 100644
--- a/src/cloudflare/resources/email_security/investigate/investigate.py
+++ b/src/cloudflare/resources/email_security/investigate/investigate.py
@@ -151,6 +151,7 @@ def list(
recipient: str | NotGiven = NOT_GIVEN,
sender: str | NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ subject: 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,
@@ -242,6 +243,7 @@ def list(
"recipient": recipient,
"sender": sender,
"start": start,
+ "subject": subject,
},
investigate_list_params.InvestigateListParams,
),
@@ -361,6 +363,7 @@ def list(
recipient: str | NotGiven = NOT_GIVEN,
sender: str | NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ subject: 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,
@@ -452,6 +455,7 @@ def list(
"recipient": recipient,
"sender": sender,
"start": start,
+ "subject": subject,
},
investigate_list_params.InvestigateListParams,
),
diff --git a/src/cloudflare/resources/email_security/settings/allow_policies.py b/src/cloudflare/resources/email_security/settings/allow_policies.py
index 2b89d18d014..c59c3ec3396 100644
--- a/src/cloudflare/resources/email_security/settings/allow_policies.py
+++ b/src/cloudflare/resources/email_security/settings/allow_policies.py
@@ -144,6 +144,7 @@ def list(
is_trusted_sender: bool | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
@@ -202,6 +203,7 @@ def list(
"is_trusted_sender": is_trusted_sender,
"order": order,
"page": page,
+ "pattern": pattern,
"pattern_type": pattern_type,
"per_page": per_page,
"search": search,
@@ -482,6 +484,7 @@ def list(
is_trusted_sender: bool | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
@@ -540,6 +543,7 @@ def list(
"is_trusted_sender": is_trusted_sender,
"order": order,
"page": page,
+ "pattern": pattern,
"pattern_type": pattern_type,
"per_page": per_page,
"search": search,
diff --git a/src/cloudflare/resources/email_security/settings/block_senders.py b/src/cloudflare/resources/email_security/settings/block_senders.py
index 3bc10baf9d2..1e59f0e81f1 100644
--- a/src/cloudflare/resources/email_security/settings/block_senders.py
+++ b/src/cloudflare/resources/email_security/settings/block_senders.py
@@ -113,6 +113,7 @@ def list(
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
@@ -164,6 +165,7 @@ def list(
"direction": direction,
"order": order,
"page": page,
+ "pattern": pattern,
"pattern_type": pattern_type,
"per_page": per_page,
"search": search,
@@ -393,6 +395,7 @@ def list(
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
@@ -444,6 +447,7 @@ def list(
"direction": direction,
"order": order,
"page": page,
+ "pattern": pattern,
"pattern_type": pattern_type,
"per_page": per_page,
"search": search,
diff --git a/src/cloudflare/resources/email_security/settings/domains.py b/src/cloudflare/resources/email_security/settings/domains.py
index 2166d0607cd..a8596bc205f 100644
--- a/src/cloudflare/resources/email_security/settings/domains.py
+++ b/src/cloudflare/resources/email_security/settings/domains.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Type, Optional, cast
+from typing import List, Type, cast
from typing_extensions import Literal
import httpx
@@ -214,7 +214,7 @@ def edit(
account_id: str,
ip_restrictions: List[str],
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN,
- domain: Optional[str] | NotGiven = NOT_GIVEN,
+ domain: str | NotGiven = NOT_GIVEN,
drop_dispositions: List[
Literal[
"MALICIOUS",
@@ -231,8 +231,8 @@ def edit(
]
| NotGiven = NOT_GIVEN,
folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN,
- integration_id: Optional[str] | NotGiven = NOT_GIVEN,
- lookback_hops: Optional[int] | NotGiven = NOT_GIVEN,
+ integration_id: str | NotGiven = NOT_GIVEN,
+ lookback_hops: int | NotGiven = NOT_GIVEN,
require_tls_inbound: bool | NotGiven = NOT_GIVEN,
require_tls_outbound: bool | NotGiven = NOT_GIVEN,
transport: str | NotGiven = NOT_GIVEN,
@@ -515,7 +515,7 @@ async def edit(
account_id: str,
ip_restrictions: List[str],
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN,
- domain: Optional[str] | NotGiven = NOT_GIVEN,
+ domain: str | NotGiven = NOT_GIVEN,
drop_dispositions: List[
Literal[
"MALICIOUS",
@@ -532,8 +532,8 @@ async def edit(
]
| NotGiven = NOT_GIVEN,
folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN,
- integration_id: Optional[str] | NotGiven = NOT_GIVEN,
- lookback_hops: Optional[int] | NotGiven = NOT_GIVEN,
+ integration_id: str | NotGiven = NOT_GIVEN,
+ lookback_hops: int | NotGiven = NOT_GIVEN,
require_tls_inbound: bool | NotGiven = NOT_GIVEN,
require_tls_outbound: bool | NotGiven = NOT_GIVEN,
transport: str | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/email_security/settings/trusted_domains.py b/src/cloudflare/resources/email_security/settings/trusted_domains.py
index 1f318a5ba1b..2b23859db01 100644
--- a/src/cloudflare/resources/email_security/settings/trusted_domains.py
+++ b/src/cloudflare/resources/email_security/settings/trusted_domains.py
@@ -179,6 +179,7 @@ def list(
is_similarity: bool | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -231,6 +232,7 @@ def list(
"is_similarity": is_similarity,
"order": order,
"page": page,
+ "pattern": pattern,
"per_page": per_page,
"search": search,
},
@@ -287,11 +289,11 @@ def edit(
trusted_domain_id: int,
*,
account_id: str,
- comments: Optional[str] | NotGiven = NOT_GIVEN,
- is_recent: Optional[bool] | NotGiven = NOT_GIVEN,
- is_regex: Optional[bool] | NotGiven = NOT_GIVEN,
- is_similarity: Optional[bool] | NotGiven = NOT_GIVEN,
- pattern: Optional[str] | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ is_recent: bool | NotGiven = NOT_GIVEN,
+ is_regex: bool | NotGiven = NOT_GIVEN,
+ is_similarity: bool | NotGiven = NOT_GIVEN,
+ pattern: 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,
@@ -533,6 +535,7 @@ def list(
is_similarity: bool | NotGiven = NOT_GIVEN,
order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
+ pattern: str | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -585,6 +588,7 @@ def list(
"is_similarity": is_similarity,
"order": order,
"page": page,
+ "pattern": pattern,
"per_page": per_page,
"search": search,
},
@@ -641,11 +645,11 @@ async def edit(
trusted_domain_id: int,
*,
account_id: str,
- comments: Optional[str] | NotGiven = NOT_GIVEN,
- is_recent: Optional[bool] | NotGiven = NOT_GIVEN,
- is_regex: Optional[bool] | NotGiven = NOT_GIVEN,
- is_similarity: Optional[bool] | NotGiven = NOT_GIVEN,
- pattern: Optional[str] | NotGiven = NOT_GIVEN,
+ comments: str | NotGiven = NOT_GIVEN,
+ is_recent: bool | NotGiven = NOT_GIVEN,
+ is_regex: bool | NotGiven = NOT_GIVEN,
+ is_similarity: bool | NotGiven = NOT_GIVEN,
+ pattern: 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,
diff --git a/src/cloudflare/resources/email_security/submissions.py b/src/cloudflare/resources/email_security/submissions.py
index 1af86640ec5..e73c624ccd5 100644
--- a/src/cloudflare/resources/email_security/submissions.py
+++ b/src/cloudflare/resources/email_security/submissions.py
@@ -60,6 +60,7 @@ def list(
requested_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
| NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: str | NotGiven = NOT_GIVEN,
submission_id: str | NotGiven = NOT_GIVEN,
type: Literal["TEAM", "USER"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -111,6 +112,7 @@ def list(
"query": query,
"requested_disposition": requested_disposition,
"start": start,
+ "status": status,
"submission_id": submission_id,
"type": type,
},
@@ -155,6 +157,7 @@ def list(
requested_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
| NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: str | NotGiven = NOT_GIVEN,
submission_id: str | NotGiven = NOT_GIVEN,
type: Literal["TEAM", "USER"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -206,6 +209,7 @@ def list(
"query": query,
"requested_disposition": requested_disposition,
"start": start,
+ "status": status,
"submission_id": submission_id,
"type": type,
},
diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py
index 1081d553f48..28f38881898 100644
--- a/src/cloudflare/resources/firewall/lockdowns.py
+++ b/src/cloudflare/resources/firewall/lockdowns.py
@@ -79,8 +79,8 @@ def create(
entered URL will be escaped before use, which means you can only use simple
wildcard patterns.
- description: An informative summary of the rate limit. This value is sanitized and any tags
- will be removed.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
paused: When true, indicates that the rule is currently paused.
@@ -413,8 +413,8 @@ async def create(
entered URL will be escaped before use, which means you can only use simple
wildcard patterns.
- description: An informative summary of the rate limit. This value is sanitized and any tags
- will be removed.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
paused: When true, indicates that the rule is currently paused.
diff --git a/src/cloudflare/resources/firewall/ua_rules.py b/src/cloudflare/resources/firewall/ua_rules.py
index 5de9246f2c3..69989c1cb50 100644
--- a/src/cloudflare/resources/firewall/ua_rules.py
+++ b/src/cloudflare/resources/firewall/ua_rules.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, cast
+from typing import Type, cast
from typing_extensions import Literal
import httpx
@@ -56,6 +56,8 @@ def create(
zone_id: str,
configuration: ua_rule_create_params.Configuration,
mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"],
+ description: str | NotGiven = NOT_GIVEN,
+ paused: bool | 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,
@@ -71,6 +73,11 @@ def create(
mode: The action to apply to a matched request.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
+
+ paused: When true, indicates that the rule is currently paused.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -81,28 +88,25 @@ def create(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- UARuleCreateResponse,
- self._post(
- f"/zones/{zone_id}/firewall/ua_rules",
- body=maybe_transform(
- {
- "configuration": configuration,
- "mode": mode,
- },
- ua_rule_create_params.UARuleCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._post(
+ f"/zones/{zone_id}/firewall/ua_rules",
+ body=maybe_transform(
+ {
+ "configuration": configuration,
+ "mode": mode,
+ "description": description,
+ "paused": paused,
+ },
+ ua_rule_create_params.UARuleCreateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]),
)
def update(
@@ -112,6 +116,8 @@ def update(
zone_id: str,
configuration: ua_rule_update_params.Configuration,
mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"],
+ description: str | NotGiven = NOT_GIVEN,
+ paused: bool | 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,
@@ -131,6 +137,11 @@ def update(
mode: The action to apply to a matched request.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
+
+ paused: When true, indicates that the rule is currently paused.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -143,28 +154,25 @@ def update(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not ua_rule_id:
raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}")
- return cast(
- UARuleUpdateResponse,
- self._put(
- f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
- body=maybe_transform(
- {
- "configuration": configuration,
- "mode": mode,
- },
- ua_rule_update_params.UARuleUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._put(
+ f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
+ body=maybe_transform(
+ {
+ "configuration": configuration,
+ "mode": mode,
+ "description": description,
+ "paused": paused,
+ },
+ ua_rule_update_params.UARuleUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]),
)
def list(
@@ -172,10 +180,10 @@ def list(
*,
zone_id: str,
description: str | NotGiven = NOT_GIVEN,
- description_search: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
+ paused: bool | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- ua_search: str | NotGiven = NOT_GIVEN,
+ user_agent: 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,
@@ -193,14 +201,14 @@ def list(
description: A string to search for in the description of existing rules.
- description_search: A string to search for in the description of existing rules.
-
page: Page number of paginated results.
+ paused: When true, indicates that the rule is currently paused.
+
per_page: The maximum number of results per page. You can only set the value to `1` or to
a multiple of 5 such as `5`, `10`, `15`, or `20`.
- ua_search: A string to search for in the user agent values of existing rules.
+ user_agent: A string to search for in the user agent values of existing rules.
extra_headers: Send extra headers
@@ -223,10 +231,10 @@ def list(
query=maybe_transform(
{
"description": description,
- "description_search": description_search,
"page": page,
+ "paused": paused,
"per_page": per_page,
- "ua_search": ua_search,
+ "user_agent": user_agent,
},
ua_rule_list_params.UARuleListParams,
),
@@ -310,21 +318,16 @@ def get(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not ua_rule_id:
raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}")
- return cast(
- UARuleGetResponse,
- self._get(
- f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleGetResponse]._unwrapper,
),
+ cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]),
)
@@ -354,6 +357,8 @@ async def create(
zone_id: str,
configuration: ua_rule_create_params.Configuration,
mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"],
+ description: str | NotGiven = NOT_GIVEN,
+ paused: bool | 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,
@@ -369,6 +374,11 @@ async def create(
mode: The action to apply to a matched request.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
+
+ paused: When true, indicates that the rule is currently paused.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -379,28 +389,25 @@ async def create(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return cast(
- UARuleCreateResponse,
- await self._post(
- f"/zones/{zone_id}/firewall/ua_rules",
- body=await async_maybe_transform(
- {
- "configuration": configuration,
- "mode": mode,
- },
- ua_rule_create_params.UARuleCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._post(
+ f"/zones/{zone_id}/firewall/ua_rules",
+ body=await async_maybe_transform(
+ {
+ "configuration": configuration,
+ "mode": mode,
+ "description": description,
+ "paused": paused,
+ },
+ ua_rule_create_params.UARuleCreateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]),
)
async def update(
@@ -410,6 +417,8 @@ async def update(
zone_id: str,
configuration: ua_rule_update_params.Configuration,
mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"],
+ description: str | NotGiven = NOT_GIVEN,
+ paused: bool | 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,
@@ -429,6 +438,11 @@ async def update(
mode: The action to apply to a matched request.
+ description: An informative summary of the rule. This value is sanitized and any tags will be
+ removed.
+
+ paused: When true, indicates that the rule is currently paused.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -441,28 +455,25 @@ async def update(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not ua_rule_id:
raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}")
- return cast(
- UARuleUpdateResponse,
- await self._put(
- f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
- body=await async_maybe_transform(
- {
- "configuration": configuration,
- "mode": mode,
- },
- ua_rule_update_params.UARuleUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._put(
+ f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
+ body=await async_maybe_transform(
+ {
+ "configuration": configuration,
+ "mode": mode,
+ "description": description,
+ "paused": paused,
+ },
+ ua_rule_update_params.UARuleUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]),
)
def list(
@@ -470,10 +481,10 @@ def list(
*,
zone_id: str,
description: str | NotGiven = NOT_GIVEN,
- description_search: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
+ paused: bool | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- ua_search: str | NotGiven = NOT_GIVEN,
+ user_agent: 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,
@@ -491,14 +502,14 @@ def list(
description: A string to search for in the description of existing rules.
- description_search: A string to search for in the description of existing rules.
-
page: Page number of paginated results.
+ paused: When true, indicates that the rule is currently paused.
+
per_page: The maximum number of results per page. You can only set the value to `1` or to
a multiple of 5 such as `5`, `10`, `15`, or `20`.
- ua_search: A string to search for in the user agent values of existing rules.
+ user_agent: A string to search for in the user agent values of existing rules.
extra_headers: Send extra headers
@@ -521,10 +532,10 @@ def list(
query=maybe_transform(
{
"description": description,
- "description_search": description_search,
"page": page,
+ "paused": paused,
"per_page": per_page,
- "ua_search": ua_search,
+ "user_agent": user_agent,
},
ua_rule_list_params.UARuleListParams,
),
@@ -608,21 +619,16 @@ async def get(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not ua_rule_id:
raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}")
- return cast(
- UARuleGetResponse,
- await self._get(
- f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[UARuleGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[UARuleGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[UARuleGetResponse]._unwrapper,
),
+ cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]),
)
diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py
index ba977432b3c..9376308d7bf 100644
--- a/src/cloudflare/resources/hyperdrive/configs.py
+++ b/src/cloudflare/resources/hyperdrive/configs.py
@@ -53,6 +53,7 @@ def create(
origin: config_create_params.Origin,
caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -66,6 +67,9 @@ def create(
Args:
account_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -84,6 +88,7 @@ def create(
"origin": origin,
"caching": caching,
"mtls": mtls,
+ "origin_connection_limit": origin_connection_limit,
},
config_create_params.ConfigCreateParams,
),
@@ -106,6 +111,7 @@ def update(
origin: config_update_params.Origin,
caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -121,6 +127,9 @@ def update(
hyperdrive_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -141,6 +150,7 @@ def update(
"origin": origin,
"caching": caching,
"mtls": mtls,
+ "origin_connection_limit": origin_connection_limit,
},
config_update_params.ConfigUpdateParams,
),
@@ -243,6 +253,7 @@ def edit(
mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
origin: config_edit_params.Origin | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -260,6 +271,9 @@ def edit(
hyperdrive_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -280,6 +294,7 @@ def edit(
"mtls": mtls,
"name": name,
"origin": origin,
+ "origin_connection_limit": origin_connection_limit,
},
config_edit_params.ConfigEditParams,
),
@@ -366,6 +381,7 @@ async def create(
origin: config_create_params.Origin,
caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -379,6 +395,9 @@ async def create(
Args:
account_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -397,6 +416,7 @@ async def create(
"origin": origin,
"caching": caching,
"mtls": mtls,
+ "origin_connection_limit": origin_connection_limit,
},
config_create_params.ConfigCreateParams,
),
@@ -419,6 +439,7 @@ async def update(
origin: config_update_params.Origin,
caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -434,6 +455,9 @@ async def update(
hyperdrive_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -454,6 +478,7 @@ async def update(
"origin": origin,
"caching": caching,
"mtls": mtls,
+ "origin_connection_limit": origin_connection_limit,
},
config_update_params.ConfigUpdateParams,
),
@@ -556,6 +581,7 @@ async def edit(
mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
origin: config_edit_params.Origin | NotGiven = NOT_GIVEN,
+ origin_connection_limit: int | 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,
@@ -573,6 +599,9 @@ async def edit(
hyperdrive_id: Define configurations using a unique string identifier.
+ origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -593,6 +622,7 @@ async def edit(
"mtls": mtls,
"name": name,
"origin": origin,
+ "origin_connection_limit": origin_connection_limit,
},
config_edit_params.ConfigEditParams,
),
diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py
index dda2c2061d3..9f38796d708 100644
--- a/src/cloudflare/resources/images/v1/v1.py
+++ b/src/cloudflare/resources/images/v1/v1.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import typing_extensions
-from typing import Any, Type, cast
+from typing import Any, Type, Mapping, Optional, cast
import httpx
@@ -39,8 +39,8 @@
VariantsResourceWithStreamingResponse,
AsyncVariantsResourceWithStreamingResponse,
)
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import maybe_transform, async_maybe_transform
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@@ -100,7 +100,9 @@ def create(
self,
*,
account_id: str,
- file: object | NotGiven = NOT_GIVEN,
+ id: str | NotGiven = NOT_GIVEN,
+ creator: str | NotGiven = NOT_GIVEN,
+ file: FileTypes | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
@@ -119,6 +121,10 @@ def create(
Args:
account_id: Account identifier tag.
+ id: An optional custom unique identifier for your image.
+
+ creator: Can set the creator field with an internal user ID.
+
file: An image binary data. Only needed when type is uploading a file.
metadata: User modifiable key-value store. Can use used for keeping references to another
@@ -139,21 +145,25 @@ def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ body = deepcopy_minimal(
+ {
+ "id": id,
+ "creator": creator,
+ "file": file,
+ "metadata": metadata,
+ "require_signed_urls": require_signed_urls,
+ "url": url,
+ }
+ )
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._post(
f"/accounts/{account_id}/images/v1",
- body=maybe_transform(
- {
- "file": file,
- "metadata": metadata,
- "require_signed_urls": require_signed_urls,
- "url": url,
- },
- v1_create_params.V1CreateParams,
- ),
+ body=maybe_transform(body, v1_create_params.V1CreateParams),
+ files=files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -169,6 +179,7 @@ def list(
self,
*,
account_id: str,
+ creator: Optional[str] | NotGiven = NOT_GIVEN,
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.
@@ -186,6 +197,9 @@ def list(
Args:
account_id: Account identifier tag.
+ creator: Internal user ID set within the creator field. Setting to empty string "" will
+ return images where creator field is not set
+
page: Page number of paginated results.
per_page: Number of items per page.
@@ -210,6 +224,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "creator": creator,
"page": page,
"per_page": per_page,
},
@@ -275,6 +290,7 @@ def edit(
image_id: str,
*,
account_id: str,
+ creator: str | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -294,6 +310,8 @@ def edit(
image_id: Image unique identifier.
+ creator: Can set the creator field with an internal user ID.
+
metadata: User modifiable key-value store. Can be used for keeping references to another
system of record for managing images. No change if not specified.
@@ -317,6 +335,7 @@ def edit(
f"/accounts/{account_id}/images/v1/{image_id}",
body=maybe_transform(
{
+ "creator": creator,
"metadata": metadata,
"require_signed_urls": require_signed_urls,
},
@@ -417,7 +436,9 @@ async def create(
self,
*,
account_id: str,
- file: object | NotGiven = NOT_GIVEN,
+ id: str | NotGiven = NOT_GIVEN,
+ creator: str | NotGiven = NOT_GIVEN,
+ file: FileTypes | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
@@ -436,6 +457,10 @@ async def create(
Args:
account_id: Account identifier tag.
+ id: An optional custom unique identifier for your image.
+
+ creator: Can set the creator field with an internal user ID.
+
file: An image binary data. Only needed when type is uploading a file.
metadata: User modifiable key-value store. Can use used for keeping references to another
@@ -456,21 +481,25 @@ async def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ body = deepcopy_minimal(
+ {
+ "id": id,
+ "creator": creator,
+ "file": file,
+ "metadata": metadata,
+ "require_signed_urls": require_signed_urls,
+ "url": url,
+ }
+ )
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._post(
f"/accounts/{account_id}/images/v1",
- body=await async_maybe_transform(
- {
- "file": file,
- "metadata": metadata,
- "require_signed_urls": require_signed_urls,
- "url": url,
- },
- v1_create_params.V1CreateParams,
- ),
+ body=await async_maybe_transform(body, v1_create_params.V1CreateParams),
+ files=files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -486,6 +515,7 @@ def list(
self,
*,
account_id: str,
+ creator: Optional[str] | NotGiven = NOT_GIVEN,
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.
@@ -503,6 +533,9 @@ def list(
Args:
account_id: Account identifier tag.
+ creator: Internal user ID set within the creator field. Setting to empty string "" will
+ return images where creator field is not set
+
page: Page number of paginated results.
per_page: Number of items per page.
@@ -527,6 +560,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "creator": creator,
"page": page,
"per_page": per_page,
},
@@ -592,6 +626,7 @@ async def edit(
image_id: str,
*,
account_id: str,
+ creator: str | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -611,6 +646,8 @@ async def edit(
image_id: Image unique identifier.
+ creator: Can set the creator field with an internal user ID.
+
metadata: User modifiable key-value store. Can be used for keeping references to another
system of record for managing images. No change if not specified.
@@ -634,6 +671,7 @@ async def edit(
f"/accounts/{account_id}/images/v1/{image_id}",
body=await async_maybe_transform(
{
+ "creator": creator,
"metadata": metadata,
"require_signed_urls": require_signed_urls,
},
diff --git a/src/cloudflare/resources/images/v2/direct_uploads.py b/src/cloudflare/resources/images/v2/direct_uploads.py
index cd30c813f89..e062f971ec3 100644
--- a/src/cloudflare/resources/images/v2/direct_uploads.py
+++ b/src/cloudflare/resources/images/v2/direct_uploads.py
@@ -50,6 +50,7 @@ def create(
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
+ creator: str | NotGiven = NOT_GIVEN,
expiry: Union[str, datetime] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
@@ -77,6 +78,8 @@ def create(
and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a
UUID.
+ creator: Can set the creator field with an internal user ID.
+
expiry: The date after which the upload will not be accepted. Minimum: Now + 2 minutes.
Maximum: Now + 6 hours.
@@ -104,6 +107,7 @@ def create(
body=maybe_transform(
{
"id": id,
+ "creator": creator,
"expiry": expiry,
"metadata": metadata,
"require_signed_urls": require_signed_urls,
@@ -146,6 +150,7 @@ async def create(
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
+ creator: str | NotGiven = NOT_GIVEN,
expiry: Union[str, datetime] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
@@ -173,6 +178,8 @@ async def create(
and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a
UUID.
+ creator: Can set the creator field with an internal user ID.
+
expiry: The date after which the upload will not be accepted. Minimum: Now + 2 minutes.
Maximum: Now + 6 hours.
@@ -200,6 +207,7 @@ async def create(
body=await async_maybe_transform(
{
"id": id,
+ "creator": creator,
"expiry": expiry,
"metadata": metadata,
"require_signed_urls": require_signed_urls,
diff --git a/src/cloudflare/resources/images/v2/v2.py b/src/cloudflare/resources/images/v2/v2.py
index 0e821133e77..a882d45b3a1 100644
--- a/src/cloudflare/resources/images/v2/v2.py
+++ b/src/cloudflare/resources/images/v2/v2.py
@@ -62,6 +62,7 @@ def list(
*,
account_id: str,
continuation_token: Optional[str] | NotGiven = NOT_GIVEN,
+ creator: Optional[str] | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -82,6 +83,9 @@ def list(
continuation_token: Continuation token for a next page. List images V2 returns continuation_token
+ creator: Internal user ID set within the creator field. Setting to empty string "" will
+ return images where creator field is not set
+
per_page: Number of items per page.
sort_order: Sorting order by upload time.
@@ -106,6 +110,7 @@ def list(
query=maybe_transform(
{
"continuation_token": continuation_token,
+ "creator": creator,
"per_page": per_page,
"sort_order": sort_order,
},
@@ -146,6 +151,7 @@ async def list(
*,
account_id: str,
continuation_token: Optional[str] | NotGiven = NOT_GIVEN,
+ creator: Optional[str] | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -166,6 +172,9 @@ async def list(
continuation_token: Continuation token for a next page. List images V2 returns continuation_token
+ creator: Internal user ID set within the creator field. Setting to empty string "" will
+ return images where creator field is not set
+
per_page: Number of items per page.
sort_order: Sorting order by upload time.
@@ -190,6 +199,7 @@ async def list(
query=await async_maybe_transform(
{
"continuation_token": continuation_token,
+ "creator": creator,
"per_page": per_page,
"sort_order": sort_order,
},
diff --git a/src/cloudflare/resources/kv/namespaces/keys.py b/src/cloudflare/resources/kv/namespaces/keys.py
index 6b5b71f0bb4..0b7d1e61b4d 100644
--- a/src/cloudflare/resources/kv/namespaces/keys.py
+++ b/src/cloudflare/resources/kv/namespaces/keys.py
@@ -69,7 +69,7 @@ def list(
Lists a namespace's keys.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -78,11 +78,11 @@ def list(
parameter. A valid value for the cursor can be obtained from the `cursors`
object in the `result_info` structure.
- limit: The number of keys to return. The cursor attribute may be used to iterate over
- the next batch of keys if there are more than the limit.
+ limit: Limits the number of keys returned in the response. The cursor attribute may be
+ used to iterate over the next batch of keys if there are more than the limit.
- prefix: A string prefix used to filter down which keys will be returned. Exact matches
- and any key names that begin with the prefix will be returned.
+ prefix: Filters returned keys by a name prefix. Exact matches and any key names that
+ begin with the prefix will be returned.
extra_headers: Send extra headers
@@ -136,7 +136,7 @@ def bulk_delete(
10,000 keys to be removed.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -181,23 +181,22 @@ def bulk_get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[KeyBulkGetResponse]:
- """Get multiple KV pairs from the namespace.
+ """Retrieve up to 100 KV pairs from the namespace.
- Body should contain keys to retrieve
- at most 100. Keys must contain text-based values. If value is json, it can be
- requested to return in JSON, instead of string. Metadata can be return if
- withMetadata is true.
+ Keys must contain text-based
+ values. JSON values can optionally be parsed instead of being returned as a
+ string value. Metadata can be included if `withMetadata` is true.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
- keys: Array of keys to retrieve (maximum 100)
+ keys: Array of keys to retrieve (maximum of 100).
- type: Whether to parse JSON values in the response
+ type: Whether to parse JSON values in the response.
- with_metadata: Whether to include metadata in the response
+ with_metadata: Whether to include metadata in the response.
extra_headers: Send extra headers
@@ -260,7 +259,7 @@ def bulk_update(
size must be 100 megabytes or less.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -329,7 +328,7 @@ def list(
Lists a namespace's keys.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -338,11 +337,11 @@ def list(
parameter. A valid value for the cursor can be obtained from the `cursors`
object in the `result_info` structure.
- limit: The number of keys to return. The cursor attribute may be used to iterate over
- the next batch of keys if there are more than the limit.
+ limit: Limits the number of keys returned in the response. The cursor attribute may be
+ used to iterate over the next batch of keys if there are more than the limit.
- prefix: A string prefix used to filter down which keys will be returned. Exact matches
- and any key names that begin with the prefix will be returned.
+ prefix: Filters returned keys by a name prefix. Exact matches and any key names that
+ begin with the prefix will be returned.
extra_headers: Send extra headers
@@ -396,7 +395,7 @@ async def bulk_delete(
10,000 keys to be removed.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -441,23 +440,22 @@ async def bulk_get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[KeyBulkGetResponse]:
- """Get multiple KV pairs from the namespace.
+ """Retrieve up to 100 KV pairs from the namespace.
- Body should contain keys to retrieve
- at most 100. Keys must contain text-based values. If value is json, it can be
- requested to return in JSON, instead of string. Metadata can be return if
- withMetadata is true.
+ Keys must contain text-based
+ values. JSON values can optionally be parsed instead of being returned as a
+ string value. Metadata can be included if `withMetadata` is true.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
- keys: Array of keys to retrieve (maximum 100)
+ keys: Array of keys to retrieve (maximum of 100).
- type: Whether to parse JSON values in the response
+ type: Whether to parse JSON values in the response.
- with_metadata: Whether to include metadata in the response
+ with_metadata: Whether to include metadata in the response.
extra_headers: Send extra headers
@@ -520,7 +518,7 @@ async def bulk_update(
size must be 100 megabytes or less.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
diff --git a/src/cloudflare/resources/kv/namespaces/metadata.py b/src/cloudflare/resources/kv/namespaces/metadata.py
index fd5a0d2dad7..427734d81d1 100644
--- a/src/cloudflare/resources/kv/namespaces/metadata.py
+++ b/src/cloudflare/resources/kv/namespaces/metadata.py
@@ -17,7 +17,6 @@
)
from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
-from ....types.kv.namespaces.metadata_get_response import MetadataGetResponse
__all__ = ["MetadataResource", "AsyncMetadataResource"]
@@ -54,7 +53,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MetadataGetResponse]:
+ ) -> object:
"""Returns the metadata associated with the given key in the given namespace.
Use
@@ -62,7 +61,7 @@ def get(
name.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -90,9 +89,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
- cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
@@ -128,7 +127,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MetadataGetResponse]:
+ ) -> object:
"""Returns the metadata associated with the given key in the given namespace.
Use
@@ -136,7 +135,7 @@ async def get(
name.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -164,9 +163,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
),
- cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py
index d033b2e28ab..d62c027d72b 100644
--- a/src/cloudflare/resources/kv/namespaces/namespaces.py
+++ b/src/cloudflare/resources/kv/namespaces/namespaces.py
@@ -111,7 +111,7 @@ def create(
to be replaced.
Args:
- account_id: Identifier
+ account_id: Identifier.
title: A human-readable string name for a Namespace.
@@ -155,7 +155,7 @@ def update(
Modifies a namespace's title.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -205,7 +205,7 @@ def list(
Returns the namespaces owned by an account.
Args:
- account_id: Identifier
+ account_id: Identifier.
direction: Direction to order namespaces.
@@ -262,7 +262,7 @@ def delete(
Deletes the namespace corresponding to the given ID.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -309,7 +309,7 @@ def bulk_delete(
10,000 keys to be removed.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -353,23 +353,22 @@ def bulk_get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NamespaceBulkGetResponse]:
- """Get multiple KV pairs from the namespace.
+ """Retrieve up to 100 KV pairs from the namespace.
- Body should contain keys to retrieve
- at most 100. Keys must contain text-based values. If value is json, it can be
- requested to return in JSON, instead of string. Metadata can be return if
- withMetadata is true.
+ Keys must contain text-based
+ values. JSON values can optionally be parsed instead of being returned as a
+ string value. Metadata can be included if `withMetadata` is true.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
- keys: Array of keys to retrieve (maximum 100)
+ keys: Array of keys to retrieve (maximum of 100).
- type: Whether to parse JSON values in the response
+ type: Whether to parse JSON values in the response.
- with_metadata: Whether to include metadata in the response
+ with_metadata: Whether to include metadata in the response.
extra_headers: Send extra headers
@@ -431,7 +430,7 @@ def bulk_update(
size must be 100 megabytes or less.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -476,7 +475,7 @@ def get(
Get the namespace corresponding to the given ID.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -556,7 +555,7 @@ async def create(
to be replaced.
Args:
- account_id: Identifier
+ account_id: Identifier.
title: A human-readable string name for a Namespace.
@@ -600,7 +599,7 @@ async def update(
Modifies a namespace's title.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -650,7 +649,7 @@ def list(
Returns the namespaces owned by an account.
Args:
- account_id: Identifier
+ account_id: Identifier.
direction: Direction to order namespaces.
@@ -707,7 +706,7 @@ async def delete(
Deletes the namespace corresponding to the given ID.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -754,7 +753,7 @@ async def bulk_delete(
10,000 keys to be removed.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -798,23 +797,22 @@ async def bulk_get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NamespaceBulkGetResponse]:
- """Get multiple KV pairs from the namespace.
+ """Retrieve up to 100 KV pairs from the namespace.
- Body should contain keys to retrieve
- at most 100. Keys must contain text-based values. If value is json, it can be
- requested to return in JSON, instead of string. Metadata can be return if
- withMetadata is true.
+ Keys must contain text-based
+ values. JSON values can optionally be parsed instead of being returned as a
+ string value. Metadata can be included if `withMetadata` is true.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
- keys: Array of keys to retrieve (maximum 100)
+ keys: Array of keys to retrieve (maximum of 100).
- type: Whether to parse JSON values in the response
+ type: Whether to parse JSON values in the response.
- with_metadata: Whether to include metadata in the response
+ with_metadata: Whether to include metadata in the response.
extra_headers: Send extra headers
@@ -876,7 +874,7 @@ async def bulk_update(
size must be 100 megabytes or less.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -921,7 +919,7 @@ async def get(
Get the namespace corresponding to the given ID.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py
index 05e3e187510..dcf75b5d847 100644
--- a/src/cloudflare/resources/kv/namespaces/values.py
+++ b/src/cloudflare/resources/kv/namespaces/values.py
@@ -59,10 +59,10 @@ def update(
*,
account_id: str,
namespace_id: str,
- metadata: str,
value: str,
expiration: float | NotGiven = NOT_GIVEN,
expiration_ttl: float | NotGiven = NOT_GIVEN,
+ metadata: object | 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,
@@ -82,22 +82,19 @@ def update(
`expiration` is ignored.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace
characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata: Arbitrary JSON to be associated with a key/value pair.
-
value: A byte sequence to be stored, up to 25 MiB in length.
- expiration: The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ expiration: Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
- expiration_ttl: The number of seconds for which the key should be visible before it expires. At
- least 60.
+ expiration_ttl: Expires the key after a number of seconds. Must be at least 60.
extra_headers: Send extra headers
@@ -113,12 +110,16 @@ def update(
raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}")
if not key_name:
raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}")
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}",
body=maybe_transform(
{
- "metadata": metadata,
"value": value,
+ "metadata": metadata,
},
value_update_params.ValueUpdateParams,
),
@@ -158,7 +159,7 @@ def delete(
(for example, `:`, `!`, `%`) in the key name.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -213,7 +214,7 @@ def get(
response header.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -270,10 +271,10 @@ async def update(
*,
account_id: str,
namespace_id: str,
- metadata: str,
value: str,
expiration: float | NotGiven = NOT_GIVEN,
expiration_ttl: float | NotGiven = NOT_GIVEN,
+ metadata: object | 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,
@@ -293,22 +294,19 @@ async def update(
`expiration` is ignored.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace
characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata: Arbitrary JSON to be associated with a key/value pair.
-
value: A byte sequence to be stored, up to 25 MiB in length.
- expiration: The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ expiration: Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
- expiration_ttl: The number of seconds for which the key should be visible before it expires. At
- least 60.
+ expiration_ttl: Expires the key after a number of seconds. Must be at least 60.
extra_headers: Send extra headers
@@ -324,12 +322,16 @@ async def update(
raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}")
if not key_name:
raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}")
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}",
body=await async_maybe_transform(
{
- "metadata": metadata,
"value": value,
+ "metadata": metadata,
},
value_update_params.ValueUpdateParams,
),
@@ -369,7 +371,7 @@ async def delete(
(for example, `:`, `!`, `%`) in the key name.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
@@ -424,7 +426,7 @@ async def get(
response header.
Args:
- account_id: Identifier
+ account_id: Identifier.
namespace_id: Namespace identifier tag.
diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py
index fd6b3035775..54e630e567f 100644
--- a/src/cloudflare/resources/logpush/jobs.py
+++ b/src/cloudflare/resources/logpush/jobs.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Optional, cast
+from typing import Type, Union, Optional, cast
from typing_extensions import Literal
import httpx
@@ -86,11 +86,11 @@ def create(
enabled: bool | NotGiven = NOT_GIVEN,
filter: Optional[str] | NotGiven = NOT_GIVEN,
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
- kind: Literal["edge"] | NotGiven = NOT_GIVEN,
+ kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
logpull_options: Optional[str] | NotGiven = NOT_GIVEN,
- max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
+ max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -128,8 +128,7 @@ def create(
frequency to low sends logs in smaller quantities of larger files.
kind: The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It
specifies things like requested fields and timestamp formats. If migrating from
@@ -140,19 +139,17 @@ def create(
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
minimum file size; this means that log files may be much smaller than this batch
- size. This parameter is not available for jobs with `edge` as its kind.
+ size.
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
a minimum interval for log batches; this means that log files may be sent in
- shorter intervals than this. This parameter is only used for jobs with `edge` as
- its kind.
+ shorter intervals than this.
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
number of log lines per batch; this means that log files may contain many fewer
- lines than this. This parameter is not available for jobs with `edge` as its
- kind.
+ lines than this.
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
this to a meaningful string, like the domain name, to make it easier to identify
@@ -223,11 +220,11 @@ def update(
enabled: bool | NotGiven = NOT_GIVEN,
filter: Optional[str] | NotGiven = NOT_GIVEN,
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
- kind: Literal["edge"] | NotGiven = NOT_GIVEN,
+ kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
logpull_options: Optional[str] | NotGiven = NOT_GIVEN,
- max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
+ max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -264,8 +261,7 @@ def update(
frequency to low sends logs in smaller quantities of larger files.
kind: The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It
specifies things like requested fields and timestamp formats. If migrating from
@@ -276,19 +272,17 @@ def update(
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
minimum file size; this means that log files may be much smaller than this batch
- size. This parameter is not available for jobs with `edge` as its kind.
+ size.
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
a minimum interval for log batches; this means that log files may be sent in
- shorter intervals than this. This parameter is only used for jobs with `edge` as
- its kind.
+ shorter intervals than this.
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
number of log lines per batch; this means that log files may contain many fewer
- lines than this. This parameter is not available for jobs with `edge` as its
- kind.
+ lines than this.
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
this to a meaningful string, like the domain name, to make it easier to identify
@@ -566,11 +560,11 @@ async def create(
enabled: bool | NotGiven = NOT_GIVEN,
filter: Optional[str] | NotGiven = NOT_GIVEN,
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
- kind: Literal["edge"] | NotGiven = NOT_GIVEN,
+ kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
logpull_options: Optional[str] | NotGiven = NOT_GIVEN,
- max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
+ max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -608,8 +602,7 @@ async def create(
frequency to low sends logs in smaller quantities of larger files.
kind: The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It
specifies things like requested fields and timestamp formats. If migrating from
@@ -620,19 +613,17 @@ async def create(
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
minimum file size; this means that log files may be much smaller than this batch
- size. This parameter is not available for jobs with `edge` as its kind.
+ size.
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
a minimum interval for log batches; this means that log files may be sent in
- shorter intervals than this. This parameter is only used for jobs with `edge` as
- its kind.
+ shorter intervals than this.
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
number of log lines per batch; this means that log files may contain many fewer
- lines than this. This parameter is not available for jobs with `edge` as its
- kind.
+ lines than this.
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
this to a meaningful string, like the domain name, to make it easier to identify
@@ -703,11 +694,11 @@ async def update(
enabled: bool | NotGiven = NOT_GIVEN,
filter: Optional[str] | NotGiven = NOT_GIVEN,
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
- kind: Literal["edge"] | NotGiven = NOT_GIVEN,
+ kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
logpull_options: Optional[str] | NotGiven = NOT_GIVEN,
- max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
- max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
+ max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
+ max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -744,8 +735,7 @@ async def update(
frequency to low sends logs in smaller quantities of larger files.
kind: The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It
specifies things like requested fields and timestamp formats. If migrating from
@@ -756,19 +746,17 @@ async def update(
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
minimum file size; this means that log files may be much smaller than this batch
- size. This parameter is not available for jobs with `edge` as its kind.
+ size.
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
a minimum interval for log batches; this means that log files may be sent in
- shorter intervals than this. This parameter is only used for jobs with `edge` as
- its kind.
+ shorter intervals than this.
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
number of log lines per batch; this means that log files may contain many fewer
- lines than this. This parameter is not available for jobs with `edge` as its
- kind.
+ lines than this.
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
this to a meaningful string, like the domain name, to make it easier to identify
diff --git a/src/cloudflare/resources/magic_transit/cf_interconnects.py b/src/cloudflare/resources/magic_transit/cf_interconnects.py
index d3b39b16c03..290339c7060 100644
--- a/src/cloudflare/resources/magic_transit/cf_interconnects.py
+++ b/src/cloudflare/resources/magic_transit/cf_interconnects.py
@@ -57,6 +57,7 @@ def update(
gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN,
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
interface_address: str | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -85,6 +86,11 @@ def update(
of the tunnel. Select the subnet from the following private IP space:
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
value is 576.
@@ -118,6 +124,7 @@ def update(
"gre": gre,
"health_check": health_check,
"interface_address": interface_address,
+ "interface_address6": interface_address6,
"mtu": mtu,
},
cf_interconnect_update_params.CfInterconnectUpdateParams,
@@ -322,6 +329,7 @@ async def update(
gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN,
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
interface_address: str | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -350,6 +358,11 @@ async def update(
of the tunnel. Select the subnet from the following private IP space:
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
value is 576.
@@ -383,6 +396,7 @@ async def update(
"gre": gre,
"health_check": health_check,
"interface_address": interface_address,
+ "interface_address6": interface_address6,
"mtu": mtu,
},
cf_interconnect_update_params.CfInterconnectUpdateParams,
diff --git a/src/cloudflare/resources/magic_transit/connectors/connectors.py b/src/cloudflare/resources/magic_transit/connectors/connectors.py
index 0af23684c7b..c22d2084c31 100644
--- a/src/cloudflare/resources/magic_transit/connectors/connectors.py
+++ b/src/cloudflare/resources/magic_transit/connectors/connectors.py
@@ -35,10 +35,12 @@
SnapshotsResourceWithStreamingResponse,
AsyncSnapshotsResourceWithStreamingResponse,
)
-from ....types.magic_transit import connector_edit_params, connector_update_params
+from ....types.magic_transit import connector_edit_params, connector_create_params, connector_update_params
from ....types.magic_transit.connector_get_response import ConnectorGetResponse
from ....types.magic_transit.connector_edit_response import ConnectorEditResponse
from ....types.magic_transit.connector_list_response import ConnectorListResponse
+from ....types.magic_transit.connector_create_response import ConnectorCreateResponse
+from ....types.magic_transit.connector_delete_response import ConnectorDeleteResponse
from ....types.magic_transit.connector_update_response import ConnectorUpdateResponse
__all__ = ["ConnectorsResource", "AsyncConnectorsResource"]
@@ -72,6 +74,62 @@ def with_streaming_response(self) -> ConnectorsResourceWithStreamingResponse:
"""
return ConnectorsResourceWithStreamingResponse(self)
+ def create(
+ self,
+ *,
+ account_id: str,
+ device: connector_create_params.Device,
+ activated: bool | NotGiven = NOT_GIVEN,
+ interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN,
+ interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN,
+ notes: str | NotGiven = NOT_GIVEN,
+ timezone: 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,
+ ) -> ConnectorCreateResponse:
+ """
+ Add a connector to your account
+
+ Args:
+ account_id: Account identifier
+
+ 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._post(
+ f"/accounts/{account_id}/magic/connectors",
+ body=maybe_transform(
+ {
+ "device": device,
+ "activated": activated,
+ "interrupt_window_duration_hours": interrupt_window_duration_hours,
+ "interrupt_window_hour_of_day": interrupt_window_hour_of_day,
+ "notes": notes,
+ "timezone": timezone,
+ },
+ connector_create_params.ConnectorCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]),
+ )
+
def update(
self,
connector_id: str,
@@ -165,6 +223,48 @@ def list(
model=ConnectorListResponse,
)
+ def delete(
+ self,
+ connector_id: str,
+ *,
+ 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,
+ ) -> ConnectorDeleteResponse:
+ """
+ Remove a connector from your account
+
+ Args:
+ account_id: Account identifier
+
+ 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 connector_id:
+ raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/magic/connectors/{connector_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]),
+ )
+
def edit(
self,
connector_id: str,
@@ -183,7 +283,7 @@ def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConnectorEditResponse:
"""
- Update Connector
+ Edit Connector to update specific properties
Args:
account_id: Account identifier
@@ -293,6 +393,62 @@ def with_streaming_response(self) -> AsyncConnectorsResourceWithStreamingRespons
"""
return AsyncConnectorsResourceWithStreamingResponse(self)
+ async def create(
+ self,
+ *,
+ account_id: str,
+ device: connector_create_params.Device,
+ activated: bool | NotGiven = NOT_GIVEN,
+ interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN,
+ interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN,
+ notes: str | NotGiven = NOT_GIVEN,
+ timezone: 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,
+ ) -> ConnectorCreateResponse:
+ """
+ Add a connector to your account
+
+ Args:
+ account_id: Account identifier
+
+ 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 await self._post(
+ f"/accounts/{account_id}/magic/connectors",
+ body=await async_maybe_transform(
+ {
+ "device": device,
+ "activated": activated,
+ "interrupt_window_duration_hours": interrupt_window_duration_hours,
+ "interrupt_window_hour_of_day": interrupt_window_hour_of_day,
+ "notes": notes,
+ "timezone": timezone,
+ },
+ connector_create_params.ConnectorCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]),
+ )
+
async def update(
self,
connector_id: str,
@@ -386,6 +542,48 @@ def list(
model=ConnectorListResponse,
)
+ async def delete(
+ self,
+ connector_id: str,
+ *,
+ 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,
+ ) -> ConnectorDeleteResponse:
+ """
+ Remove a connector from your account
+
+ Args:
+ account_id: Account identifier
+
+ 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 connector_id:
+ raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/magic/connectors/{connector_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]),
+ )
+
async def edit(
self,
connector_id: str,
@@ -404,7 +602,7 @@ async def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConnectorEditResponse:
"""
- Update Connector
+ Edit Connector to update specific properties
Args:
account_id: Account identifier
@@ -490,12 +688,18 @@ class ConnectorsResourceWithRawResponse:
def __init__(self, connectors: ConnectorsResource) -> None:
self._connectors = connectors
+ self.create = to_raw_response_wrapper(
+ connectors.create,
+ )
self.update = to_raw_response_wrapper(
connectors.update,
)
self.list = to_raw_response_wrapper(
connectors.list,
)
+ self.delete = to_raw_response_wrapper(
+ connectors.delete,
+ )
self.edit = to_raw_response_wrapper(
connectors.edit,
)
@@ -516,12 +720,18 @@ class AsyncConnectorsResourceWithRawResponse:
def __init__(self, connectors: AsyncConnectorsResource) -> None:
self._connectors = connectors
+ self.create = async_to_raw_response_wrapper(
+ connectors.create,
+ )
self.update = async_to_raw_response_wrapper(
connectors.update,
)
self.list = async_to_raw_response_wrapper(
connectors.list,
)
+ self.delete = async_to_raw_response_wrapper(
+ connectors.delete,
+ )
self.edit = async_to_raw_response_wrapper(
connectors.edit,
)
@@ -542,12 +752,18 @@ class ConnectorsResourceWithStreamingResponse:
def __init__(self, connectors: ConnectorsResource) -> None:
self._connectors = connectors
+ self.create = to_streamed_response_wrapper(
+ connectors.create,
+ )
self.update = to_streamed_response_wrapper(
connectors.update,
)
self.list = to_streamed_response_wrapper(
connectors.list,
)
+ self.delete = to_streamed_response_wrapper(
+ connectors.delete,
+ )
self.edit = to_streamed_response_wrapper(
connectors.edit,
)
@@ -568,12 +784,18 @@ class AsyncConnectorsResourceWithStreamingResponse:
def __init__(self, connectors: AsyncConnectorsResource) -> None:
self._connectors = connectors
+ self.create = async_to_streamed_response_wrapper(
+ connectors.create,
+ )
self.update = async_to_streamed_response_wrapper(
connectors.update,
)
self.list = async_to_streamed_response_wrapper(
connectors.list,
)
+ self.delete = async_to_streamed_response_wrapper(
+ connectors.delete,
+ )
self.edit = async_to_streamed_response_wrapper(
connectors.edit,
)
diff --git a/src/cloudflare/resources/magic_transit/connectors/events/events.py b/src/cloudflare/resources/magic_transit/connectors/events/events.py
index e549050a08e..d4f35f65215 100644
--- a/src/cloudflare/resources/magic_transit/connectors/events/events.py
+++ b/src/cloudflare/resources/magic_transit/connectors/events/events.py
@@ -65,6 +65,7 @@ def list(
from_: float,
to: float,
cursor: str | NotGiven = NOT_GIVEN,
+ k: str | NotGiven = NOT_GIVEN,
limit: 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.
@@ -79,6 +80,8 @@ def list(
Args:
account_id: Account identifier
+ k: Filter by event kind
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -103,6 +106,7 @@ def list(
"from_": from_,
"to": to,
"cursor": cursor,
+ "k": k,
"limit": limit,
},
event_list_params.EventListParams,
@@ -189,6 +193,7 @@ async def list(
from_: float,
to: float,
cursor: str | NotGiven = NOT_GIVEN,
+ k: str | NotGiven = NOT_GIVEN,
limit: 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.
@@ -203,6 +208,8 @@ async def list(
Args:
account_id: Account identifier
+ k: Filter by event kind
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -227,6 +234,7 @@ async def list(
"from_": from_,
"to": to,
"cursor": cursor,
+ "k": k,
"limit": limit,
},
event_list_params.EventListParams,
diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py
index 57a915e7372..4ec20304e90 100644
--- a/src/cloudflare/resources/magic_transit/gre_tunnels.py
+++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py
@@ -59,6 +59,7 @@ def create(
name: str,
description: str | NotGiven = NOT_GIVEN,
health_check: gre_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -90,6 +91,11 @@ def create(
description: An optional description of the GRE tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
is 576.
@@ -125,6 +131,7 @@ def create(
"name": name,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"mtu": mtu,
"ttl": ttl,
},
@@ -151,6 +158,7 @@ def update(
name: str,
description: str | NotGiven = NOT_GIVEN,
health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -184,6 +192,11 @@ def update(
description: An optional description of the GRE tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
is 576.
@@ -221,6 +234,7 @@ def update(
"name": name,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"mtu": mtu,
"ttl": ttl,
},
@@ -483,6 +497,7 @@ async def create(
name: str,
description: str | NotGiven = NOT_GIVEN,
health_check: gre_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -514,6 +529,11 @@ async def create(
description: An optional description of the GRE tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
is 576.
@@ -549,6 +569,7 @@ async def create(
"name": name,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"mtu": mtu,
"ttl": ttl,
},
@@ -575,6 +596,7 @@ async def update(
name: str,
description: str | NotGiven = NOT_GIVEN,
health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -608,6 +630,11 @@ async def update(
description: An optional description of the GRE tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
is 576.
@@ -645,6 +672,7 @@ async def update(
"name": name,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"mtu": mtu,
"ttl": ttl,
},
diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
index 14162a94440..67732e12391 100644
--- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
+++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
@@ -65,6 +65,7 @@ def create(
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -97,6 +98,11 @@ def create(
description: An optional description forthe IPsec tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
psk: A randomly generated or provided string for use in the IPsec tunnel.
replay_protection: If `true`, then IPsec replay protection will be supported in the
@@ -132,6 +138,7 @@ def create(
"customer_endpoint": customer_endpoint,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"psk": psk,
"replay_protection": replay_protection,
},
@@ -158,6 +165,7 @@ def update(
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -192,6 +200,11 @@ def update(
description: An optional description forthe IPsec tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
psk: A randomly generated or provided string for use in the IPsec tunnel.
replay_protection: If `true`, then IPsec replay protection will be supported in the
@@ -229,6 +242,7 @@ def update(
"customer_endpoint": customer_endpoint,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"psk": psk,
"replay_protection": replay_protection,
},
@@ -542,6 +556,7 @@ async def create(
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -574,6 +589,11 @@ async def create(
description: An optional description forthe IPsec tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
psk: A randomly generated or provided string for use in the IPsec tunnel.
replay_protection: If `true`, then IPsec replay protection will be supported in the
@@ -609,6 +629,7 @@ async def create(
"customer_endpoint": customer_endpoint,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"psk": psk,
"replay_protection": replay_protection,
},
@@ -635,6 +656,7 @@ async def update(
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ interface_address6: str | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
x_magic_new_hc_target: bool | NotGiven = NOT_GIVEN,
@@ -669,6 +691,11 @@ async def update(
description: An optional description forthe IPsec tunnel.
+ interface_address6: A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+
psk: A randomly generated or provided string for use in the IPsec tunnel.
replay_protection: If `true`, then IPsec replay protection will be supported in the
@@ -706,6 +733,7 @@ async def update(
"customer_endpoint": customer_endpoint,
"description": description,
"health_check": health_check,
+ "interface_address6": interface_address6,
"psk": psk,
"replay_protection": replay_protection,
},
diff --git a/src/cloudflare/resources/queues/consumers.py b/src/cloudflare/resources/queues/consumers.py
index 34915d5cb6e..e0822780742 100644
--- a/src/cloudflare/resources/queues/consumers.py
+++ b/src/cloudflare/resources/queues/consumers.py
@@ -296,6 +296,47 @@ def update(
),
)
+ def list(
+ self,
+ queue_id: str,
+ *,
+ 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[Consumer]:
+ """
+ Returns the consumers for a Queue
+
+ Args:
+ account_id: A Resource identifier.
+
+ queue_id: A Resource identifier.
+
+ 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 queue_id:
+ raise ValueError(f"Expected a non-empty value for `queue_id` but received {queue_id!r}")
+ return self._get_api_list(
+ f"/accounts/{account_id}/queues/{queue_id}/consumers",
+ page=SyncSinglePage[Consumer],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ model=cast(Any, Consumer), # Union types cannot be passed in as arguments in the type system
+ )
+
def delete(
self,
consumer_id: str,
@@ -343,24 +384,27 @@ def delete(
def get(
self,
- queue_id: str,
+ consumer_id: str,
*,
account_id: str,
+ queue_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[Consumer]:
+ ) -> Optional[Consumer]:
"""
- Returns the consumers for a Queue
+ Fetches the consumer for a queue by consumer id
Args:
account_id: A Resource identifier.
queue_id: A Resource identifier.
+ consumer_id: A Resource identifier.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -373,13 +417,23 @@ def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not queue_id:
raise ValueError(f"Expected a non-empty value for `queue_id` but received {queue_id!r}")
- return self._get_api_list(
- f"/accounts/{account_id}/queues/{queue_id}/consumers",
- page=SyncSinglePage[Consumer],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ if not consumer_id:
+ raise ValueError(f"Expected a non-empty value for `consumer_id` but received {consumer_id!r}")
+ return cast(
+ Optional[Consumer],
+ self._get(
+ f"/accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Consumer]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[Consumer]
+ ), # Union types cannot be passed in as arguments in the type system
),
- model=cast(Any, Consumer), # Union types cannot be passed in as arguments in the type system
)
@@ -652,6 +706,47 @@ async def update(
),
)
+ def list(
+ self,
+ queue_id: str,
+ *,
+ 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[Consumer, AsyncSinglePage[Consumer]]:
+ """
+ Returns the consumers for a Queue
+
+ Args:
+ account_id: A Resource identifier.
+
+ queue_id: A Resource identifier.
+
+ 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 queue_id:
+ raise ValueError(f"Expected a non-empty value for `queue_id` but received {queue_id!r}")
+ return self._get_api_list(
+ f"/accounts/{account_id}/queues/{queue_id}/consumers",
+ page=AsyncSinglePage[Consumer],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ model=cast(Any, Consumer), # Union types cannot be passed in as arguments in the type system
+ )
+
async def delete(
self,
consumer_id: str,
@@ -697,26 +792,29 @@ async def delete(
cast_to=ConsumerDeleteResponse,
)
- def get(
+ async def get(
self,
- queue_id: str,
+ consumer_id: str,
*,
account_id: str,
+ queue_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[Consumer, AsyncSinglePage[Consumer]]:
+ ) -> Optional[Consumer]:
"""
- Returns the consumers for a Queue
+ Fetches the consumer for a queue by consumer id
Args:
account_id: A Resource identifier.
queue_id: A Resource identifier.
+ consumer_id: A Resource identifier.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -729,13 +827,23 @@ def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not queue_id:
raise ValueError(f"Expected a non-empty value for `queue_id` but received {queue_id!r}")
- return self._get_api_list(
- f"/accounts/{account_id}/queues/{queue_id}/consumers",
- page=AsyncSinglePage[Consumer],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ if not consumer_id:
+ raise ValueError(f"Expected a non-empty value for `consumer_id` but received {consumer_id!r}")
+ return cast(
+ Optional[Consumer],
+ await self._get(
+ f"/accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Consumer]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[Consumer]
+ ), # Union types cannot be passed in as arguments in the type system
),
- model=cast(Any, Consumer), # Union types cannot be passed in as arguments in the type system
)
@@ -749,6 +857,9 @@ def __init__(self, consumers: ConsumersResource) -> None:
self.update = to_raw_response_wrapper(
consumers.update,
)
+ self.list = to_raw_response_wrapper(
+ consumers.list,
+ )
self.delete = to_raw_response_wrapper(
consumers.delete,
)
@@ -767,6 +878,9 @@ def __init__(self, consumers: AsyncConsumersResource) -> None:
self.update = async_to_raw_response_wrapper(
consumers.update,
)
+ self.list = async_to_raw_response_wrapper(
+ consumers.list,
+ )
self.delete = async_to_raw_response_wrapper(
consumers.delete,
)
@@ -785,6 +899,9 @@ def __init__(self, consumers: ConsumersResource) -> None:
self.update = to_streamed_response_wrapper(
consumers.update,
)
+ self.list = to_streamed_response_wrapper(
+ consumers.list,
+ )
self.delete = to_streamed_response_wrapper(
consumers.delete,
)
@@ -803,6 +920,9 @@ def __init__(self, consumers: AsyncConsumersResource) -> None:
self.update = async_to_streamed_response_wrapper(
consumers.update,
)
+ self.list = async_to_streamed_response_wrapper(
+ consumers.list,
+ )
self.delete = async_to_streamed_response_wrapper(
consumers.delete,
)
diff --git a/src/cloudflare/resources/radar/__init__.py b/src/cloudflare/resources/radar/__init__.py
index 7be87145a2c..4b60e3b280e 100644
--- a/src/cloudflare/resources/radar/__init__.py
+++ b/src/cloudflare/resources/radar/__init__.py
@@ -24,6 +24,14 @@
DNSResourceWithStreamingResponse,
AsyncDNSResourceWithStreamingResponse,
)
+from .bots import (
+ BotsResource,
+ AsyncBotsResource,
+ BotsResourceWithRawResponse,
+ AsyncBotsResourceWithRawResponse,
+ BotsResourceWithStreamingResponse,
+ AsyncBotsResourceWithStreamingResponse,
+)
from .http import (
HTTPResource,
AsyncHTTPResource,
@@ -180,6 +188,12 @@
"AsyncBGPResourceWithRawResponse",
"BGPResourceWithStreamingResponse",
"AsyncBGPResourceWithStreamingResponse",
+ "BotsResource",
+ "AsyncBotsResource",
+ "BotsResourceWithRawResponse",
+ "AsyncBotsResourceWithRawResponse",
+ "BotsResourceWithStreamingResponse",
+ "AsyncBotsResourceWithStreamingResponse",
"DatasetsResource",
"AsyncDatasetsResource",
"DatasetsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/radar/ai/to_markdown.py b/src/cloudflare/resources/radar/ai/to_markdown.py
index c9261225ccd..587420b180f 100644
--- a/src/cloudflare/resources/radar/ai/to_markdown.py
+++ b/src/cloudflare/resources/radar/ai/to_markdown.py
@@ -44,9 +44,9 @@ def with_streaming_response(self) -> ToMarkdownResourceWithStreamingResponse:
def create(
self,
+ body: FileTypes | NotGiven = NOT_GIVEN,
*,
account_id: str,
- body: FileTypes | 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,
@@ -102,9 +102,9 @@ def with_streaming_response(self) -> AsyncToMarkdownResourceWithStreamingRespons
def create(
self,
+ body: FileTypes | NotGiven = NOT_GIVEN,
*,
account_id: str,
- body: FileTypes | 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,
diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/top.py b/src/cloudflare/resources/radar/attacks/layer7/top/top.py
index 30db6b97c5d..3915bbbbb48 100644
--- a/src/cloudflare/resources/radar/attacks/layer7/top/top.py
+++ b/src/cloudflare/resources/radar/attacks/layer7/top/top.py
@@ -86,7 +86,6 @@ def attacks(
limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN,
limit_per_location: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
- magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
mitigation_product: List[
Literal[
"DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION"
@@ -142,9 +141,6 @@ def attacks(
Prefix with `-` to exclude locations from results. For example, `-US,PT`
excludes results from the US, but includes results from PT.
- magnitude: Deprecated parameter. Future support includes only attack magnitude defined by
- total mitigated requests (MITIGATED_REQUESTS).
-
mitigation_product: Filters the results by layer 7 mitigation product.
name: Array of names used to label the series in the response.
@@ -179,7 +175,6 @@ def attacks(
"limit_direction": limit_direction,
"limit_per_location": limit_per_location,
"location": location,
- "magnitude": magnitude,
"mitigation_product": mitigation_product,
"name": name,
"normalization": normalization,
@@ -549,7 +544,6 @@ async def attacks(
limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN,
limit_per_location: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
- magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
mitigation_product: List[
Literal[
"DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION"
@@ -605,9 +599,6 @@ async def attacks(
Prefix with `-` to exclude locations from results. For example, `-US,PT`
excludes results from the US, but includes results from PT.
- magnitude: Deprecated parameter. Future support includes only attack magnitude defined by
- total mitigated requests (MITIGATED_REQUESTS).
-
mitigation_product: Filters the results by layer 7 mitigation product.
name: Array of names used to label the series in the response.
@@ -642,7 +633,6 @@ async def attacks(
"limit_direction": limit_direction,
"limit_per_location": limit_per_location,
"location": location,
- "magnitude": magnitude,
"mitigation_product": mitigation_product,
"name": name,
"normalization": normalization,
diff --git a/src/cloudflare/resources/radar/bots/__init__.py b/src/cloudflare/resources/radar/bots/__init__.py
new file mode 100644
index 00000000000..7d7fb66c90e
--- /dev/null
+++ b/src/cloudflare/resources/radar/bots/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .bots import (
+ BotsResource,
+ AsyncBotsResource,
+ BotsResourceWithRawResponse,
+ AsyncBotsResourceWithRawResponse,
+ BotsResourceWithStreamingResponse,
+ AsyncBotsResourceWithStreamingResponse,
+)
+from .web_crawlers import (
+ WebCrawlersResource,
+ AsyncWebCrawlersResource,
+ WebCrawlersResourceWithRawResponse,
+ AsyncWebCrawlersResourceWithRawResponse,
+ WebCrawlersResourceWithStreamingResponse,
+ AsyncWebCrawlersResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "WebCrawlersResource",
+ "AsyncWebCrawlersResource",
+ "WebCrawlersResourceWithRawResponse",
+ "AsyncWebCrawlersResourceWithRawResponse",
+ "WebCrawlersResourceWithStreamingResponse",
+ "AsyncWebCrawlersResourceWithStreamingResponse",
+ "BotsResource",
+ "AsyncBotsResource",
+ "BotsResourceWithRawResponse",
+ "AsyncBotsResourceWithRawResponse",
+ "BotsResourceWithStreamingResponse",
+ "AsyncBotsResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/radar/bots/bots.py b/src/cloudflare/resources/radar/bots/bots.py
new file mode 100644
index 00000000000..c20a17996aa
--- /dev/null
+++ b/src/cloudflare/resources/radar/bots/bots.py
@@ -0,0 +1,1210 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Type, Union, cast
+from datetime import datetime
+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 .web_crawlers import (
+ WebCrawlersResource,
+ AsyncWebCrawlersResource,
+ WebCrawlersResourceWithRawResponse,
+ AsyncWebCrawlersResourceWithRawResponse,
+ WebCrawlersResourceWithStreamingResponse,
+ AsyncWebCrawlersResourceWithStreamingResponse,
+)
+from ....types.radar import (
+ bot_get_params,
+ bot_list_params,
+ bot_summary_params,
+ bot_timeseries_params,
+ bot_timeseries_groups_params,
+)
+from ...._base_client import make_request_options
+from ....types.radar.bot_get_response import BotGetResponse
+from ....types.radar.bot_list_response import BotListResponse
+from ....types.radar.bot_summary_response import BotSummaryResponse
+from ....types.radar.bot_timeseries_response import BotTimeseriesResponse
+from ....types.radar.bot_timeseries_groups_response import BotTimeseriesGroupsResponse
+
+__all__ = ["BotsResource", "AsyncBotsResource"]
+
+
+class BotsResource(SyncAPIResource):
+ @cached_property
+ def web_crawlers(self) -> WebCrawlersResource:
+ return WebCrawlersResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> BotsResourceWithRawResponse:
+ """
+ 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 BotsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BotsResourceWithStreamingResponse:
+ """
+ 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 BotsResourceWithStreamingResponse(self)
+
+ def list(
+ self,
+ *,
+ bot_category: Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: str | NotGiven = NOT_GIVEN,
+ bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> BotListResponse:
+ """
+ Retrieves a list of bots.
+
+ Args:
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status.
+
+ format: Format in which results will be returned.
+
+ limit: Limits the number of objects returned in the response.
+
+ offset: Skips the specified number of objects before fetching the results.
+
+ 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
+ """
+ return self._get(
+ "/radar/bots",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "format": format,
+ "limit": limit,
+ "offset": offset,
+ },
+ bot_list_params.BotListParams,
+ ),
+ post_parser=ResultWrapper[BotListResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]),
+ )
+
+ def get(
+ self,
+ bot_slug: str,
+ *,
+ format: Literal["JSON", "CSV"] | 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,
+ ) -> BotGetResponse:
+ """
+ Retrieves the requested bot information.
+
+ Args:
+ bot_slug: Bot slug.
+
+ format: Format in which results will be returned.
+
+ 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 bot_slug:
+ raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}")
+ return self._get(
+ f"/radar/bots/{bot_slug}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"format": format}, bot_get_params.BotGetParams),
+ post_parser=ResultWrapper[BotGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]),
+ )
+
+ def summary(
+ self,
+ dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"],
+ *,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotSummaryResponse:
+ """
+ Retrieves an aggregated summary of bots HTTP requests grouped by the specified
+ dimension.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return self._get(
+ f"/radar/bots/summary/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "location": location,
+ "name": name,
+ },
+ bot_summary_params.BotSummaryParams,
+ ),
+ post_parser=ResultWrapper[BotSummaryResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]),
+ )
+
+ def timeseries(
+ self,
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotTimeseriesResponse:
+ """
+ Retrieves bots HTTP request volume over time.
+
+ Args:
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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
+ """
+ return self._get(
+ "/radar/bots/timeseries",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "location": location,
+ "name": name,
+ },
+ bot_timeseries_params.BotTimeseriesParams,
+ ),
+ post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]),
+ )
+
+ def timeseries_groups(
+ self,
+ dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"],
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotTimeseriesGroupsResponse:
+ """
+ Retrieves the distribution of HTTP requests from bots, grouped by chosen the
+ specified dimension over time.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return self._get(
+ f"/radar/bots/timeseries_groups/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "location": location,
+ "name": name,
+ },
+ bot_timeseries_groups_params.BotTimeseriesGroupsParams,
+ ),
+ post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]),
+ )
+
+
+class AsyncBotsResource(AsyncAPIResource):
+ @cached_property
+ def web_crawlers(self) -> AsyncWebCrawlersResource:
+ return AsyncWebCrawlersResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncBotsResourceWithRawResponse:
+ """
+ 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 AsyncBotsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBotsResourceWithStreamingResponse:
+ """
+ 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 AsyncBotsResourceWithStreamingResponse(self)
+
+ async def list(
+ self,
+ *,
+ bot_category: Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: str | NotGiven = NOT_GIVEN,
+ bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit: int | NotGiven = NOT_GIVEN,
+ offset: int | 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,
+ ) -> BotListResponse:
+ """
+ Retrieves a list of bots.
+
+ Args:
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status.
+
+ format: Format in which results will be returned.
+
+ limit: Limits the number of objects returned in the response.
+
+ offset: Skips the specified number of objects before fetching the results.
+
+ 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
+ """
+ return await self._get(
+ "/radar/bots",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "format": format,
+ "limit": limit,
+ "offset": offset,
+ },
+ bot_list_params.BotListParams,
+ ),
+ post_parser=ResultWrapper[BotListResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]),
+ )
+
+ async def get(
+ self,
+ bot_slug: str,
+ *,
+ format: Literal["JSON", "CSV"] | 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,
+ ) -> BotGetResponse:
+ """
+ Retrieves the requested bot information.
+
+ Args:
+ bot_slug: Bot slug.
+
+ format: Format in which results will be returned.
+
+ 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 bot_slug:
+ raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}")
+ return await self._get(
+ f"/radar/bots/{bot_slug}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform({"format": format}, bot_get_params.BotGetParams),
+ post_parser=ResultWrapper[BotGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]),
+ )
+
+ async def summary(
+ self,
+ dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"],
+ *,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotSummaryResponse:
+ """
+ Retrieves an aggregated summary of bots HTTP requests grouped by the specified
+ dimension.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return await self._get(
+ f"/radar/bots/summary/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "location": location,
+ "name": name,
+ },
+ bot_summary_params.BotSummaryParams,
+ ),
+ post_parser=ResultWrapper[BotSummaryResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]),
+ )
+
+ async def timeseries(
+ self,
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotTimeseriesResponse:
+ """
+ Retrieves bots HTTP request volume over time.
+
+ Args:
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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
+ """
+ return await self._get(
+ "/radar/bots/timeseries",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "location": location,
+ "name": name,
+ },
+ bot_timeseries_params.BotTimeseriesParams,
+ ),
+ post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]),
+ )
+
+ async def timeseries_groups(
+ self,
+ dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"],
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ asn: List[str] | NotGiven = NOT_GIVEN,
+ bot: List[str] | NotGiven = NOT_GIVEN,
+ bot_category: List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN,
+ continent: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ location: List[str] | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> BotTimeseriesGroupsResponse:
+ """
+ Retrieves the distribution of HTTP requests from bots, grouped by chosen the
+ specified dimension over time.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ asn: Filters results by Autonomous System. Specify one or more Autonomous System
+ Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ results. For example, `-174, 3356` excludes results from AS174, but includes
+ results from AS3356.
+
+ bot: Filters results by bot name.
+
+ bot_category: Filters results by bot category.
+
+ bot_operator: Filters results by bot operator.
+
+ bot_verification_status: Filters results by bot verification status (Verified vs. Unverified).
+
+ continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ excludes results from EU, but includes results from NA.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ location: Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ excludes results from the US, but includes results from PT.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return await self._get(
+ f"/radar/bots/timeseries_groups/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "asn": asn,
+ "bot": bot,
+ "bot_category": bot_category,
+ "bot_operator": bot_operator,
+ "bot_verification_status": bot_verification_status,
+ "continent": continent,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "location": location,
+ "name": name,
+ },
+ bot_timeseries_groups_params.BotTimeseriesGroupsParams,
+ ),
+ post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]),
+ )
+
+
+class BotsResourceWithRawResponse:
+ def __init__(self, bots: BotsResource) -> None:
+ self._bots = bots
+
+ self.list = to_raw_response_wrapper(
+ bots.list,
+ )
+ self.get = to_raw_response_wrapper(
+ bots.get,
+ )
+ self.summary = to_raw_response_wrapper(
+ bots.summary,
+ )
+ self.timeseries = to_raw_response_wrapper(
+ bots.timeseries,
+ )
+ self.timeseries_groups = to_raw_response_wrapper(
+ bots.timeseries_groups,
+ )
+
+ @cached_property
+ def web_crawlers(self) -> WebCrawlersResourceWithRawResponse:
+ return WebCrawlersResourceWithRawResponse(self._bots.web_crawlers)
+
+
+class AsyncBotsResourceWithRawResponse:
+ def __init__(self, bots: AsyncBotsResource) -> None:
+ self._bots = bots
+
+ self.list = async_to_raw_response_wrapper(
+ bots.list,
+ )
+ self.get = async_to_raw_response_wrapper(
+ bots.get,
+ )
+ self.summary = async_to_raw_response_wrapper(
+ bots.summary,
+ )
+ self.timeseries = async_to_raw_response_wrapper(
+ bots.timeseries,
+ )
+ self.timeseries_groups = async_to_raw_response_wrapper(
+ bots.timeseries_groups,
+ )
+
+ @cached_property
+ def web_crawlers(self) -> AsyncWebCrawlersResourceWithRawResponse:
+ return AsyncWebCrawlersResourceWithRawResponse(self._bots.web_crawlers)
+
+
+class BotsResourceWithStreamingResponse:
+ def __init__(self, bots: BotsResource) -> None:
+ self._bots = bots
+
+ self.list = to_streamed_response_wrapper(
+ bots.list,
+ )
+ self.get = to_streamed_response_wrapper(
+ bots.get,
+ )
+ self.summary = to_streamed_response_wrapper(
+ bots.summary,
+ )
+ self.timeseries = to_streamed_response_wrapper(
+ bots.timeseries,
+ )
+ self.timeseries_groups = to_streamed_response_wrapper(
+ bots.timeseries_groups,
+ )
+
+ @cached_property
+ def web_crawlers(self) -> WebCrawlersResourceWithStreamingResponse:
+ return WebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers)
+
+
+class AsyncBotsResourceWithStreamingResponse:
+ def __init__(self, bots: AsyncBotsResource) -> None:
+ self._bots = bots
+
+ self.list = async_to_streamed_response_wrapper(
+ bots.list,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ bots.get,
+ )
+ self.summary = async_to_streamed_response_wrapper(
+ bots.summary,
+ )
+ self.timeseries = async_to_streamed_response_wrapper(
+ bots.timeseries,
+ )
+ self.timeseries_groups = async_to_streamed_response_wrapper(
+ bots.timeseries_groups,
+ )
+
+ @cached_property
+ def web_crawlers(self) -> AsyncWebCrawlersResourceWithStreamingResponse:
+ return AsyncWebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers)
diff --git a/src/cloudflare/resources/radar/bots/web_crawlers.py b/src/cloudflare/resources/radar/bots/web_crawlers.py
new file mode 100644
index 00000000000..4537233e160
--- /dev/null
+++ b/src/cloudflare/resources/radar/bots/web_crawlers.py
@@ -0,0 +1,437 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Type, Union, cast
+from datetime import datetime
+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.radar.bots import web_crawler_summary_params, web_crawler_timeseries_groups_params
+from ....types.radar.bots.web_crawler_summary_response import WebCrawlerSummaryResponse
+from ....types.radar.bots.web_crawler_timeseries_groups_response import WebCrawlerTimeseriesGroupsResponse
+
+__all__ = ["WebCrawlersResource", "AsyncWebCrawlersResource"]
+
+
+class WebCrawlersResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> WebCrawlersResourceWithRawResponse:
+ """
+ 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 WebCrawlersResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> WebCrawlersResourceWithStreamingResponse:
+ """
+ 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 WebCrawlersResourceWithStreamingResponse(self)
+
+ def summary(
+ self,
+ dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"],
+ *,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> WebCrawlerSummaryResponse:
+ """
+ Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the
+ specified dimension.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ bot_operator: Filters results by bot operator.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return self._get(
+ f"/radar/bots/crawlers/summary/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "bot_operator": bot_operator,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "name": name,
+ },
+ web_crawler_summary_params.WebCrawlerSummaryParams,
+ ),
+ post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]),
+ )
+
+ def timeseries_groups(
+ self,
+ dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"],
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> WebCrawlerTimeseriesGroupsResponse:
+ """
+ Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the
+ specified dimension over time.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ bot_operator: Filters results by bot operator.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return self._get(
+ f"/radar/bots/crawlers/timeseries_groups/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "bot_operator": bot_operator,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "name": name,
+ },
+ web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams,
+ ),
+ post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]),
+ )
+
+
+class AsyncWebCrawlersResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncWebCrawlersResourceWithRawResponse:
+ """
+ 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 AsyncWebCrawlersResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncWebCrawlersResourceWithStreamingResponse:
+ """
+ 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 AsyncWebCrawlersResourceWithStreamingResponse(self)
+
+ async def summary(
+ self,
+ dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"],
+ *,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> WebCrawlerSummaryResponse:
+ """
+ Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the
+ specified dimension.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ bot_operator: Filters results by bot operator.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return await self._get(
+ f"/radar/bots/crawlers/summary/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "bot_operator": bot_operator,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "name": name,
+ },
+ web_crawler_summary_params.WebCrawlerSummaryParams,
+ ),
+ post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]),
+ )
+
+ async def timeseries_groups(
+ self,
+ dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"],
+ *,
+ agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN,
+ bot_operator: List[str] | NotGiven = NOT_GIVEN,
+ date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ date_range: List[str] | NotGiven = NOT_GIVEN,
+ date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
+ limit_per_group: int | NotGiven = NOT_GIVEN,
+ name: List[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,
+ ) -> WebCrawlerTimeseriesGroupsResponse:
+ """
+ Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the
+ specified dimension over time.
+
+ Args:
+ dimension: Specifies the attribute by which to group the results.
+
+ agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+
+ bot_operator: Filters results by bot operator.
+
+ date_end: End of the date range (inclusive).
+
+ date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ this week with the previous week. Use this parameter or set specific start and
+ end dates (`dateStart` and `dateEnd` parameters).
+
+ date_start: Start of the date range.
+
+ format: Format in which results will be returned.
+
+ limit_per_group: Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+
+ name: Array of names used to label the series in the response.
+
+ 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 dimension:
+ raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}")
+ return await self._get(
+ f"/radar/bots/crawlers/timeseries_groups/{dimension}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "agg_interval": agg_interval,
+ "bot_operator": bot_operator,
+ "date_end": date_end,
+ "date_range": date_range,
+ "date_start": date_start,
+ "format": format,
+ "limit_per_group": limit_per_group,
+ "name": name,
+ },
+ web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams,
+ ),
+ post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]),
+ )
+
+
+class WebCrawlersResourceWithRawResponse:
+ def __init__(self, web_crawlers: WebCrawlersResource) -> None:
+ self._web_crawlers = web_crawlers
+
+ self.summary = to_raw_response_wrapper(
+ web_crawlers.summary,
+ )
+ self.timeseries_groups = to_raw_response_wrapper(
+ web_crawlers.timeseries_groups,
+ )
+
+
+class AsyncWebCrawlersResourceWithRawResponse:
+ def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None:
+ self._web_crawlers = web_crawlers
+
+ self.summary = async_to_raw_response_wrapper(
+ web_crawlers.summary,
+ )
+ self.timeseries_groups = async_to_raw_response_wrapper(
+ web_crawlers.timeseries_groups,
+ )
+
+
+class WebCrawlersResourceWithStreamingResponse:
+ def __init__(self, web_crawlers: WebCrawlersResource) -> None:
+ self._web_crawlers = web_crawlers
+
+ self.summary = to_streamed_response_wrapper(
+ web_crawlers.summary,
+ )
+ self.timeseries_groups = to_streamed_response_wrapper(
+ web_crawlers.timeseries_groups,
+ )
+
+
+class AsyncWebCrawlersResourceWithStreamingResponse:
+ def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None:
+ self._web_crawlers = web_crawlers
+
+ self.summary = async_to_streamed_response_wrapper(
+ web_crawlers.summary,
+ )
+ self.timeseries_groups = async_to_streamed_response_wrapper(
+ web_crawlers.timeseries_groups,
+ )
diff --git a/src/cloudflare/resources/radar/radar.py b/src/cloudflare/resources/radar/radar.py
index 7242f18dd38..b0bc2fafe7e 100644
--- a/src/cloudflare/resources/radar/radar.py
+++ b/src/cloudflare/resources/radar/radar.py
@@ -43,6 +43,14 @@
AsyncDatasetsResourceWithStreamingResponse,
)
from ..._compat import cached_property
+from .bots.bots import (
+ BotsResource,
+ AsyncBotsResource,
+ BotsResourceWithRawResponse,
+ AsyncBotsResourceWithRawResponse,
+ BotsResourceWithStreamingResponse,
+ AsyncBotsResourceWithStreamingResponse,
+)
from .http.http import (
HTTPResource,
AsyncHTTPResource,
@@ -173,6 +181,10 @@ def annotations(self) -> AnnotationsResource:
def bgp(self) -> BGPResource:
return BGPResource(self._client)
+ @cached_property
+ def bots(self) -> BotsResource:
+ return BotsResource(self._client)
+
@cached_property
def datasets(self) -> DatasetsResource:
return DatasetsResource(self._client)
@@ -270,6 +282,10 @@ def annotations(self) -> AsyncAnnotationsResource:
def bgp(self) -> AsyncBGPResource:
return AsyncBGPResource(self._client)
+ @cached_property
+ def bots(self) -> AsyncBotsResource:
+ return AsyncBotsResource(self._client)
+
@cached_property
def datasets(self) -> AsyncDatasetsResource:
return AsyncDatasetsResource(self._client)
@@ -370,6 +386,10 @@ def annotations(self) -> AnnotationsResourceWithRawResponse:
def bgp(self) -> BGPResourceWithRawResponse:
return BGPResourceWithRawResponse(self._radar.bgp)
+ @cached_property
+ def bots(self) -> BotsResourceWithRawResponse:
+ return BotsResourceWithRawResponse(self._radar.bots)
+
@cached_property
def datasets(self) -> DatasetsResourceWithRawResponse:
return DatasetsResourceWithRawResponse(self._radar.datasets)
@@ -451,6 +471,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithRawResponse:
def bgp(self) -> AsyncBGPResourceWithRawResponse:
return AsyncBGPResourceWithRawResponse(self._radar.bgp)
+ @cached_property
+ def bots(self) -> AsyncBotsResourceWithRawResponse:
+ return AsyncBotsResourceWithRawResponse(self._radar.bots)
+
@cached_property
def datasets(self) -> AsyncDatasetsResourceWithRawResponse:
return AsyncDatasetsResourceWithRawResponse(self._radar.datasets)
@@ -532,6 +556,10 @@ def annotations(self) -> AnnotationsResourceWithStreamingResponse:
def bgp(self) -> BGPResourceWithStreamingResponse:
return BGPResourceWithStreamingResponse(self._radar.bgp)
+ @cached_property
+ def bots(self) -> BotsResourceWithStreamingResponse:
+ return BotsResourceWithStreamingResponse(self._radar.bots)
+
@cached_property
def datasets(self) -> DatasetsResourceWithStreamingResponse:
return DatasetsResourceWithStreamingResponse(self._radar.datasets)
@@ -613,6 +641,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithStreamingResponse:
def bgp(self) -> AsyncBGPResourceWithStreamingResponse:
return AsyncBGPResourceWithStreamingResponse(self._radar.bgp)
+ @cached_property
+ def bots(self) -> AsyncBotsResourceWithStreamingResponse:
+ return AsyncBotsResourceWithStreamingResponse(self._radar.bots)
+
@cached_property
def datasets(self) -> AsyncDatasetsResourceWithStreamingResponse:
return AsyncDatasetsResourceWithStreamingResponse(self._radar.datasets)
diff --git a/src/cloudflare/resources/radar/search.py b/src/cloudflare/resources/radar/search.py
index a1e32a7d272..24d1df57e4c 100644
--- a/src/cloudflare/resources/radar/search.py
+++ b/src/cloudflare/resources/radar/search.py
@@ -49,9 +49,11 @@ def global_(
self,
*,
query: str,
- exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN,
+ exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
+ | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
- include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN,
+ include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
+ | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
limit_per_group: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -62,10 +64,11 @@ def global_(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SearchGlobalResponse:
"""
- Searches for locations, autonomous systems, and reports.
+ Searches for locations, autonomous systems, reports, bots, certificate logs, and
+ certificate authorities.
Args:
- query: Search for locations, autonomous systems and reports.
+ query: String used to perform the search operation.
exclude: Search types excluded from results.
@@ -133,9 +136,11 @@ async def global_(
self,
*,
query: str,
- exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN,
+ exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
+ | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
- include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN,
+ include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
+ | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
limit_per_group: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -146,10 +151,11 @@ async def global_(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SearchGlobalResponse:
"""
- Searches for locations, autonomous systems, and reports.
+ Searches for locations, autonomous systems, reports, bots, certificate logs, and
+ certificate authorities.
Args:
- query: Search for locations, autonomous systems and reports.
+ query: String used to perform the search operation.
exclude: Search types excluded from results.
diff --git a/src/cloudflare/resources/radar/verified_bots/top.py b/src/cloudflare/resources/radar/verified_bots/top.py
index 1a56c1d62c9..a9363226ced 100644
--- a/src/cloudflare/resources/radar/verified_bots/top.py
+++ b/src/cloudflare/resources/radar/verified_bots/top.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import List, Type, Union, cast
from datetime import datetime
from typing_extensions import Literal
@@ -47,6 +48,9 @@ def with_streaming_response(self) -> TopResourceWithStreamingResponse:
"""
return TopResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead."
+ )
def bots(
self,
*,
@@ -131,6 +135,9 @@ def bots(
cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]),
)
+ @typing_extensions.deprecated(
+ "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead."
+ )
def categories(
self,
*,
@@ -237,6 +244,9 @@ def with_streaming_response(self) -> AsyncTopResourceWithStreamingResponse:
"""
return AsyncTopResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated(
+ "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead."
+ )
async def bots(
self,
*,
@@ -321,6 +331,9 @@ async def bots(
cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]),
)
+ @typing_extensions.deprecated(
+ "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead."
+ )
async def categories(
self,
*,
@@ -411,11 +424,15 @@ class TopResourceWithRawResponse:
def __init__(self, top: TopResource) -> None:
self._top = top
- self.bots = to_raw_response_wrapper(
- top.bots,
+ self.bots = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ top.bots # pyright: ignore[reportDeprecated],
+ )
)
- self.categories = to_raw_response_wrapper(
- top.categories,
+ self.categories = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ top.categories # pyright: ignore[reportDeprecated],
+ )
)
@@ -423,11 +440,15 @@ class AsyncTopResourceWithRawResponse:
def __init__(self, top: AsyncTopResource) -> None:
self._top = top
- self.bots = async_to_raw_response_wrapper(
- top.bots,
+ self.bots = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ top.bots # pyright: ignore[reportDeprecated],
+ )
)
- self.categories = async_to_raw_response_wrapper(
- top.categories,
+ self.categories = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ top.categories # pyright: ignore[reportDeprecated],
+ )
)
@@ -435,11 +456,15 @@ class TopResourceWithStreamingResponse:
def __init__(self, top: TopResource) -> None:
self._top = top
- self.bots = to_streamed_response_wrapper(
- top.bots,
+ self.bots = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ top.bots # pyright: ignore[reportDeprecated],
+ )
)
- self.categories = to_streamed_response_wrapper(
- top.categories,
+ self.categories = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ top.categories # pyright: ignore[reportDeprecated],
+ )
)
@@ -447,9 +472,13 @@ class AsyncTopResourceWithStreamingResponse:
def __init__(self, top: AsyncTopResource) -> None:
self._top = top
- self.bots = async_to_streamed_response_wrapper(
- top.bots,
+ self.bots = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ top.bots # pyright: ignore[reportDeprecated],
+ )
)
- self.categories = async_to_streamed_response_wrapper(
- top.categories,
+ self.categories = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ top.categories # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/cloudflare/resources/rules/lists/bulk_operations.py b/src/cloudflare/resources/rules/lists/bulk_operations.py
index d9a333b3113..445e4421798 100644
--- a/src/cloudflare/resources/rules/lists/bulk_operations.py
+++ b/src/cloudflare/resources/rules/lists/bulk_operations.py
@@ -62,7 +62,7 @@ def get(
property will contain a message describing the error.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
operation_id: The unique operation ID of the asynchronous action.
@@ -136,7 +136,7 @@ async def get(
property will contain a message describing the error.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
operation_id: The unique operation ID of the asynchronous action.
diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py
index 5c4aef53245..984a223cbcd 100644
--- a/src/cloudflare/resources/rules/lists/items.py
+++ b/src/cloudflare/resources/rules/lists/items.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Iterable, cast
+from typing import Type, Iterable, cast
import httpx
@@ -17,10 +17,9 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
-from ...._base_client import make_request_options
-from ....types.rules.lists import item_list_params, item_create_params, item_update_params
-from ....types.rules.lists.item_get_response import ItemGetResponse
-from ....types.rules.lists.item_list_response import ItemListResponse
+from ....pagination import SyncCursorPagination, AsyncCursorPagination
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.rules.lists import item_list_params, item_create_params, item_delete_params, item_update_params
from ....types.rules.lists.item_create_response import ItemCreateResponse
from ....types.rules.lists.item_delete_response import ItemDeleteResponse
from ....types.rules.lists.item_update_response import ItemUpdateResponse
@@ -66,11 +65,10 @@ def create(
This operation is asynchronous.
To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -86,22 +84,17 @@ def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemCreateResponse,
- self._post(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- body=maybe_transform(body, Iterable[item_create_params.Body]),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._post(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=maybe_transform(body, Iterable[item_create_params.Body]),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemCreateResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemCreateResponse], ResultWrapper[ItemCreateResponse]),
)
def update(
@@ -122,11 +115,10 @@ def update(
list.
This operation is asynchronous. To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -142,22 +134,17 @@ def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemUpdateResponse,
- self._put(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- body=maybe_transform(body, Iterable[item_update_params.Body]),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._put(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=maybe_transform(body, Iterable[item_update_params.Body]),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemUpdateResponse], ResultWrapper[ItemUpdateResponse]),
)
def list(
@@ -174,12 +161,12 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ItemListResponse:
+ ) -> SyncCursorPagination[object]:
"""
Fetches all the items in the list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -208,29 +195,24 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemListResponse,
- self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "cursor": cursor,
- "per_page": per_page,
- "search": search,
- },
- item_list_params.ItemListParams,
- ),
- post_parser=ResultWrapper[ItemListResponse]._unwrapper,
+ return self._get_api_list(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ page=SyncCursorPagination[object],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "cursor": cursor,
+ "per_page": per_page,
+ "search": search,
+ },
+ item_list_params.ItemListParams,
),
- cast_to=cast(
- Any, ResultWrapper[ItemListResponse]
- ), # Union types cannot be passed in as arguments in the type system
),
+ model=object,
)
def delete(
@@ -238,6 +220,7 @@ def delete(
list_id: str,
*,
account_id: str,
+ items: Iterable[item_delete_params.Item] | 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,
@@ -250,11 +233,10 @@ def delete(
This operation is asynchronous.
To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -270,21 +252,17 @@ def delete(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemDeleteResponse,
- self._delete(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._delete(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=maybe_transform({"items": items}, item_delete_params.ItemDeleteParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemDeleteResponse], ResultWrapper[ItemDeleteResponse]),
)
def get(
@@ -299,12 +277,12 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ItemGetResponse:
+ ) -> object:
"""
Fetches a list item in the list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -324,21 +302,16 @@ def get(
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
if not item_id:
raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}")
- return cast(
- ItemGetResponse,
- self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[object]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
@@ -380,11 +353,10 @@ async def create(
This operation is asynchronous.
To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -400,22 +372,17 @@ async def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemCreateResponse,
- await self._post(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- body=await async_maybe_transform(body, Iterable[item_create_params.Body]),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._post(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=await async_maybe_transform(body, Iterable[item_create_params.Body]),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemCreateResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemCreateResponse], ResultWrapper[ItemCreateResponse]),
)
async def update(
@@ -436,11 +403,10 @@ async def update(
list.
This operation is asynchronous. To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -456,25 +422,20 @@ async def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemUpdateResponse,
- await self._put(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- body=await async_maybe_transform(body, Iterable[item_update_params.Body]),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._put(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=await async_maybe_transform(body, Iterable[item_update_params.Body]),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemUpdateResponse], ResultWrapper[ItemUpdateResponse]),
)
- async def list(
+ def list(
self,
list_id: str,
*,
@@ -488,12 +449,12 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ItemListResponse:
+ ) -> AsyncPaginator[object, AsyncCursorPagination[object]]:
"""
Fetches all the items in the list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -522,29 +483,24 @@ async def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemListResponse,
- await self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=await async_maybe_transform(
- {
- "cursor": cursor,
- "per_page": per_page,
- "search": search,
- },
- item_list_params.ItemListParams,
- ),
- post_parser=ResultWrapper[ItemListResponse]._unwrapper,
+ return self._get_api_list(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ page=AsyncCursorPagination[object],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "cursor": cursor,
+ "per_page": per_page,
+ "search": search,
+ },
+ item_list_params.ItemListParams,
),
- cast_to=cast(
- Any, ResultWrapper[ItemListResponse]
- ), # Union types cannot be passed in as arguments in the type system
),
+ model=object,
)
async def delete(
@@ -552,6 +508,7 @@ async def delete(
list_id: str,
*,
account_id: str,
+ items: Iterable[item_delete_params.Item] | 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,
@@ -564,11 +521,10 @@ async def delete(
This operation is asynchronous.
To get current the operation status, invoke the
- [Get bulk operation status](/operations/lists-get-bulk-operation-status)
- endpoint with the returned `operation_id`.
+ `Get bulk operation status` endpoint with the returned `operation_id`.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -584,21 +540,17 @@ async def delete(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ItemDeleteResponse,
- await self._delete(
- f"/accounts/{account_id}/rules/lists/{list_id}/items",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._delete(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items",
+ body=await async_maybe_transform({"items": items}, item_delete_params.ItemDeleteParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper,
),
+ cast_to=cast(Type[ItemDeleteResponse], ResultWrapper[ItemDeleteResponse]),
)
async def get(
@@ -613,12 +565,12 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ItemGetResponse:
+ ) -> object:
"""
Fetches a list item in the list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -638,21 +590,16 @@ async def get(
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
if not item_id:
raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}")
- return cast(
- ItemGetResponse,
- await self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ItemGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ItemGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[object]._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py
index 8d698ddb452..a14fc8fc174 100644
--- a/src/cloudflare/resources/rules/lists/lists.py
+++ b/src/cloudflare/resources/rules/lists/lists.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, cast
+from typing import Type, cast
from typing_extensions import Literal
import httpx
@@ -26,8 +26,9 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
+from ....pagination import SyncSinglePage, AsyncSinglePage
from ....types.rules import list_create_params, list_update_params
-from ...._base_client import make_request_options
+from ...._base_client import AsyncPaginator, make_request_options
from .bulk_operations import (
BulkOperationsResource,
AsyncBulkOperationsResource,
@@ -36,8 +37,8 @@
BulkOperationsResourceWithStreamingResponse,
AsyncBulkOperationsResourceWithStreamingResponse,
)
+from ....types.rules.lists_list import ListsList
from ....types.rules.list_get_response import ListGetResponse
-from ....types.rules.list_list_response import ListListResponse
from ....types.rules.list_create_response import ListCreateResponse
from ....types.rules.list_delete_response import ListDeleteResponse
from ....types.rules.list_update_response import ListUpdateResponse
@@ -88,10 +89,10 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ListCreateResponse:
"""
- Creates a new list of the specified type.
+ Creates a new list of the specified kind.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
kind: The type of the list. Each type supports specific list items (IP addresses,
ASNs, hostnames or redirects).
@@ -110,29 +111,24 @@ def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- ListCreateResponse,
- self._post(
- f"/accounts/{account_id}/rules/lists",
- body=maybe_transform(
- {
- "kind": kind,
- "name": name,
- "description": description,
- },
- list_create_params.ListCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._post(
+ f"/accounts/{account_id}/rules/lists",
+ body=maybe_transform(
+ {
+ "kind": kind,
+ "name": name,
+ "description": description,
+ },
+ list_create_params.ListCreateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[ListCreateResponse], ResultWrapper[ListCreateResponse]),
)
def update(
@@ -152,7 +148,7 @@ def update(
Updates the description of a list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -170,22 +166,17 @@ def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListUpdateResponse,
- self._put(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- body=maybe_transform({"description": description}, list_update_params.ListUpdateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._put(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ body=maybe_transform({"description": description}, list_update_params.ListUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]),
)
def list(
@@ -198,12 +189,12 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ListListResponse:
+ ) -> SyncSinglePage[ListsList]:
"""
Fetches all lists in the account.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
extra_headers: Send extra headers
@@ -215,21 +206,13 @@ def list(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- ListListResponse,
- self._get(
- f"/accounts/{account_id}/rules/lists",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListListResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListListResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get_api_list(
+ f"/accounts/{account_id}/rules/lists",
+ page=SyncSinglePage[ListsList],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
+ model=ListsList,
)
def delete(
@@ -248,7 +231,7 @@ def delete(
Deletes a specific list and all its items.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -264,21 +247,16 @@ def delete(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListDeleteResponse,
- self._delete(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListDeleteResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._delete(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListDeleteResponse]._unwrapper,
),
+ cast_to=cast(Type[ListDeleteResponse], ResultWrapper[ListDeleteResponse]),
)
def get(
@@ -297,7 +275,7 @@ def get(
Fetches the details of a list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -313,21 +291,16 @@ def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListGetResponse,
- self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListGetResponse]._unwrapper,
),
+ cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]),
)
@@ -374,10 +347,10 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ListCreateResponse:
"""
- Creates a new list of the specified type.
+ Creates a new list of the specified kind.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
kind: The type of the list. Each type supports specific list items (IP addresses,
ASNs, hostnames or redirects).
@@ -396,29 +369,24 @@ async def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- ListCreateResponse,
- await self._post(
- f"/accounts/{account_id}/rules/lists",
- body=await async_maybe_transform(
- {
- "kind": kind,
- "name": name,
- "description": description,
- },
- list_create_params.ListCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListCreateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._post(
+ f"/accounts/{account_id}/rules/lists",
+ body=await async_maybe_transform(
+ {
+ "kind": kind,
+ "name": name,
+ "description": description,
+ },
+ list_create_params.ListCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListCreateResponse]._unwrapper,
),
+ cast_to=cast(Type[ListCreateResponse], ResultWrapper[ListCreateResponse]),
)
async def update(
@@ -438,7 +406,7 @@ async def update(
Updates the description of a list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -456,25 +424,20 @@ async def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListUpdateResponse,
- await self._put(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- body=await async_maybe_transform({"description": description}, list_update_params.ListUpdateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListUpdateResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._put(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ body=await async_maybe_transform({"description": description}, list_update_params.ListUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListUpdateResponse]._unwrapper,
),
+ cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]),
)
- async def list(
+ def list(
self,
*,
account_id: str,
@@ -484,12 +447,12 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ListListResponse:
+ ) -> AsyncPaginator[ListsList, AsyncSinglePage[ListsList]]:
"""
Fetches all lists in the account.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
extra_headers: Send extra headers
@@ -501,21 +464,13 @@ async def list(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- ListListResponse,
- await self._get(
- f"/accounts/{account_id}/rules/lists",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListListResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListListResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get_api_list(
+ f"/accounts/{account_id}/rules/lists",
+ page=AsyncSinglePage[ListsList],
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
+ model=ListsList,
)
async def delete(
@@ -534,7 +489,7 @@ async def delete(
Deletes a specific list and all its items.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -550,21 +505,16 @@ async def delete(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListDeleteResponse,
- await self._delete(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListDeleteResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._delete(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListDeleteResponse]._unwrapper,
),
+ cast_to=cast(Type[ListDeleteResponse], ResultWrapper[ListDeleteResponse]),
)
async def get(
@@ -583,7 +533,7 @@ async def get(
Fetches the details of a list.
Args:
- account_id: Defines an identifier.
+ account_id: The Account ID for this resource.
list_id: The unique ID of the list.
@@ -599,21 +549,16 @@ async def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not list_id:
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
- return cast(
- ListGetResponse,
- await self._get(
- f"/accounts/{account_id}/rules/lists/{list_id}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[ListGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[ListGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/accounts/{account_id}/rules/lists/{list_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[ListGetResponse]._unwrapper,
),
+ cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]),
)
diff --git a/src/cloudflare/resources/secrets_store/stores/secrets.py b/src/cloudflare/resources/secrets_store/stores/secrets.py
index 81691e4f625..26fc1177202 100644
--- a/src/cloudflare/resources/secrets_store/stores/secrets.py
+++ b/src/cloudflare/resources/secrets_store/stores/secrets.py
@@ -110,6 +110,7 @@ def list(
order: Literal["name", "comment", "created", "modified", "status"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
+ scopes: Iterable[List[str]] | NotGiven = NOT_GIVEN,
search: 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.
@@ -134,6 +135,8 @@ def list(
per_page: Number of objects to return per page
+ scopes: Only secrets with the given scopes will be returned
+
search: Search secrets using a filter string, filtering across name and comment
extra_headers: Send extra headers
@@ -162,6 +165,7 @@ def list(
"order": order,
"page": page,
"per_page": per_page,
+ "scopes": scopes,
"search": search,
},
secret_list_params.SecretListParams,
@@ -268,6 +272,8 @@ def duplicate(
account_id: str,
store_id: str,
name: str,
+ scopes: List[str],
+ comment: 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,
@@ -287,6 +293,10 @@ def duplicate(
name: The name of the secret
+ scopes: The list of services that can use this secret.
+
+ comment: Freeform text describing the secret
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -303,7 +313,14 @@ def duplicate(
raise ValueError(f"Expected a non-empty value for `secret_id` but received {secret_id!r}")
return self._post(
f"/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate",
- body=maybe_transform({"name": name}, secret_duplicate_params.SecretDuplicateParams),
+ body=maybe_transform(
+ {
+ "name": name,
+ "scopes": scopes,
+ "comment": comment,
+ },
+ secret_duplicate_params.SecretDuplicateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -320,9 +337,8 @@ def edit(
*,
account_id: str,
store_id: str,
- name: str,
+ comment: str | NotGiven = NOT_GIVEN,
scopes: List[str] | NotGiven = NOT_GIVEN,
- value: 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,
@@ -340,13 +356,10 @@ def edit(
secret_id: Secret identifier tag.
- name: The name of the secret
+ comment: Freeform text describing the secret
scopes: The list of services that can use this secret.
- value: The value of the secret. Note that this is 'write only' - no API reponse will
- provide this value, it is only used to create/modify secrets.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -365,9 +378,8 @@ def edit(
f"/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}",
body=maybe_transform(
{
- "name": name,
+ "comment": comment,
"scopes": scopes,
- "value": value,
},
secret_edit_params.SecretEditParams,
),
@@ -504,6 +516,7 @@ def list(
order: Literal["name", "comment", "created", "modified", "status"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
+ scopes: Iterable[List[str]] | NotGiven = NOT_GIVEN,
search: 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.
@@ -528,6 +541,8 @@ def list(
per_page: Number of objects to return per page
+ scopes: Only secrets with the given scopes will be returned
+
search: Search secrets using a filter string, filtering across name and comment
extra_headers: Send extra headers
@@ -556,6 +571,7 @@ def list(
"order": order,
"page": page,
"per_page": per_page,
+ "scopes": scopes,
"search": search,
},
secret_list_params.SecretListParams,
@@ -662,6 +678,8 @@ async def duplicate(
account_id: str,
store_id: str,
name: str,
+ scopes: List[str],
+ comment: 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,
@@ -681,6 +699,10 @@ async def duplicate(
name: The name of the secret
+ scopes: The list of services that can use this secret.
+
+ comment: Freeform text describing the secret
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -697,7 +719,14 @@ async def duplicate(
raise ValueError(f"Expected a non-empty value for `secret_id` but received {secret_id!r}")
return await self._post(
f"/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate",
- body=await async_maybe_transform({"name": name}, secret_duplicate_params.SecretDuplicateParams),
+ body=await async_maybe_transform(
+ {
+ "name": name,
+ "scopes": scopes,
+ "comment": comment,
+ },
+ secret_duplicate_params.SecretDuplicateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -714,9 +743,8 @@ async def edit(
*,
account_id: str,
store_id: str,
- name: str,
+ comment: str | NotGiven = NOT_GIVEN,
scopes: List[str] | NotGiven = NOT_GIVEN,
- value: 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,
@@ -734,13 +762,10 @@ async def edit(
secret_id: Secret identifier tag.
- name: The name of the secret
+ comment: Freeform text describing the secret
scopes: The list of services that can use this secret.
- value: The value of the secret. Note that this is 'write only' - no API reponse will
- provide this value, it is only used to create/modify secrets.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -759,9 +784,8 @@ async def edit(
f"/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}",
body=await async_maybe_transform(
{
- "name": name,
+ "comment": comment,
"scopes": scopes,
- "value": value,
},
secret_edit_params.SecretEditParams,
),
diff --git a/src/cloudflare/resources/snippets/content.py b/src/cloudflare/resources/snippets/content.py
index 92f1ffef2f8..53ee455d60b 100644
--- a/src/cloudflare/resources/snippets/content.py
+++ b/src/cloudflare/resources/snippets/content.py
@@ -55,12 +55,12 @@ def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BinaryAPIResponse:
"""
- Snippet Content
+ Fetches the content of a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
@@ -117,12 +117,12 @@ async def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncBinaryAPIResponse:
"""
- Snippet Content
+ Fetches the content of a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/snippets/rules.py b/src/cloudflare/resources/snippets/rules.py
index 51785fd67ab..d85e4a640cd 100644
--- a/src/cloudflare/resources/snippets/rules.py
+++ b/src/cloudflare/resources/snippets/rules.py
@@ -50,7 +50,7 @@ def update(
self,
*,
zone_id: str,
- rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN,
+ rules: Iterable[rule_update_params.Rule],
# 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,
@@ -59,12 +59,12 @@ def update(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncSinglePage[RuleUpdateResponse]:
"""
- Put Rules
+ Updates all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- rules: List of snippet rules
+ rules: A list of snippet rules.
extra_headers: Send extra headers
@@ -99,10 +99,10 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncSinglePage[RuleListResponse]:
"""
- Rules
+ Fetches all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
extra_headers: Send extra headers
@@ -133,12 +133,12 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RuleDeleteResponse:
+ ) -> SyncSinglePage[RuleDeleteResponse]:
"""
- Delete All Rules
+ Deletes all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
extra_headers: Send extra headers
@@ -150,12 +150,14 @@ def delete(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return self._delete(
+ return self._get_api_list(
f"/zones/{zone_id}/snippets/snippet_rules",
+ page=SyncSinglePage[RuleDeleteResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=RuleDeleteResponse,
+ model=RuleDeleteResponse,
+ method="delete",
)
@@ -183,7 +185,7 @@ def update(
self,
*,
zone_id: str,
- rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN,
+ rules: Iterable[rule_update_params.Rule],
# 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,
@@ -192,12 +194,12 @@ def update(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[RuleUpdateResponse, AsyncSinglePage[RuleUpdateResponse]]:
"""
- Put Rules
+ Updates all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- rules: List of snippet rules
+ rules: A list of snippet rules.
extra_headers: Send extra headers
@@ -232,10 +234,10 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[RuleListResponse, AsyncSinglePage[RuleListResponse]]:
"""
- Rules
+ Fetches all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
extra_headers: Send extra headers
@@ -256,7 +258,7 @@ def list(
model=RuleListResponse,
)
- async def delete(
+ def delete(
self,
*,
zone_id: str,
@@ -266,12 +268,12 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RuleDeleteResponse:
+ ) -> AsyncPaginator[RuleDeleteResponse, AsyncSinglePage[RuleDeleteResponse]]:
"""
- Delete All Rules
+ Deletes all snippet rules belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
extra_headers: Send extra headers
@@ -283,12 +285,14 @@ async def delete(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return await self._delete(
+ return self._get_api_list(
f"/zones/{zone_id}/snippets/snippet_rules",
+ page=AsyncSinglePage[RuleDeleteResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=RuleDeleteResponse,
+ model=RuleDeleteResponse,
+ method="delete",
)
diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py
index 98fb8e4aa61..5052267b8d0 100644
--- a/src/cloudflare/resources/snippets/snippets.py
+++ b/src/cloudflare/resources/snippets/snippets.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Optional, cast
+from typing import List, Type, Mapping, Optional, cast
import httpx
@@ -22,8 +22,8 @@
ContentResourceWithStreamingResponse,
AsyncContentResourceWithStreamingResponse,
)
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ..._utils import maybe_transform, async_maybe_transform
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -33,11 +33,13 @@
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.snippets import snippet_update_params
-from ...types.snippets.snippet import Snippet
+from ...types.snippets import snippet_list_params, snippet_update_params
+from ...types.snippets.snippet_get_response import SnippetGetResponse
+from ...types.snippets.snippet_list_response import SnippetListResponse
from ...types.snippets.snippet_delete_response import SnippetDeleteResponse
+from ...types.snippets.snippet_update_response import SnippetUpdateResponse
__all__ = ["SnippetsResource", "AsyncSnippetsResource"]
@@ -75,24 +77,26 @@ def update(
snippet_name: str,
*,
zone_id: str,
- files: str | NotGiven = NOT_GIVEN,
- metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN,
+ files: List[FileTypes],
+ metadata: snippet_update_params.Metadata,
# 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,
- ) -> Optional[Snippet]:
+ ) -> SnippetUpdateResponse:
"""
- Put Snippet
+ Creates or updates a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
- files: Content files of uploaded snippet
+ files: The list of files belonging to the snippet.
+
+ metadata: Metadata about the snippet.
extra_headers: Send extra headers
@@ -106,45 +110,53 @@ def update(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not snippet_name:
raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}")
+ body = deepcopy_minimal(
+ {
+ "files": files,
+ "metadata": metadata,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/zones/{zone_id}/snippets/{snippet_name}",
- body=maybe_transform(
- {
- "files": files,
- "metadata": metadata,
- },
- snippet_update_params.SnippetUpdateParams,
- ),
+ body=maybe_transform(body, snippet_update_params.SnippetUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[Snippet]]._unwrapper,
+ post_parser=ResultWrapper[SnippetUpdateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]),
+ cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]),
)
def list(
self,
*,
zone_id: str,
+ page: int | NotGiven = NOT_GIVEN,
+ per_page: int | 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[Snippet]:
+ ) -> SyncV4PagePaginationArray[SnippetListResponse]:
"""
- All Snippets
+ Fetches all snippets belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
+
+ page: The current page number.
+
+ per_page: The number of results to return per page.
extra_headers: Send extra headers
@@ -158,11 +170,21 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/snippets",
- page=SyncSinglePage[Snippet],
+ page=SyncV4PagePaginationArray[SnippetListResponse],
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,
+ },
+ snippet_list_params.SnippetListParams,
+ ),
),
- model=Snippet,
+ model=SnippetListResponse,
)
def delete(
@@ -176,14 +198,14 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SnippetDeleteResponse:
+ ) -> str:
"""
- Delete Snippet
+ Deletes a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
@@ -200,9 +222,13 @@ def delete(
return self._delete(
f"/zones/{zone_id}/snippets/{snippet_name}",
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,
+ post_parser=ResultWrapper[Optional[SnippetDeleteResponse]]._unwrapper,
),
- cast_to=SnippetDeleteResponse,
+ cast_to=cast(Type[str], ResultWrapper[str]),
)
def get(
@@ -216,14 +242,14 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Snippet]:
+ ) -> SnippetGetResponse:
"""
- Snippet
+ Fetches a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
@@ -244,9 +270,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[Snippet]]._unwrapper,
+ post_parser=ResultWrapper[SnippetGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]),
+ cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]),
)
@@ -283,24 +309,26 @@ async def update(
snippet_name: str,
*,
zone_id: str,
- files: str | NotGiven = NOT_GIVEN,
- metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN,
+ files: List[FileTypes],
+ metadata: snippet_update_params.Metadata,
# 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,
- ) -> Optional[Snippet]:
+ ) -> SnippetUpdateResponse:
"""
- Put Snippet
+ Creates or updates a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
- files: Content files of uploaded snippet
+ files: The list of files belonging to the snippet.
+
+ metadata: Metadata about the snippet.
extra_headers: Send extra headers
@@ -314,45 +342,53 @@ async def update(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
if not snippet_name:
raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}")
+ body = deepcopy_minimal(
+ {
+ "files": files,
+ "metadata": metadata,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/zones/{zone_id}/snippets/{snippet_name}",
- body=await async_maybe_transform(
- {
- "files": files,
- "metadata": metadata,
- },
- snippet_update_params.SnippetUpdateParams,
- ),
+ body=await async_maybe_transform(body, snippet_update_params.SnippetUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[Snippet]]._unwrapper,
+ post_parser=ResultWrapper[SnippetUpdateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]),
+ cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]),
)
def list(
self,
*,
zone_id: str,
+ page: int | NotGiven = NOT_GIVEN,
+ per_page: int | 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[Snippet, AsyncSinglePage[Snippet]]:
+ ) -> AsyncPaginator[SnippetListResponse, AsyncV4PagePaginationArray[SnippetListResponse]]:
"""
- All Snippets
+ Fetches all snippets belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
+
+ page: The current page number.
+
+ per_page: The number of results to return per page.
extra_headers: Send extra headers
@@ -366,11 +402,21 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/snippets",
- page=AsyncSinglePage[Snippet],
+ page=AsyncV4PagePaginationArray[SnippetListResponse],
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,
+ },
+ snippet_list_params.SnippetListParams,
+ ),
),
- model=Snippet,
+ model=SnippetListResponse,
)
async def delete(
@@ -384,14 +430,14 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SnippetDeleteResponse:
+ ) -> str:
"""
- Delete Snippet
+ Deletes a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
@@ -408,9 +454,13 @@ async def delete(
return await self._delete(
f"/zones/{zone_id}/snippets/{snippet_name}",
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,
+ post_parser=ResultWrapper[Optional[SnippetDeleteResponse]]._unwrapper,
),
- cast_to=SnippetDeleteResponse,
+ cast_to=cast(Type[str], ResultWrapper[str]),
)
async def get(
@@ -424,14 +474,14 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Snippet]:
+ ) -> SnippetGetResponse:
"""
- Snippet
+ Fetches a snippet belonging to the zone.
Args:
- zone_id: Identifier
+ zone_id: The unique ID of the zone.
- snippet_name: Snippet identifying name
+ snippet_name: The identifying name of the snippet.
extra_headers: Send extra headers
@@ -452,9 +502,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[Snippet]]._unwrapper,
+ post_parser=ResultWrapper[SnippetGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]),
+ cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]),
)
diff --git a/src/cloudflare/resources/ssl/recommendations.py b/src/cloudflare/resources/ssl/recommendations.py
index 512e55ba1b3..4efd89cb294 100644
--- a/src/cloudflare/resources/ssl/recommendations.py
+++ b/src/cloudflare/resources/ssl/recommendations.py
@@ -2,7 +2,8 @@
from __future__ import annotations
-from typing import Type, Optional, cast
+import typing_extensions
+from typing import Type, cast
import httpx
@@ -42,6 +43,7 @@ def with_streaming_response(self) -> RecommendationsResourceWithStreamingRespons
"""
return RecommendationsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated("SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS")
def get(
self,
*,
@@ -52,13 +54,11 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[RecommendationGetResponse]:
+ ) -> RecommendationGetResponse:
"""
Retrieve the SSL/TLS Recommender's recommendation for a zone.
Args:
- zone_id: Identifier.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -76,9 +76,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RecommendationGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[RecommendationGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RecommendationGetResponse]], ResultWrapper[RecommendationGetResponse]),
+ cast_to=cast(Type[RecommendationGetResponse], ResultWrapper[RecommendationGetResponse]),
)
@@ -102,6 +102,7 @@ def with_streaming_response(self) -> AsyncRecommendationsResourceWithStreamingRe
"""
return AsyncRecommendationsResourceWithStreamingResponse(self)
+ @typing_extensions.deprecated("SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS")
async def get(
self,
*,
@@ -112,13 +113,11 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[RecommendationGetResponse]:
+ ) -> RecommendationGetResponse:
"""
Retrieve the SSL/TLS Recommender's recommendation for a zone.
Args:
- zone_id: Identifier.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -136,9 +135,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RecommendationGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[RecommendationGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RecommendationGetResponse]], ResultWrapper[RecommendationGetResponse]),
+ cast_to=cast(Type[RecommendationGetResponse], ResultWrapper[RecommendationGetResponse]),
)
@@ -146,8 +145,10 @@ class RecommendationsResourceWithRawResponse:
def __init__(self, recommendations: RecommendationsResource) -> None:
self._recommendations = recommendations
- self.get = to_raw_response_wrapper(
- recommendations.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ recommendations.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -155,8 +156,10 @@ class AsyncRecommendationsResourceWithRawResponse:
def __init__(self, recommendations: AsyncRecommendationsResource) -> None:
self._recommendations = recommendations
- self.get = async_to_raw_response_wrapper(
- recommendations.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ recommendations.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -164,8 +167,10 @@ class RecommendationsResourceWithStreamingResponse:
def __init__(self, recommendations: RecommendationsResource) -> None:
self._recommendations = recommendations
- self.get = to_streamed_response_wrapper(
- recommendations.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ recommendations.get # pyright: ignore[reportDeprecated],
+ )
)
@@ -173,6 +178,8 @@ class AsyncRecommendationsResourceWithStreamingResponse:
def __init__(self, recommendations: AsyncRecommendationsResource) -> None:
self._recommendations = recommendations
- self.get = async_to_streamed_response_wrapper(
- recommendations.get,
+ self.get = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ recommendations.get # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py
index f818bb943bd..23c1b57dc2b 100644
--- a/src/cloudflare/resources/stream/stream.py
+++ b/src/cloudflare/resources/stream/stream.py
@@ -292,7 +292,7 @@ def list(
include_counts: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
- status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]
+ status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"]
| NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -705,7 +705,7 @@ def list(
include_counts: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
- status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]
+ status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"]
| NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/cloudflare/resources/user/tokens/permission_groups.py b/src/cloudflare/resources/user/tokens/permission_groups.py
index 87479a4720e..ba2696ca82b 100644
--- a/src/cloudflare/resources/user/tokens/permission_groups.py
+++ b/src/cloudflare/resources/user/tokens/permission_groups.py
@@ -5,6 +5,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 (
@@ -15,6 +16,7 @@
)
from ....pagination import SyncSinglePage, AsyncSinglePage
from ...._base_client import AsyncPaginator, make_request_options
+from ....types.user.tokens import permission_group_list_params
from ....types.user.tokens.permission_group_list_response import PermissionGroupListResponse
__all__ = ["PermissionGroupsResource", "AsyncPermissionGroupsResource"]
@@ -43,6 +45,8 @@ def with_streaming_response(self) -> PermissionGroupsResourceWithStreamingRespon
def list(
self,
*,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
@@ -50,12 +54,37 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncSinglePage[PermissionGroupListResponse]:
- """Find all available permission groups for API Tokens"""
+ """
+ Find all available permission groups for API Tokens
+
+ Args:
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
+ 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
+ """
return self._get_api_list(
"/user/tokens/permission_groups",
page=SyncSinglePage[PermissionGroupListResponse],
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(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_list_params.PermissionGroupListParams,
+ ),
),
model=PermissionGroupListResponse,
)
@@ -84,6 +113,8 @@ def with_streaming_response(self) -> AsyncPermissionGroupsResourceWithStreamingR
def list(
self,
*,
+ name: str | NotGiven = NOT_GIVEN,
+ scope: 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,
@@ -91,12 +122,37 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[PermissionGroupListResponse, AsyncSinglePage[PermissionGroupListResponse]]:
- """Find all available permission groups for API Tokens"""
+ """
+ Find all available permission groups for API Tokens
+
+ Args:
+ name: Filter by the name of the permission group. The value must be URL-encoded.
+
+ scope: Filter by the scope of the permission group. The value must be URL-encoded.
+
+ 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
+ """
return self._get_api_list(
"/user/tokens/permission_groups",
page=AsyncSinglePage[PermissionGroupListResponse],
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(
+ {
+ "name": name,
+ "scope": scope,
+ },
+ permission_group_list_params.PermissionGroupListParams,
+ ),
),
model=PermissionGroupListResponse,
)
diff --git a/src/cloudflare/resources/user/tokens/tokens.py b/src/cloudflare/resources/user/tokens/tokens.py
index a3a10f41216..aeeb5b0c05d 100644
--- a/src/cloudflare/resources/user/tokens/tokens.py
+++ b/src/cloudflare/resources/user/tokens/tokens.py
@@ -139,10 +139,10 @@ def update(
*,
name: str,
policies: Iterable[TokenPolicy],
- status: Literal["active", "disabled", "expired"],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: Literal["active", "disabled", "expired"] | 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,
@@ -160,13 +160,13 @@ def update(
policies: List of access policies assigned to the token.
- status: Status of the token.
-
expires_on: The expiration time on or after which the JWT MUST NOT be accepted for
processing.
not_before: The time before which the token MUST NOT be accepted for processing.
+ status: Status of the token.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -183,10 +183,10 @@ def update(
{
"name": name,
"policies": policies,
- "status": status,
"condition": condition,
"expires_on": expires_on,
"not_before": not_before,
+ "status": status,
},
token_update_params.TokenUpdateParams,
),
@@ -445,10 +445,10 @@ async def update(
*,
name: str,
policies: Iterable[TokenPolicy],
- status: Literal["active", "disabled", "expired"],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
+ status: Literal["active", "disabled", "expired"] | 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,
@@ -466,13 +466,13 @@ async def update(
policies: List of access policies assigned to the token.
- status: Status of the token.
-
expires_on: The expiration time on or after which the JWT MUST NOT be accepted for
processing.
not_before: The time before which the token MUST NOT be accepted for processing.
+ status: Status of the token.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -489,10 +489,10 @@ async def update(
{
"name": name,
"policies": policies,
- "status": status,
"condition": condition,
"expires_on": expires_on,
"not_before": not_before,
+ "status": status,
},
token_update_params.TokenUpdateParams,
),
diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py
index 56c3d0f6686..40c644cb14b 100644
--- a/src/cloudflare/resources/workers/scripts/content.py
+++ b/src/cloudflare/resources/workers/scripts/content.py
@@ -2,12 +2,18 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import List, Type, Mapping, cast
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import maybe_transform, strip_not_given, async_maybe_transform
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ...._utils import (
+ extract_files,
+ maybe_transform,
+ strip_not_given,
+ deepcopy_minimal,
+ async_maybe_transform,
+)
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@@ -28,7 +34,6 @@
from ...._base_client import make_request_options
from ....types.workers.script import Script
from ....types.workers.scripts import content_update_params
-from ....types.workers.worker_metadata_param import WorkerMetadataParam
__all__ = ["ContentResource", "AsyncContentResource"]
@@ -58,7 +63,8 @@ def update(
script_name: str,
*,
account_id: str,
- metadata: WorkerMetadataParam,
+ metadata: content_update_params.Metadata,
+ files: List[FileTypes] | NotGiven = NOT_GIVEN,
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -78,6 +84,14 @@ def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -99,13 +113,21 @@ def update(
),
**(extra_headers or {}),
}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/workers/scripts/{script_name}/content",
- body=maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams),
+ body=maybe_transform(body, content_update_params.ContentUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -183,7 +205,8 @@ async def update(
script_name: str,
*,
account_id: str,
- metadata: WorkerMetadataParam,
+ metadata: content_update_params.Metadata,
+ files: List[FileTypes] | NotGiven = NOT_GIVEN,
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -203,6 +226,14 @@ async def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -224,13 +255,21 @@ async def update(
),
**(extra_headers or {}),
}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/workers/scripts/{script_name}/content",
- body=await async_maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams),
+ body=await async_maybe_transform(body, content_update_params.ContentUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/workers/scripts/deployments.py b/src/cloudflare/resources/workers/scripts/deployments.py
index 906cc4caf10..e4eeb69456a 100644
--- a/src/cloudflare/resources/workers/scripts/deployments.py
+++ b/src/cloudflare/resources/workers/scripts/deployments.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Iterable, Optional, cast
+from typing import Type, Iterable, cast
from typing_extensions import Literal
import httpx
@@ -20,9 +20,10 @@
from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
from ....types.workers.scripts import deployment_create_params
-from ....types.workers.scripts.deployment_param import DeploymentParam
from ....types.workers.scripts.deployment_get_response import DeploymentGetResponse
+from ....types.workers.scripts.deployment_list_response import DeploymentListResponse
from ....types.workers.scripts.deployment_create_response import DeploymentCreateResponse
+from ....types.workers.scripts.deployment_delete_response import DeploymentDeleteResponse
__all__ = ["DeploymentsResource", "AsyncDeploymentsResource"]
@@ -55,14 +56,14 @@ def create(
strategy: Literal["percentage"],
versions: Iterable[deployment_create_params.Version],
force: bool | NotGiven = NOT_GIVEN,
- annotations: DeploymentParam | NotGiven = NOT_GIVEN,
+ annotations: deployment_create_params.Annotations | 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,
- ) -> Optional[DeploymentCreateResponse]:
+ ) -> DeploymentCreateResponse:
"""
Deployments configure how
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions)
@@ -72,7 +73,7 @@ def create(
Args:
account_id: Identifier.
- script_name: Name of the script.
+ script_name: Name of the script, used in URLs and route configuration.
force: If set to true, the deployment will be created even if normally blocked by
something such rolling back to an older version when a secret has changed.
@@ -105,12 +106,12 @@ def create(
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"force": force}, deployment_create_params.DeploymentCreateParams),
- post_parser=ResultWrapper[Optional[DeploymentCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[DeploymentCreateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[DeploymentCreateResponse]], ResultWrapper[DeploymentCreateResponse]),
+ cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]),
)
- def get(
+ def list(
self,
script_name: str,
*,
@@ -121,7 +122,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DeploymentGetResponse]:
+ ) -> DeploymentListResponse:
"""List of Worker Deployments.
The first deployment in the list is the latest
@@ -130,7 +131,7 @@ def get(
Args:
account_id: Identifier.
- script_name: Name of the script.
+ script_name: Name of the script, used in URLs and route configuration.
extra_headers: Send extra headers
@@ -151,9 +152,101 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[DeploymentGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[DeploymentListResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[DeploymentGetResponse]], ResultWrapper[DeploymentGetResponse]),
+ cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]),
+ )
+
+ def delete(
+ self,
+ deployment_id: str,
+ *,
+ account_id: str,
+ script_name: 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,
+ ) -> DeploymentDeleteResponse:
+ """Delete a Worker Deployment.
+
+ The latest deployment, which is actively serving
+ traffic, cannot be deleted. All other deployments can be deleted.
+
+ Args:
+ account_id: Identifier.
+
+ script_name: Name of the script, used in URLs and route configuration.
+
+ 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 script_name:
+ raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ if not deployment_id:
+ raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=DeploymentDeleteResponse,
+ )
+
+ def get(
+ self,
+ deployment_id: str,
+ *,
+ account_id: str,
+ script_name: 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,
+ ) -> DeploymentGetResponse:
+ """
+ Get information about a Worker Deployment.
+
+ Args:
+ account_id: Identifier.
+
+ script_name: Name of the script, used in URLs and route configuration.
+
+ 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 script_name:
+ raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ if not deployment_id:
+ raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}")
+ return self._get(
+ f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[DeploymentGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]),
)
@@ -185,14 +278,14 @@ async def create(
strategy: Literal["percentage"],
versions: Iterable[deployment_create_params.Version],
force: bool | NotGiven = NOT_GIVEN,
- annotations: DeploymentParam | NotGiven = NOT_GIVEN,
+ annotations: deployment_create_params.Annotations | 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,
- ) -> Optional[DeploymentCreateResponse]:
+ ) -> DeploymentCreateResponse:
"""
Deployments configure how
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions)
@@ -202,7 +295,7 @@ async def create(
Args:
account_id: Identifier.
- script_name: Name of the script.
+ script_name: Name of the script, used in URLs and route configuration.
force: If set to true, the deployment will be created even if normally blocked by
something such rolling back to an older version when a secret has changed.
@@ -235,12 +328,12 @@ async def create(
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform({"force": force}, deployment_create_params.DeploymentCreateParams),
- post_parser=ResultWrapper[Optional[DeploymentCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[DeploymentCreateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[DeploymentCreateResponse]], ResultWrapper[DeploymentCreateResponse]),
+ cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]),
)
- async def get(
+ async def list(
self,
script_name: str,
*,
@@ -251,7 +344,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DeploymentGetResponse]:
+ ) -> DeploymentListResponse:
"""List of Worker Deployments.
The first deployment in the list is the latest
@@ -260,7 +353,7 @@ async def get(
Args:
account_id: Identifier.
- script_name: Name of the script.
+ script_name: Name of the script, used in URLs and route configuration.
extra_headers: Send extra headers
@@ -281,9 +374,101 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[DeploymentGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[DeploymentListResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]),
+ )
+
+ async def delete(
+ self,
+ deployment_id: str,
+ *,
+ account_id: str,
+ script_name: 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,
+ ) -> DeploymentDeleteResponse:
+ """Delete a Worker Deployment.
+
+ The latest deployment, which is actively serving
+ traffic, cannot be deleted. All other deployments can be deleted.
+
+ Args:
+ account_id: Identifier.
+
+ script_name: Name of the script, used in URLs and route configuration.
+
+ 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 script_name:
+ raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ if not deployment_id:
+ raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=DeploymentDeleteResponse,
+ )
+
+ async def get(
+ self,
+ deployment_id: str,
+ *,
+ account_id: str,
+ script_name: 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,
+ ) -> DeploymentGetResponse:
+ """
+ Get information about a Worker Deployment.
+
+ Args:
+ account_id: Identifier.
+
+ script_name: Name of the script, used in URLs and route configuration.
+
+ 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 script_name:
+ raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ if not deployment_id:
+ raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}")
+ return await self._get(
+ f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[DeploymentGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[DeploymentGetResponse]], ResultWrapper[DeploymentGetResponse]),
+ cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]),
)
@@ -294,6 +479,12 @@ def __init__(self, deployments: DeploymentsResource) -> None:
self.create = to_raw_response_wrapper(
deployments.create,
)
+ self.list = to_raw_response_wrapper(
+ deployments.list,
+ )
+ self.delete = to_raw_response_wrapper(
+ deployments.delete,
+ )
self.get = to_raw_response_wrapper(
deployments.get,
)
@@ -306,6 +497,12 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
self.create = async_to_raw_response_wrapper(
deployments.create,
)
+ self.list = async_to_raw_response_wrapper(
+ deployments.list,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ deployments.delete,
+ )
self.get = async_to_raw_response_wrapper(
deployments.get,
)
@@ -318,6 +515,12 @@ def __init__(self, deployments: DeploymentsResource) -> None:
self.create = to_streamed_response_wrapper(
deployments.create,
)
+ self.list = to_streamed_response_wrapper(
+ deployments.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ deployments.delete,
+ )
self.get = to_streamed_response_wrapper(
deployments.get,
)
@@ -330,6 +533,12 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
self.create = async_to_streamed_response_wrapper(
deployments.create,
)
+ self.list = async_to_streamed_response_wrapper(
+ deployments.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ deployments.delete,
+ )
self.get = async_to_streamed_response_wrapper(
deployments.get,
)
diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py
index e4937fa83ae..815e4ce0192 100644
--- a/src/cloudflare/resources/workers/scripts/scripts.py
+++ b/src/cloudflare/resources/workers/scripts/scripts.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Type, Optional, cast
+from typing import List, Type, Mapping, Optional, cast
import httpx
@@ -47,7 +47,7 @@
AsyncVersionsResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ...._utils import maybe_transform, async_maybe_transform
+from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from .schedules import (
SchedulesResource,
AsyncSchedulesResource,
@@ -172,7 +172,7 @@ def update(
*,
account_id: str,
metadata: script_update_params.Metadata,
- files: Dict[str, FileTypes] = {},
+ files: List[FileTypes] | 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,
@@ -193,6 +193,14 @@ def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -205,14 +213,22 @@ def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
- # It should be noted that the actual Content-Type header that will be
- # sent to the server will contain a `boundary` parameter, e.g.
- # multipart/form-data; boundary=---abc--
- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
+ if extracted_files:
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/workers/scripts/{script_name}",
- body=maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams),
- files=files,
+ body=maybe_transform(body, script_update_params.ScriptUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -421,7 +437,7 @@ async def update(
*,
account_id: str,
metadata: script_update_params.Metadata,
- files: Dict[str, FileTypes] = {},
+ files: List[FileTypes] | 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,
@@ -442,6 +458,14 @@ async def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -454,14 +478,22 @@ async def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
- # It should be noted that the actual Content-Type header that will be
- # sent to the server will contain a `boundary` parameter, e.g.
- # multipart/form-data; boundary=---abc--
- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
+ if extracted_files:
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/workers/scripts/{script_name}",
- body=await async_maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams),
- files=files,
+ body=await async_maybe_transform(body, script_update_params.ScriptUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/workers/scripts/versions.py b/src/cloudflare/resources/workers/scripts/versions.py
index e4755f21f7c..b2f6b3e4d3e 100644
--- a/src/cloudflare/resources/workers/scripts/versions.py
+++ b/src/cloudflare/resources/workers/scripts/versions.py
@@ -2,12 +2,12 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import List, Type, Mapping, cast
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import maybe_transform, async_maybe_transform
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@@ -53,6 +53,7 @@ def create(
*,
account_id: str,
metadata: version_create_params.Metadata,
+ files: List[FileTypes] | 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,
@@ -73,6 +74,14 @@ def create(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -85,13 +94,21 @@ def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._post(
f"/accounts/{account_id}/workers/scripts/{script_name}/versions",
- body=maybe_transform({"metadata": metadata}, version_create_params.VersionCreateParams),
+ body=maybe_transform(body, version_create_params.VersionCreateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -238,6 +255,7 @@ async def create(
*,
account_id: str,
metadata: version_create_params.Metadata,
+ files: List[FileTypes] | 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,
@@ -258,6 +276,14 @@ async def create(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -270,13 +296,21 @@ async def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._post(
f"/accounts/{account_id}/workers/scripts/{script_name}/versions",
- body=await async_maybe_transform({"metadata": metadata}, version_create_params.VersionCreateParams),
+ body=await async_maybe_transform(body, version_create_params.VersionCreateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
index fec2b2495b0..7a7d6979ee5 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
@@ -2,12 +2,18 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import List, Type, Mapping, cast
import httpx
-from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ......_utils import maybe_transform, strip_not_given, async_maybe_transform
+from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ......_utils import (
+ extract_files,
+ maybe_transform,
+ strip_not_given,
+ deepcopy_minimal,
+ async_maybe_transform,
+)
from ......_compat import cached_property
from ......_resource import SyncAPIResource, AsyncAPIResource
from ......_response import (
@@ -60,6 +66,7 @@ def update(
account_id: str,
dispatch_namespace: str,
metadata: WorkerMetadataParam,
+ files: List[FileTypes] | NotGiven = NOT_GIVEN,
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -81,6 +88,14 @@ def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -104,13 +119,21 @@ def update(
),
**(extra_headers or {}),
}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content",
- body=maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams),
+ body=maybe_transform(body, content_update_params.ContentUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -196,6 +219,7 @@ async def update(
account_id: str,
dispatch_namespace: str,
metadata: WorkerMetadataParam,
+ files: List[FileTypes] | NotGiven = NOT_GIVEN,
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -217,6 +241,14 @@ async def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -240,13 +272,21 @@ async def update(
),
**(extra_headers or {}),
}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content",
- body=await async_maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams),
+ body=await async_maybe_transform(body, content_update_params.ContentUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
index 6212535ade3..6e66e7c29f7 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Type, Optional, cast
+from typing import List, Type, Mapping, Optional, cast
import httpx
@@ -47,7 +47,7 @@
AsyncSettingsResourceWithStreamingResponse,
)
from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ......_utils import maybe_transform, async_maybe_transform
+from ......_utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ......_compat import cached_property
from .asset_upload import (
AssetUploadResource,
@@ -124,7 +124,7 @@ def update(
account_id: str,
dispatch_namespace: str,
metadata: script_update_params.Metadata,
- files: Dict[str, FileTypes] = {},
+ files: List[FileTypes] | 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,
@@ -147,6 +147,14 @@ def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -161,14 +169,22 @@ def update(
raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
- # It should be noted that the actual Content-Type header that will be
- # sent to the server will contain a `boundary` parameter, e.g.
- # multipart/form-data; boundary=---abc--
- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
+ if extracted_files:
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}",
- body=maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams),
- files=files,
+ body=maybe_transform(body, script_update_params.ScriptUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -338,7 +354,7 @@ async def update(
account_id: str,
dispatch_namespace: str,
metadata: script_update_params.Metadata,
- files: Dict[str, FileTypes] = {},
+ files: List[FileTypes] | 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,
@@ -361,6 +377,14 @@ async def update(
metadata: JSON encoded metadata about the uploaded parts and Worker configuration.
+ files: An array of modules (often JavaScript files) comprising a Worker script. At
+ least one module must be present and referenced in the metadata as `main_module`
+ or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -375,14 +399,22 @@ async def update(
raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}")
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
- # It should be noted that the actual Content-Type header that will be
- # sent to the server will contain a `boundary` parameter, e.g.
- # multipart/form-data; boundary=---abc--
- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ body = deepcopy_minimal(
+ {
+ "metadata": metadata,
+ "files": files,
+ }
+ )
+ extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]])
+ if extracted_files:
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}",
- body=await async_maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams),
- files=files,
+ body=await async_maybe_transform(body, script_update_params.ScriptUpdateParams),
+ files=extracted_files,
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/workflows/instances/instances.py b/src/cloudflare/resources/workflows/instances/instances.py
index 1ba9e5e73f3..eeccbe510a0 100644
--- a/src/cloudflare/resources/workflows/instances/instances.py
+++ b/src/cloudflare/resources/workflows/instances/instances.py
@@ -80,6 +80,7 @@ def create(
*,
account_id: str,
instance_id: str | NotGiven = NOT_GIVEN,
+ instance_retention: object | NotGiven = NOT_GIVEN,
params: object | 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.
@@ -109,6 +110,7 @@ def create(
body=maybe_transform(
{
"instance_id": instance_id,
+ "instance_retention": instance_retention,
"params": params,
},
instance_create_params.InstanceCreateParams,
@@ -128,6 +130,7 @@ def list(
workflow_name: str,
*,
account_id: str,
+ cursor: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
@@ -147,10 +150,14 @@ def list(
List of workflow instances
Args:
+ cursor: `page` and `cursor` are mutually exclusive, use one or the other.
+
date_end: Accepts ISO 8601 with no timezone offsets and in UTC.
date_start: Accepts ISO 8601 with no timezone offsets and in UTC.
+ page: `page` and `cursor` are mutually exclusive, use one or the other.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -173,6 +180,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "cursor": cursor,
"date_end": date_end,
"date_start": date_start,
"page": page,
@@ -303,6 +311,7 @@ async def create(
*,
account_id: str,
instance_id: str | NotGiven = NOT_GIVEN,
+ instance_retention: object | NotGiven = NOT_GIVEN,
params: object | 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.
@@ -332,6 +341,7 @@ async def create(
body=await async_maybe_transform(
{
"instance_id": instance_id,
+ "instance_retention": instance_retention,
"params": params,
},
instance_create_params.InstanceCreateParams,
@@ -351,6 +361,7 @@ def list(
workflow_name: str,
*,
account_id: str,
+ cursor: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
@@ -370,10 +381,14 @@ def list(
List of workflow instances
Args:
+ cursor: `page` and `cursor` are mutually exclusive, use one or the other.
+
date_end: Accepts ISO 8601 with no timezone offsets and in UTC.
date_start: Accepts ISO 8601 with no timezone offsets and in UTC.
+ page: `page` and `cursor` are mutually exclusive, use one or the other.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -396,6 +411,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "cursor": cursor,
"date_end": date_end,
"date_start": date_start,
"page": page,
diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py
index a9f48d3a14c..00e7bff9f3f 100644
--- a/src/cloudflare/resources/zero_trust/access/applications/applications.py
+++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py
@@ -1162,6 +1162,7 @@ def create(
landing_page_design: application_create_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN,
skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN,
target_criteria: Iterable[application_create_params.InfrastructureApplicationTargetCriterion]
+ | Iterable[application_create_params.BrowserRdpApplicationTargetCriterion]
| 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.
@@ -2312,6 +2313,7 @@ def update(
landing_page_design: application_update_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN,
skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN,
target_criteria: Iterable[application_update_params.InfrastructureApplicationTargetCriterion]
+ | Iterable[application_update_params.BrowserRdpApplicationTargetCriterion]
| 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.
@@ -2399,6 +2401,7 @@ def list(
zone_id: str | NotGiven = NOT_GIVEN,
aud: str | NotGiven = NOT_GIVEN,
domain: str | NotGiven = NOT_GIVEN,
+ exact: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -2420,6 +2423,8 @@ def list(
domain: The domain of the app.
+ exact: True for only exact string matches against passed name/domain query parameters.
+
name: The name of the app.
search: Search for apps by other listed query parameters.
@@ -2456,6 +2461,7 @@ def list(
{
"aud": aud,
"domain": domain,
+ "exact": exact,
"name": name,
"search": search,
},
@@ -3723,6 +3729,7 @@ async def create(
landing_page_design: application_create_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN,
skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN,
target_criteria: Iterable[application_create_params.InfrastructureApplicationTargetCriterion]
+ | Iterable[application_create_params.BrowserRdpApplicationTargetCriterion]
| 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.
@@ -4873,6 +4880,7 @@ async def update(
landing_page_design: application_update_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN,
skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN,
target_criteria: Iterable[application_update_params.InfrastructureApplicationTargetCriterion]
+ | Iterable[application_update_params.BrowserRdpApplicationTargetCriterion]
| 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.
@@ -4960,6 +4968,7 @@ def list(
zone_id: str | NotGiven = NOT_GIVEN,
aud: str | NotGiven = NOT_GIVEN,
domain: str | NotGiven = NOT_GIVEN,
+ exact: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -4981,6 +4990,8 @@ def list(
domain: The domain of the app.
+ exact: True for only exact string matches against passed name/domain query parameters.
+
name: The name of the app.
search: Search for apps by other listed query parameters.
@@ -5017,6 +5028,7 @@ def list(
{
"aud": aud,
"domain": domain,
+ "exact": exact,
"name": name,
"search": search,
},
diff --git a/src/cloudflare/resources/zero_trust/devices/devices_.py b/src/cloudflare/resources/zero_trust/devices/devices_.py
index 82113483ab9..e8590a1f824 100644
--- a/src/cloudflare/resources/zero_trust/devices/devices_.py
+++ b/src/cloudflare/resources/zero_trust/devices/devices_.py
@@ -89,7 +89,7 @@ def list(
search: Search by device details.
- seen_after: Filters by the last_seen timestamp - returns only devices last seen after this
+ seen_after: Filter by the last_seen timestamp - returns only devices last seen after this
timestamp.
seen_before: Filter by the last_seen timestamp - returns only devices last seen before this
@@ -320,7 +320,7 @@ def list(
search: Search by device details.
- seen_after: Filters by the last_seen timestamp - returns only devices last seen after this
+ seen_after: Filter by the last_seen timestamp - returns only devices last seen after this
timestamp.
seen_before: Filter by the last_seen timestamp - returns only devices last seen before this
diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py
index 241e238dee1..aaf02a38266 100644
--- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py
+++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py
@@ -204,7 +204,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncSinglePage[DEXTestListResponse]:
"""
- Fetch all DEX tests.
+ Fetch all DEX tests
Args:
extra_headers: Send extra headers
@@ -488,7 +488,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[DEXTestListResponse, AsyncSinglePage[DEXTestListResponse]]:
"""
- Fetch all DEX tests.
+ Fetch all DEX tests
Args:
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/zero_trust/devices/registrations.py b/src/cloudflare/resources/zero_trust/devices/registrations.py
index 7e129cc380d..59ddabb48a3 100644
--- a/src/cloudflare/resources/zero_trust/devices/registrations.py
+++ b/src/cloudflare/resources/zero_trust/devices/registrations.py
@@ -89,10 +89,10 @@ def list(
search: Filter by registration details.
- seen_after: Filters by the last_seen timestamp - returns only registrations last seen after
+ seen_after: Filter by the last_seen timestamp - returns only registrations last seen after
this timestamp.
- seen_before: Filters by the last_seen timestamp - returns only registrations last seen before
+ seen_before: Filter by the last_seen timestamp - returns only registrations last seen before
this timestamp.
sort_by: The registration field to order results by.
@@ -401,10 +401,10 @@ def list(
search: Filter by registration details.
- seen_after: Filters by the last_seen timestamp - returns only registrations last seen after
+ seen_after: Filter by the last_seen timestamp - returns only registrations last seen after
this timestamp.
- seen_before: Filters by the last_seen timestamp - returns only registrations last seen before
+ seen_before: Filter by the last_seen timestamp - returns only registrations last seen before
this timestamp.
sort_by: The registration field to order results by.
diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
index 0c9b54b6b0b..60fb9bd151b 100644
--- a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
+++ b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
@@ -6,8 +6,8 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ....._utils import maybe_transform, async_maybe_transform
+from ....._files import read_file_content, async_read_file_content
+from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileContent
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
from ....._response import (
@@ -19,7 +19,6 @@
from ....._wrappers import ResultWrapper
from ....._base_client import make_request_options
from .....types.zero_trust.dlp.dataset import Dataset
-from .....types.zero_trust.dlp.datasets import upload_edit_params
from .....types.zero_trust.dlp.datasets.new_version import NewVersion
__all__ = ["UploadResource", "AsyncUploadResource"]
@@ -88,10 +87,10 @@ def create(
def edit(
self,
version: int,
+ dataset: FileContent,
*,
account_id: str,
dataset_id: str,
- body: FileTypes,
# 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,
@@ -119,9 +118,10 @@ def edit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not dataset_id:
raise ValueError(f"Expected a non-empty value for `dataset_id` but received {dataset_id!r}")
+ extra_headers = {"Content-Type": "application/octet-stream", **(extra_headers or {})}
return self._post(
f"/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}",
- body=maybe_transform(body, upload_edit_params.UploadEditParams),
+ body=read_file_content(dataset),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -196,10 +196,10 @@ async def create(
async def edit(
self,
version: int,
+ dataset: FileContent,
*,
account_id: str,
dataset_id: str,
- body: FileTypes,
# 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,
@@ -227,9 +227,10 @@ async def edit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not dataset_id:
raise ValueError(f"Expected a non-empty value for `dataset_id` but received {dataset_id!r}")
+ extra_headers = {"Content-Type": "application/octet-stream", **(extra_headers or {})}
return await self._post(
f"/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}",
- body=await async_maybe_transform(body, upload_edit_params.UploadEditParams),
+ body=await async_read_file_content(dataset),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/versions/entries.py b/src/cloudflare/resources/zero_trust/dlp/datasets/versions/entries.py
index aeabf816cee..35995eb5c41 100755
--- a/src/cloudflare/resources/zero_trust/dlp/datasets/versions/entries.py
+++ b/src/cloudflare/resources/zero_trust/dlp/datasets/versions/entries.py
@@ -6,8 +6,8 @@
import httpx
-from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ......_utils import maybe_transform, async_maybe_transform
+from ......_files import read_file_content, async_read_file_content
+from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileContent
from ......_compat import cached_property
from ......_resource import SyncAPIResource, AsyncAPIResource
from ......_response import (
@@ -18,7 +18,6 @@
)
from ......_wrappers import ResultWrapper
from ......_base_client import make_request_options
-from ......types.zero_trust.dlp.datasets.versions import entry_create_params
from ......types.zero_trust.dlp.datasets.versions.entry_create_response import EntryCreateResponse
__all__ = ["EntriesResource", "AsyncEntriesResource"]
@@ -47,11 +46,11 @@ def with_streaming_response(self) -> EntriesResourceWithStreamingResponse:
def create(
self,
entry_id: str,
+ dataset_version_entry: FileContent,
*,
account_id: str,
dataset_id: str,
version: int,
- body: FileTypes,
# 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,
@@ -79,9 +78,10 @@ def create(
raise ValueError(f"Expected a non-empty value for `dataset_id` but received {dataset_id!r}")
if not entry_id:
raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ extra_headers = {"Content-Type": "application/octet-stream", **(extra_headers or {})}
return self._post(
f"/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}/entries/{entry_id}",
- body=maybe_transform(body, entry_create_params.EntryCreateParams),
+ body=read_file_content(dataset_version_entry),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -116,11 +116,11 @@ def with_streaming_response(self) -> AsyncEntriesResourceWithStreamingResponse:
async def create(
self,
entry_id: str,
+ dataset_version_entry: FileContent,
*,
account_id: str,
dataset_id: str,
version: int,
- body: FileTypes,
# 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,
@@ -148,9 +148,10 @@ async def create(
raise ValueError(f"Expected a non-empty value for `dataset_id` but received {dataset_id!r}")
if not entry_id:
raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ extra_headers = {"Content-Type": "application/octet-stream", **(extra_headers or {})}
return await self._post(
f"/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}/entries/{entry_id}",
- body=await async_maybe_transform(body, entry_create_params.EntryCreateParams),
+ body=await async_read_file_content(dataset_version_entry),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/zero_trust/dlp/dlp.py b/src/cloudflare/resources/zero_trust/dlp/dlp.py
index 3769892598e..7444c2b17de 100644
--- a/src/cloudflare/resources/zero_trust/dlp/dlp.py
+++ b/src/cloudflare/resources/zero_trust/dlp/dlp.py
@@ -10,14 +10,6 @@
LimitsResourceWithStreamingResponse,
AsyncLimitsResourceWithStreamingResponse,
)
-from .entries import (
- EntriesResource,
- AsyncEntriesResource,
- EntriesResourceWithRawResponse,
- AsyncEntriesResourceWithRawResponse,
- EntriesResourceWithStreamingResponse,
- AsyncEntriesResourceWithStreamingResponse,
-)
from .patterns import (
PatternsResource,
AsyncPatternsResource,
@@ -44,6 +36,14 @@
PayloadLogsResourceWithStreamingResponse,
AsyncPayloadLogsResourceWithStreamingResponse,
)
+from .entries.entries import (
+ EntriesResource,
+ AsyncEntriesResource,
+ EntriesResourceWithRawResponse,
+ AsyncEntriesResourceWithRawResponse,
+ EntriesResourceWithStreamingResponse,
+ AsyncEntriesResourceWithStreamingResponse,
+)
from .datasets.datasets import (
DatasetsResource,
AsyncDatasetsResource,
diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py b/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py
new file mode 100644
index 00000000000..01f7546037f
--- /dev/null
+++ b/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py
@@ -0,0 +1,61 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .custom import (
+ CustomResource,
+ AsyncCustomResource,
+ CustomResourceWithRawResponse,
+ AsyncCustomResourceWithRawResponse,
+ CustomResourceWithStreamingResponse,
+ AsyncCustomResourceWithStreamingResponse,
+)
+from .entries import (
+ EntriesResource,
+ AsyncEntriesResource,
+ EntriesResourceWithRawResponse,
+ AsyncEntriesResourceWithRawResponse,
+ EntriesResourceWithStreamingResponse,
+ AsyncEntriesResourceWithStreamingResponse,
+)
+from .predefined import (
+ PredefinedResource,
+ AsyncPredefinedResource,
+ PredefinedResourceWithRawResponse,
+ AsyncPredefinedResourceWithRawResponse,
+ PredefinedResourceWithStreamingResponse,
+ AsyncPredefinedResourceWithStreamingResponse,
+)
+from .integration import (
+ IntegrationResource,
+ AsyncIntegrationResource,
+ IntegrationResourceWithRawResponse,
+ AsyncIntegrationResourceWithRawResponse,
+ IntegrationResourceWithStreamingResponse,
+ AsyncIntegrationResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "CustomResource",
+ "AsyncCustomResource",
+ "CustomResourceWithRawResponse",
+ "AsyncCustomResourceWithRawResponse",
+ "CustomResourceWithStreamingResponse",
+ "AsyncCustomResourceWithStreamingResponse",
+ "PredefinedResource",
+ "AsyncPredefinedResource",
+ "PredefinedResourceWithRawResponse",
+ "AsyncPredefinedResourceWithRawResponse",
+ "PredefinedResourceWithStreamingResponse",
+ "AsyncPredefinedResourceWithStreamingResponse",
+ "IntegrationResource",
+ "AsyncIntegrationResource",
+ "IntegrationResourceWithRawResponse",
+ "AsyncIntegrationResourceWithRawResponse",
+ "IntegrationResourceWithStreamingResponse",
+ "AsyncIntegrationResourceWithStreamingResponse",
+ "EntriesResource",
+ "AsyncEntriesResource",
+ "EntriesResourceWithRawResponse",
+ "AsyncEntriesResourceWithRawResponse",
+ "EntriesResourceWithStreamingResponse",
+ "AsyncEntriesResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/custom.py b/src/cloudflare/resources/zero_trust/dlp/entries/custom.py
new file mode 100644
index 00000000000..67aaeed4ffb
--- /dev/null
+++ b/src/cloudflare/resources/zero_trust/dlp/entries/custom.py
@@ -0,0 +1,581 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Any, Type, Optional, cast
+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
+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.zero_trust.dlp.entries import custom_create_params, custom_update_params
+from .....types.zero_trust.dlp.profiles.pattern_param import PatternParam
+from .....types.zero_trust.dlp.entries.custom_create_response import CustomCreateResponse
+from .....types.zero_trust.dlp.entries.custom_update_response import CustomUpdateResponse
+
+__all__ = ["CustomResource", "AsyncCustomResource"]
+
+
+class CustomResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> CustomResourceWithRawResponse:
+ """
+ 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 CustomResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> CustomResourceWithStreamingResponse:
+ """
+ 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 CustomResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ name: str,
+ pattern: PatternParam,
+ profile_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,
+ ) -> Optional[CustomCreateResponse]:
+ """
+ Creates a DLP custom entry.
+
+ Args:
+ 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._post(
+ f"/accounts/{account_id}/dlp/entries",
+ body=maybe_transform(
+ {
+ "enabled": enabled,
+ "name": name,
+ "pattern": pattern,
+ "profile_id": profile_id,
+ },
+ custom_create_params.CustomCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[CustomCreateResponse]], ResultWrapper[CustomCreateResponse]),
+ )
+
+ @overload
+ def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ name: str,
+ pattern: PatternParam,
+ type: Literal["custom"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ type: Literal["predefined"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ type: Literal["integration"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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", "name", "pattern", "type"], ["account_id", "type"])
+ def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ pattern: PatternParam | NotGiven = NOT_GIVEN,
+ type: Literal["custom"] | Literal["predefined"] | Literal["integration"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ if not entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return cast(
+ Optional[CustomUpdateResponse],
+ self._put(
+ f"/accounts/{account_id}/dlp/entries/{entry_id}",
+ body=maybe_transform(
+ {
+ "name": name,
+ "pattern": pattern,
+ "type": type,
+ "enabled": enabled,
+ },
+ custom_update_params.CustomUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[CustomUpdateResponse]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
+ def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ Deletes a DLP custom entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/dlp/entries/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class AsyncCustomResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncCustomResourceWithRawResponse:
+ """
+ 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 AsyncCustomResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncCustomResourceWithStreamingResponse:
+ """
+ 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 AsyncCustomResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ name: str,
+ pattern: PatternParam,
+ profile_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,
+ ) -> Optional[CustomCreateResponse]:
+ """
+ Creates a DLP custom entry.
+
+ Args:
+ 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 await self._post(
+ f"/accounts/{account_id}/dlp/entries",
+ body=await async_maybe_transform(
+ {
+ "enabled": enabled,
+ "name": name,
+ "pattern": pattern,
+ "profile_id": profile_id,
+ },
+ custom_create_params.CustomCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[CustomCreateResponse]], ResultWrapper[CustomCreateResponse]),
+ )
+
+ @overload
+ async def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ name: str,
+ pattern: PatternParam,
+ type: Literal["custom"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ type: Literal["predefined"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ type: Literal["integration"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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", "name", "pattern", "type"], ["account_id", "type"])
+ async def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ name: str | NotGiven = NOT_GIVEN,
+ pattern: PatternParam | NotGiven = NOT_GIVEN,
+ type: Literal["custom"] | Literal["predefined"] | Literal["integration"],
+ enabled: bool | 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,
+ ) -> Optional[CustomUpdateResponse]:
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ if not entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return cast(
+ Optional[CustomUpdateResponse],
+ await self._put(
+ f"/accounts/{account_id}/dlp/entries/{entry_id}",
+ body=await async_maybe_transform(
+ {
+ "name": name,
+ "pattern": pattern,
+ "type": type,
+ "enabled": enabled,
+ },
+ custom_update_params.CustomUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[CustomUpdateResponse]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
+ async def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ Deletes a DLP custom entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/dlp/entries/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class CustomResourceWithRawResponse:
+ def __init__(self, custom: CustomResource) -> None:
+ self._custom = custom
+
+ self.create = to_raw_response_wrapper(
+ custom.create,
+ )
+ self.update = to_raw_response_wrapper(
+ custom.update,
+ )
+ self.delete = to_raw_response_wrapper(
+ custom.delete,
+ )
+
+
+class AsyncCustomResourceWithRawResponse:
+ def __init__(self, custom: AsyncCustomResource) -> None:
+ self._custom = custom
+
+ self.create = async_to_raw_response_wrapper(
+ custom.create,
+ )
+ self.update = async_to_raw_response_wrapper(
+ custom.update,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ custom.delete,
+ )
+
+
+class CustomResourceWithStreamingResponse:
+ def __init__(self, custom: CustomResource) -> None:
+ self._custom = custom
+
+ self.create = to_streamed_response_wrapper(
+ custom.create,
+ )
+ self.update = to_streamed_response_wrapper(
+ custom.update,
+ )
+ self.delete = to_streamed_response_wrapper(
+ custom.delete,
+ )
+
+
+class AsyncCustomResourceWithStreamingResponse:
+ def __init__(self, custom: AsyncCustomResource) -> None:
+ self._custom = custom
+
+ self.create = async_to_streamed_response_wrapper(
+ custom.create,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ custom.update,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ custom.delete,
+ )
diff --git a/src/cloudflare/resources/zero_trust/dlp/entries.py b/src/cloudflare/resources/zero_trust/dlp/entries/entries.py
similarity index 86%
rename from src/cloudflare/resources/zero_trust/dlp/entries.py
rename to src/cloudflare/resources/zero_trust/dlp/entries/entries.py
index 162b3e79fe5..2f084fa78cf 100644
--- a/src/cloudflare/resources/zero_trust/dlp/entries.py
+++ b/src/cloudflare/resources/zero_trust/dlp/entries/entries.py
@@ -7,30 +7,66 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import required_args, maybe_transform, async_maybe_transform
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
+from .custom import (
+ CustomResource,
+ AsyncCustomResource,
+ CustomResourceWithRawResponse,
+ AsyncCustomResourceWithRawResponse,
+ CustomResourceWithStreamingResponse,
+ AsyncCustomResourceWithStreamingResponse,
+)
+from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ....._utils import required_args, maybe_transform, async_maybe_transform
+from .predefined import (
+ PredefinedResource,
+ AsyncPredefinedResource,
+ PredefinedResourceWithRawResponse,
+ AsyncPredefinedResourceWithRawResponse,
+ PredefinedResourceWithStreamingResponse,
+ AsyncPredefinedResourceWithStreamingResponse,
+)
+from ....._compat import cached_property
+from .integration import (
+ IntegrationResource,
+ AsyncIntegrationResource,
+ IntegrationResourceWithRawResponse,
+ AsyncIntegrationResourceWithRawResponse,
+ IntegrationResourceWithStreamingResponse,
+ AsyncIntegrationResourceWithStreamingResponse,
+)
+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 ....pagination import SyncSinglePage, AsyncSinglePage
-from ...._base_client import AsyncPaginator, make_request_options
-from ....types.zero_trust.dlp import entry_create_params, entry_update_params
-from ....types.zero_trust.dlp.entry_get_response import EntryGetResponse
-from ....types.zero_trust.dlp.entry_list_response import EntryListResponse
-from ....types.zero_trust.dlp.entry_create_response import EntryCreateResponse
-from ....types.zero_trust.dlp.entry_update_response import EntryUpdateResponse
-from ....types.zero_trust.dlp.profiles.pattern_param import PatternParam
+from ....._wrappers import ResultWrapper
+from .....pagination import SyncSinglePage, AsyncSinglePage
+from ....._base_client import AsyncPaginator, make_request_options
+from .....types.zero_trust.dlp import entry_create_params, entry_update_params
+from .....types.zero_trust.dlp.entry_get_response import EntryGetResponse
+from .....types.zero_trust.dlp.entry_list_response import EntryListResponse
+from .....types.zero_trust.dlp.entry_create_response import EntryCreateResponse
+from .....types.zero_trust.dlp.entry_update_response import EntryUpdateResponse
+from .....types.zero_trust.dlp.profiles.pattern_param import PatternParam
__all__ = ["EntriesResource", "AsyncEntriesResource"]
class EntriesResource(SyncAPIResource):
+ @cached_property
+ def custom(self) -> CustomResource:
+ return CustomResource(self._client)
+
+ @cached_property
+ def predefined(self) -> PredefinedResource:
+ return PredefinedResource(self._client)
+
+ @cached_property
+ def integration(self) -> IntegrationResource:
+ return IntegrationResource(self._client)
+
@cached_property
def with_raw_response(self) -> EntriesResourceWithRawResponse:
"""
@@ -357,6 +393,18 @@ def get(
class AsyncEntriesResource(AsyncAPIResource):
+ @cached_property
+ def custom(self) -> AsyncCustomResource:
+ return AsyncCustomResource(self._client)
+
+ @cached_property
+ def predefined(self) -> AsyncPredefinedResource:
+ return AsyncPredefinedResource(self._client)
+
+ @cached_property
+ def integration(self) -> AsyncIntegrationResource:
+ return AsyncIntegrationResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncEntriesResourceWithRawResponse:
"""
@@ -702,6 +750,18 @@ def __init__(self, entries: EntriesResource) -> None:
entries.get,
)
+ @cached_property
+ def custom(self) -> CustomResourceWithRawResponse:
+ return CustomResourceWithRawResponse(self._entries.custom)
+
+ @cached_property
+ def predefined(self) -> PredefinedResourceWithRawResponse:
+ return PredefinedResourceWithRawResponse(self._entries.predefined)
+
+ @cached_property
+ def integration(self) -> IntegrationResourceWithRawResponse:
+ return IntegrationResourceWithRawResponse(self._entries.integration)
+
class AsyncEntriesResourceWithRawResponse:
def __init__(self, entries: AsyncEntriesResource) -> None:
@@ -723,6 +783,18 @@ def __init__(self, entries: AsyncEntriesResource) -> None:
entries.get,
)
+ @cached_property
+ def custom(self) -> AsyncCustomResourceWithRawResponse:
+ return AsyncCustomResourceWithRawResponse(self._entries.custom)
+
+ @cached_property
+ def predefined(self) -> AsyncPredefinedResourceWithRawResponse:
+ return AsyncPredefinedResourceWithRawResponse(self._entries.predefined)
+
+ @cached_property
+ def integration(self) -> AsyncIntegrationResourceWithRawResponse:
+ return AsyncIntegrationResourceWithRawResponse(self._entries.integration)
+
class EntriesResourceWithStreamingResponse:
def __init__(self, entries: EntriesResource) -> None:
@@ -744,6 +816,18 @@ def __init__(self, entries: EntriesResource) -> None:
entries.get,
)
+ @cached_property
+ def custom(self) -> CustomResourceWithStreamingResponse:
+ return CustomResourceWithStreamingResponse(self._entries.custom)
+
+ @cached_property
+ def predefined(self) -> PredefinedResourceWithStreamingResponse:
+ return PredefinedResourceWithStreamingResponse(self._entries.predefined)
+
+ @cached_property
+ def integration(self) -> IntegrationResourceWithStreamingResponse:
+ return IntegrationResourceWithStreamingResponse(self._entries.integration)
+
class AsyncEntriesResourceWithStreamingResponse:
def __init__(self, entries: AsyncEntriesResource) -> None:
@@ -764,3 +848,15 @@ def __init__(self, entries: AsyncEntriesResource) -> None:
self.get = async_to_streamed_response_wrapper(
entries.get,
)
+
+ @cached_property
+ def custom(self) -> AsyncCustomResourceWithStreamingResponse:
+ return AsyncCustomResourceWithStreamingResponse(self._entries.custom)
+
+ @cached_property
+ def predefined(self) -> AsyncPredefinedResourceWithStreamingResponse:
+ return AsyncPredefinedResourceWithStreamingResponse(self._entries.predefined)
+
+ @cached_property
+ def integration(self) -> AsyncIntegrationResourceWithStreamingResponse:
+ return AsyncIntegrationResourceWithStreamingResponse(self._entries.integration)
diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/integration.py b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py
new file mode 100644
index 00000000000..baf9414999d
--- /dev/null
+++ b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py
@@ -0,0 +1,397 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, Optional, cast
+
+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.zero_trust.dlp.entries import integration_create_params, integration_update_params
+from .....types.zero_trust.dlp.entries.integration_create_response import IntegrationCreateResponse
+from .....types.zero_trust.dlp.entries.integration_update_response import IntegrationUpdateResponse
+
+__all__ = ["IntegrationResource", "AsyncIntegrationResource"]
+
+
+class IntegrationResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> IntegrationResourceWithRawResponse:
+ """
+ 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 IntegrationResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> IntegrationResourceWithStreamingResponse:
+ """
+ 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 IntegrationResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ entry_id: str,
+ profile_id: 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.
+ # 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,
+ ) -> Optional[IntegrationCreateResponse]:
+ """
+ Integration entries can't be created, this will update an existing integration
+ entry This is needed for our generated terraform API
+
+ Args:
+ profile_id: This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+
+ 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._post(
+ f"/accounts/{account_id}/dlp/entries/integration",
+ body=maybe_transform(
+ {
+ "enabled": enabled,
+ "entry_id": entry_id,
+ "profile_id": profile_id,
+ },
+ integration_create_params.IntegrationCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IntegrationCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]),
+ )
+
+ def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ enabled: bool,
+ # 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,
+ ) -> Optional[IntegrationUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return self._put(
+ f"/accounts/{account_id}/dlp/entries/integration/{entry_id}",
+ body=maybe_transform({"enabled": enabled}, integration_update_params.IntegrationUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IntegrationUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[IntegrationUpdateResponse]], ResultWrapper[IntegrationUpdateResponse]),
+ )
+
+ def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as integration entires can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/dlp/entries/integration/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class AsyncIntegrationResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncIntegrationResourceWithRawResponse:
+ """
+ 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 AsyncIntegrationResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncIntegrationResourceWithStreamingResponse:
+ """
+ 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 AsyncIntegrationResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ entry_id: str,
+ profile_id: 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.
+ # 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,
+ ) -> Optional[IntegrationCreateResponse]:
+ """
+ Integration entries can't be created, this will update an existing integration
+ entry This is needed for our generated terraform API
+
+ Args:
+ profile_id: This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+
+ 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 await self._post(
+ f"/accounts/{account_id}/dlp/entries/integration",
+ body=await async_maybe_transform(
+ {
+ "enabled": enabled,
+ "entry_id": entry_id,
+ "profile_id": profile_id,
+ },
+ integration_create_params.IntegrationCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IntegrationCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]),
+ )
+
+ async def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ enabled: bool,
+ # 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,
+ ) -> Optional[IntegrationUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return await self._put(
+ f"/accounts/{account_id}/dlp/entries/integration/{entry_id}",
+ body=await async_maybe_transform({"enabled": enabled}, integration_update_params.IntegrationUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IntegrationUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[IntegrationUpdateResponse]], ResultWrapper[IntegrationUpdateResponse]),
+ )
+
+ async def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as integration entires can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/dlp/entries/integration/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class IntegrationResourceWithRawResponse:
+ def __init__(self, integration: IntegrationResource) -> None:
+ self._integration = integration
+
+ self.create = to_raw_response_wrapper(
+ integration.create,
+ )
+ self.update = to_raw_response_wrapper(
+ integration.update,
+ )
+ self.delete = to_raw_response_wrapper(
+ integration.delete,
+ )
+
+
+class AsyncIntegrationResourceWithRawResponse:
+ def __init__(self, integration: AsyncIntegrationResource) -> None:
+ self._integration = integration
+
+ self.create = async_to_raw_response_wrapper(
+ integration.create,
+ )
+ self.update = async_to_raw_response_wrapper(
+ integration.update,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ integration.delete,
+ )
+
+
+class IntegrationResourceWithStreamingResponse:
+ def __init__(self, integration: IntegrationResource) -> None:
+ self._integration = integration
+
+ self.create = to_streamed_response_wrapper(
+ integration.create,
+ )
+ self.update = to_streamed_response_wrapper(
+ integration.update,
+ )
+ self.delete = to_streamed_response_wrapper(
+ integration.delete,
+ )
+
+
+class AsyncIntegrationResourceWithStreamingResponse:
+ def __init__(self, integration: AsyncIntegrationResource) -> None:
+ self._integration = integration
+
+ self.create = async_to_streamed_response_wrapper(
+ integration.create,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ integration.update,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ integration.delete,
+ )
diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py
new file mode 100644
index 00000000000..c5890e76fbe
--- /dev/null
+++ b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py
@@ -0,0 +1,397 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, Optional, cast
+
+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.zero_trust.dlp.entries import predefined_create_params, predefined_update_params
+from .....types.zero_trust.dlp.entries.predefined_create_response import PredefinedCreateResponse
+from .....types.zero_trust.dlp.entries.predefined_update_response import PredefinedUpdateResponse
+
+__all__ = ["PredefinedResource", "AsyncPredefinedResource"]
+
+
+class PredefinedResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> PredefinedResourceWithRawResponse:
+ """
+ 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 PredefinedResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> PredefinedResourceWithStreamingResponse:
+ """
+ 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 PredefinedResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ entry_id: str,
+ profile_id: 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.
+ # 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,
+ ) -> Optional[PredefinedCreateResponse]:
+ """
+ Predefined entries can't be created, this will update an existing predefined
+ entry This is needed for our generated terraform API
+
+ Args:
+ profile_id: This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+
+ 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._post(
+ f"/accounts/{account_id}/dlp/entries/predefined",
+ body=maybe_transform(
+ {
+ "enabled": enabled,
+ "entry_id": entry_id,
+ "profile_id": profile_id,
+ },
+ predefined_create_params.PredefinedCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[PredefinedCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[PredefinedCreateResponse]], ResultWrapper[PredefinedCreateResponse]),
+ )
+
+ def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ enabled: bool,
+ # 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,
+ ) -> Optional[PredefinedUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return self._put(
+ f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}",
+ body=maybe_transform({"enabled": enabled}, predefined_update_params.PredefinedUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[PredefinedUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[PredefinedUpdateResponse]], ResultWrapper[PredefinedUpdateResponse]),
+ )
+
+ def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as predefined entires can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class AsyncPredefinedResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncPredefinedResourceWithRawResponse:
+ """
+ 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 AsyncPredefinedResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncPredefinedResourceWithStreamingResponse:
+ """
+ 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 AsyncPredefinedResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ account_id: str,
+ enabled: bool,
+ entry_id: str,
+ profile_id: 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.
+ # 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,
+ ) -> Optional[PredefinedCreateResponse]:
+ """
+ Predefined entries can't be created, this will update an existing predefined
+ entry This is needed for our generated terraform API
+
+ Args:
+ profile_id: This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+
+ 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 await self._post(
+ f"/accounts/{account_id}/dlp/entries/predefined",
+ body=await async_maybe_transform(
+ {
+ "enabled": enabled,
+ "entry_id": entry_id,
+ "profile_id": profile_id,
+ },
+ predefined_create_params.PredefinedCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[PredefinedCreateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[PredefinedCreateResponse]], ResultWrapper[PredefinedCreateResponse]),
+ )
+
+ async def update(
+ self,
+ entry_id: str,
+ *,
+ account_id: str,
+ enabled: bool,
+ # 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,
+ ) -> Optional[PredefinedUpdateResponse]:
+ """
+ Updates a DLP entry.
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return await self._put(
+ f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}",
+ body=await async_maybe_transform({"enabled": enabled}, predefined_update_params.PredefinedUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[PredefinedUpdateResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[PredefinedUpdateResponse]], ResultWrapper[PredefinedUpdateResponse]),
+ )
+
+ async def delete(
+ self,
+ entry_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as predefined entires can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 entry_id:
+ raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
+
+class PredefinedResourceWithRawResponse:
+ def __init__(self, predefined: PredefinedResource) -> None:
+ self._predefined = predefined
+
+ self.create = to_raw_response_wrapper(
+ predefined.create,
+ )
+ self.update = to_raw_response_wrapper(
+ predefined.update,
+ )
+ self.delete = to_raw_response_wrapper(
+ predefined.delete,
+ )
+
+
+class AsyncPredefinedResourceWithRawResponse:
+ def __init__(self, predefined: AsyncPredefinedResource) -> None:
+ self._predefined = predefined
+
+ self.create = async_to_raw_response_wrapper(
+ predefined.create,
+ )
+ self.update = async_to_raw_response_wrapper(
+ predefined.update,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ predefined.delete,
+ )
+
+
+class PredefinedResourceWithStreamingResponse:
+ def __init__(self, predefined: PredefinedResource) -> None:
+ self._predefined = predefined
+
+ self.create = to_streamed_response_wrapper(
+ predefined.create,
+ )
+ self.update = to_streamed_response_wrapper(
+ predefined.update,
+ )
+ self.delete = to_streamed_response_wrapper(
+ predefined.delete,
+ )
+
+
+class AsyncPredefinedResourceWithStreamingResponse:
+ def __init__(self, predefined: AsyncPredefinedResource) -> None:
+ self._predefined = predefined
+
+ self.create = async_to_streamed_response_wrapper(
+ predefined.create,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ predefined.update,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ predefined.delete,
+ )
diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py
index 9eafd67697f..a20a3179cda 100644
--- a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py
+++ b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Iterable, Optional, cast
+from typing import Any, Type, Iterable, Optional, cast
import httpx
@@ -19,7 +19,7 @@
from ....._wrappers import ResultWrapper
from ....._base_client import make_request_options
from .....types.zero_trust.dlp.profile import Profile
-from .....types.zero_trust.dlp.profiles import predefined_update_params
+from .....types.zero_trust.dlp.profiles import predefined_create_params, predefined_update_params
from .....types.zero_trust.dlp.context_awareness_param import ContextAwarenessParam
__all__ = ["PredefinedResource", "AsyncPredefinedResource"]
@@ -45,6 +45,71 @@ def with_streaming_response(self) -> PredefinedResourceWithStreamingResponse:
"""
return PredefinedResourceWithStreamingResponse(self)
+ def create(
+ self,
+ *,
+ account_id: str,
+ profile_id: str,
+ ai_context_enabled: bool | NotGiven = NOT_GIVEN,
+ allowed_match_count: Optional[int] | NotGiven = NOT_GIVEN,
+ confidence_threshold: Optional[str] | NotGiven = NOT_GIVEN,
+ context_awareness: ContextAwarenessParam | NotGiven = NOT_GIVEN,
+ entries: Iterable[predefined_create_params.Entry] | NotGiven = NOT_GIVEN,
+ ocr_enabled: bool | 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,
+ ) -> Optional[Profile]:
+ """Creates a DLP predefined profile.
+
+ Only supports enabling/disabling entries.
+
+ Args:
+ context_awareness: Scan the context of predefined entries to only return matches surrounded by
+ keywords.
+
+ 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 cast(
+ Optional[Profile],
+ self._post(
+ f"/accounts/{account_id}/dlp/profiles/predefined",
+ body=maybe_transform(
+ {
+ "profile_id": profile_id,
+ "ai_context_enabled": ai_context_enabled,
+ "allowed_match_count": allowed_match_count,
+ "confidence_threshold": confidence_threshold,
+ "context_awareness": context_awareness,
+ "entries": entries,
+ "ocr_enabled": ocr_enabled,
+ },
+ predefined_create_params.PredefinedCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Profile]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[Profile]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
def update(
self,
profile_id: str,
@@ -111,6 +176,47 @@ def update(
),
)
+ def delete(
+ self,
+ profile_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as predefined profiles can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 profile_id:
+ raise ValueError(f"Expected a non-empty value for `profile_id` but received {profile_id!r}")
+ return self._delete(
+ f"/accounts/{account_id}/dlp/profiles/predefined/{profile_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
def get(
self,
profile_id: str,
@@ -177,6 +283,71 @@ def with_streaming_response(self) -> AsyncPredefinedResourceWithStreamingRespons
"""
return AsyncPredefinedResourceWithStreamingResponse(self)
+ async def create(
+ self,
+ *,
+ account_id: str,
+ profile_id: str,
+ ai_context_enabled: bool | NotGiven = NOT_GIVEN,
+ allowed_match_count: Optional[int] | NotGiven = NOT_GIVEN,
+ confidence_threshold: Optional[str] | NotGiven = NOT_GIVEN,
+ context_awareness: ContextAwarenessParam | NotGiven = NOT_GIVEN,
+ entries: Iterable[predefined_create_params.Entry] | NotGiven = NOT_GIVEN,
+ ocr_enabled: bool | 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,
+ ) -> Optional[Profile]:
+ """Creates a DLP predefined profile.
+
+ Only supports enabling/disabling entries.
+
+ Args:
+ context_awareness: Scan the context of predefined entries to only return matches surrounded by
+ keywords.
+
+ 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 cast(
+ Optional[Profile],
+ await self._post(
+ f"/accounts/{account_id}/dlp/profiles/predefined",
+ body=await async_maybe_transform(
+ {
+ "profile_id": profile_id,
+ "ai_context_enabled": ai_context_enabled,
+ "allowed_match_count": allowed_match_count,
+ "confidence_threshold": confidence_threshold,
+ "context_awareness": context_awareness,
+ "entries": entries,
+ "ocr_enabled": ocr_enabled,
+ },
+ predefined_create_params.PredefinedCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Profile]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[Profile]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
async def update(
self,
profile_id: str,
@@ -243,6 +414,47 @@ async def update(
),
)
+ async def delete(
+ self,
+ profile_id: str,
+ *,
+ 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,
+ ) -> object:
+ """
+ This is a no-op as predefined profiles can't be deleted but is needed for our
+ generated terraform API
+
+ Args:
+ 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 profile_id:
+ raise ValueError(f"Expected a non-empty value for `profile_id` but received {profile_id!r}")
+ return await self._delete(
+ f"/accounts/{account_id}/dlp/profiles/predefined/{profile_id}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[object]]._unwrapper,
+ ),
+ cast_to=cast(Type[object], ResultWrapper[object]),
+ )
+
async def get(
self,
profile_id: str,
@@ -293,9 +505,15 @@ class PredefinedResourceWithRawResponse:
def __init__(self, predefined: PredefinedResource) -> None:
self._predefined = predefined
+ self.create = to_raw_response_wrapper(
+ predefined.create,
+ )
self.update = to_raw_response_wrapper(
predefined.update,
)
+ self.delete = to_raw_response_wrapper(
+ predefined.delete,
+ )
self.get = to_raw_response_wrapper(
predefined.get,
)
@@ -305,9 +523,15 @@ class AsyncPredefinedResourceWithRawResponse:
def __init__(self, predefined: AsyncPredefinedResource) -> None:
self._predefined = predefined
+ self.create = async_to_raw_response_wrapper(
+ predefined.create,
+ )
self.update = async_to_raw_response_wrapper(
predefined.update,
)
+ self.delete = async_to_raw_response_wrapper(
+ predefined.delete,
+ )
self.get = async_to_raw_response_wrapper(
predefined.get,
)
@@ -317,9 +541,15 @@ class PredefinedResourceWithStreamingResponse:
def __init__(self, predefined: PredefinedResource) -> None:
self._predefined = predefined
+ self.create = to_streamed_response_wrapper(
+ predefined.create,
+ )
self.update = to_streamed_response_wrapper(
predefined.update,
)
+ self.delete = to_streamed_response_wrapper(
+ predefined.delete,
+ )
self.get = to_streamed_response_wrapper(
predefined.get,
)
@@ -329,9 +559,15 @@ class AsyncPredefinedResourceWithStreamingResponse:
def __init__(self, predefined: AsyncPredefinedResource) -> None:
self._predefined = predefined
+ self.create = async_to_streamed_response_wrapper(
+ predefined.create,
+ )
self.update = async_to_streamed_response_wrapper(
predefined.update,
)
+ self.delete = async_to_streamed_response_wrapper(
+ predefined.delete,
+ )
self.get = async_to_streamed_response_wrapper(
predefined.get,
)
diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py
index 62967f56cd0..7a1399e388c 100644
--- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py
+++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py
@@ -30,7 +30,6 @@
from ....._base_client import AsyncPaginator, make_request_options
from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params
from .....types.zero_trust.gateway.gateway_list import GatewayList
-from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam
from .....types.zero_trust.gateway.list_create_response import ListCreateResponse
__all__ = ["ListsResource", "AsyncListsResource"]
@@ -67,7 +66,7 @@ def create(
name: str,
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"],
description: str | NotGiven = NOT_GIVEN,
- items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN,
+ items: Iterable[list_create_params.Item] | 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,
@@ -85,7 +84,7 @@ def create(
description: The description of the list.
- items: The items in the list.
+ items: items to add to the list.
extra_headers: Send extra headers
@@ -125,7 +124,7 @@ def update(
account_id: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
- items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN,
+ items: Iterable[list_update_params.Item] | 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,
@@ -145,7 +144,7 @@ def update(
description: The description of the list.
- items: The items in the list.
+ items: items to add to the list.
extra_headers: Send extra headers
@@ -391,7 +390,7 @@ async def create(
name: str,
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"],
description: str | NotGiven = NOT_GIVEN,
- items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN,
+ items: Iterable[list_create_params.Item] | 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,
@@ -409,7 +408,7 @@ async def create(
description: The description of the list.
- items: The items in the list.
+ items: items to add to the list.
extra_headers: Send extra headers
@@ -449,7 +448,7 @@ async def update(
account_id: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
- items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN,
+ items: Iterable[list_update_params.Item] | 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,
@@ -469,7 +468,7 @@ async def update(
description: The description of the list.
- items: The items in the list.
+ items: items to add to the list.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py
index fcbcd6698e6..b07477a0e67 100644
--- a/src/cloudflare/resources/zero_trust/gateway/locations.py
+++ b/src/cloudflare/resources/zero_trust/gateway/locations.py
@@ -54,8 +54,8 @@ def create(
client_default: bool | NotGiven = NOT_GIVEN,
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
ecs_support: bool | NotGiven = NOT_GIVEN,
- endpoints: EndpointParam | NotGiven = NOT_GIVEN,
- networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN,
+ endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN,
+ networks: Optional[Iterable[location_create_params.Network]] | 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,
@@ -129,8 +129,8 @@ def update(
client_default: bool | NotGiven = NOT_GIVEN,
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
ecs_support: bool | NotGiven = NOT_GIVEN,
- endpoints: EndpointParam | NotGiven = NOT_GIVEN,
- networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN,
+ endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN,
+ networks: Optional[Iterable[location_update_params.Network]] | 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,
@@ -340,8 +340,8 @@ async def create(
client_default: bool | NotGiven = NOT_GIVEN,
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
ecs_support: bool | NotGiven = NOT_GIVEN,
- endpoints: EndpointParam | NotGiven = NOT_GIVEN,
- networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN,
+ endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN,
+ networks: Optional[Iterable[location_create_params.Network]] | 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,
@@ -415,8 +415,8 @@ async def update(
client_default: bool | NotGiven = NOT_GIVEN,
dns_destination_ips_id: str | NotGiven = NOT_GIVEN,
ecs_support: bool | NotGiven = NOT_GIVEN,
- endpoints: EndpointParam | NotGiven = NOT_GIVEN,
- networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN,
+ endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN,
+ networks: Optional[Iterable[location_update_params.Network]] | 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,
diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py
index b08551a25b4..3cb12b71060 100644
--- a/src/cloudflare/resources/zero_trust/gateway/rules.py
+++ b/src/cloudflare/resources/zero_trust/gateway/rules.py
@@ -93,7 +93,7 @@ def create(
Creates a new Zero Trust Gateway rule.
Args:
- action: The action to preform when the associated traffic, identity, and device posture
+ action: The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
name: The name of the rule.
@@ -213,7 +213,7 @@ def update(
Args:
rule_id: The API resource UUID.
- action: The action to preform when the associated traffic, identity, and device posture
+ action: The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
name: The name of the rule.
@@ -517,7 +517,7 @@ async def create(
Creates a new Zero Trust Gateway rule.
Args:
- action: The action to preform when the associated traffic, identity, and device posture
+ action: The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
name: The name of the rule.
@@ -637,7 +637,7 @@ async def update(
Args:
rule_id: The API resource UUID.
- action: The action to preform when the associated traffic, identity, and device posture
+ action: The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
name: The name of the rule.
diff --git a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py
index f80f35d4b9e..d16dafcc93c 100644
--- a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py
+++ b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py
@@ -11,7 +11,7 @@
"AbuseReportsTrademarkReport",
"AbuseReportsGeneralReport",
"AbuseReportsPhishingReport",
- "AbuseReportsChildrenAbuseReport",
+ "AbuseReportsCsamReport",
"AbuseReportsThreatReport",
"AbuseReportsRegistrarWhoisReport",
"AbuseReportsNcseiReport",
@@ -21,163 +21,114 @@
class AbuseReportsDmcaReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_dmca"]]
+ """The abuse report type."""
- email: Required[str]
- """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: Required[str]
- """Should match the value provided in `email`"""
-
- name: Required[str]
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- urls: Required[str]
- """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/).
- """
-
- address1: str
+ address1: Required[str]
"""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: str
+ agent_name: Required[str]
"""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: Literal[0, 1]
+ agree: Required[Literal[1]]
"""Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
- city: str
+ city: Required[str]
"""Text not exceeding 255 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- comments: str
- """Any additional comments about the infringement not exceeding 2000 characters"""
-
- company: str
- """Text not exceeding 100 characters.
+ country: Required[str]
+ """Text not exceeding 255 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- country: str
- """Text not exceeding 255 characters.
+ email: Required[str]
+ """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/).
"""
- destination_ips: str
- """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
- """
+ email2: Required[str]
+ """Should match the value provided in `email`"""
- host_notification: Literal["send", "send-anon", "none"]
+ host_notification: Required[Literal["send"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- justification: str
- """
- 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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
+ name: Required[str]
+ """Text not exceeding 255 characters.
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ This field may be released by Cloudflare to third parties such as the Lumen
+ Database (https://lumendatabase.org/).
"""
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
-
- original_work: str
+ original_work: Required[str]
"""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: Literal["send", "send-anon", "none"]
+ owner_notification: Required[Literal["send"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- ports_protocols: str
- """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.
- """
-
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
+ signature: Required[str]
"""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: str
- """A list of IP addresses separated by ‘ ’ (new line character).
+ state: Required[str]
+ """Text not exceeding 255 characters.
- The list of source IPs should not exceed 30 IP addresses. Each one of the IP
- addresses ought to be unique
+ This field may be released by Cloudflare to third parties such as the Lumen
+ Database (https://lumendatabase.org/).
"""
- state: str
- """Text not exceeding 255 characters.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (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/).
+ """
+
+ comments: str
+ """Any additional comments about the infringement not exceeding 2000 characters"""
+
+ company: str
+ """Text not exceeding 100 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
+ reported_country: str
+ """Text containing 2 characters"""
+
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
+
tele: str
"""Text not exceeding 20 characters.
@@ -188,32 +139,12 @@ class AbuseReportsDmcaReport(TypedDict, total=False):
title: str
"""Text not exceeding 255 characters"""
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
class AbuseReportsTrademarkReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_trademark"]]
+ """The abuse report type."""
email: Required[str]
"""A valid email of the abuse reporter.
@@ -225,6 +156,19 @@ class AbuseReportsTrademarkReport(TypedDict, total=False):
email2: Required[str]
"""Should match the value provided in `email`"""
+ host_notification: Required[Literal["send"]]
+ """Notification type based on the abuse type.
+
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ """
+
+ justification: Required[str]
+ """
+ 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: Required[str]
"""Text not exceeding 255 characters.
@@ -232,95 +176,121 @@ class AbuseReportsTrademarkReport(TypedDict, total=False):
Database (https://lumendatabase.org/).
"""
+ owner_notification: Required[Literal["send"]]
+ """Notification type based on the abuse type.
+
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ """
+
+ trademark_number: Required[str]
+ """Text not exceeding 1000 characters"""
+
+ trademark_office: Required[str]
+ """Text not exceeding 1000 characters"""
+
+ trademark_symbol: Required[str]
+ """Text not exceeding 1000 characters"""
+
urls: Required[str]
- """A list of valid URLs separated by ‘ ’ (new line character).
+ """A list of valid URLs separated by ‘\n’ (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/).
"""
- address1: str
+ comments: str
+ """Any additional comments about the infringement not exceeding 2000 characters"""
+
+ company: str
"""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: str
- """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/).
- """
+ reported_country: str
+ """Text containing 2 characters"""
- agree: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
- city: str
- """Text not exceeding 255 characters.
+ tele: str
+ """Text not exceeding 20 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- comments: str
- """Any additional comments about the infringement not exceeding 2000 characters"""
+ title: str
+ """Text not exceeding 255 characters"""
- company: str
- """Text not exceeding 100 characters.
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
+class AbuseReportsGeneralReport(TypedDict, total=False):
+ account_id: Required[str]
- country: str
- """Text not exceeding 255 characters.
+ act: Required[Literal["abuse_general"]]
+ """The abuse report type."""
+
+ email: Required[str]
+ """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/).
"""
- destination_ips: str
- """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
- """
+ email2: Required[str]
+ """Should match the value provided in `email`"""
- host_notification: Literal["send", "send-anon", "none"]
+ host_notification: Required[Literal["send", "send-anon"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- justification: str
+ justification: Required[str]
"""
A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
- characters
+ characters.
+ """
+
+ name: Required[str]
+ """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: Literal["send", "send-anon", "none"]
+ owner_notification: Required[Literal["send", "send-anon", "none"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- original_work: str
- """Text not exceeding 255 characters.
+ 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/).
+ """
+
+ comments: str
+ """Any additional comments about the infringement not exceeding 2000 characters"""
+
+ company: str
+ """Text not exceeding 100 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- owner_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
+ destination_ips: str
+ """A list of IP addresses separated by ‘\n’ (new line character).
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ The list of destination IPs should not exceed 30 IP addresses. Each one of the
+ IP addresses ought to be unique.
"""
ports_protocols: str
@@ -337,25 +307,11 @@ class AbuseReportsTrademarkReport(TypedDict, total=False):
reported_user_agent: str
"""Text not exceeding 255 characters"""
- signature: str
- """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: str
- """A list of IP addresses separated by ‘ ’ (new line character).
+ """A list of IP addresses separated by ‘\n’ (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: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ addresses ought to be unique.
"""
tele: str
@@ -368,32 +324,12 @@ class AbuseReportsTrademarkReport(TypedDict, total=False):
title: str
"""Text not exceeding 255 characters"""
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
-class AbuseReportsGeneralReport(TypedDict, total=False):
+class AbuseReportsPhishingReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_phishing"]]
+ """The abuse report type."""
email: Required[str]
"""A valid email of the abuse reporter.
@@ -405,43 +341,38 @@ class AbuseReportsGeneralReport(TypedDict, total=False):
email2: Required[str]
"""Should match the value provided in `email`"""
- name: Required[str]
- """Text not exceeding 255 characters.
+ host_notification: Required[Literal["send", "send-anon"]]
+ """Notification type based on the abuse type.
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- urls: Required[str]
- """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/).
+ justification: Required[str]
+ """
+ A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters.
"""
- address1: str
- """Text not exceeding 100 characters.
+ name: Required[str]
+ """Text not exceeding 255 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- agent_name: str
- """The name of the copyright holder.
+ owner_notification: Required[Literal["send", "send-anon"]]
+ """Notification type based on the abuse type.
- Text not exceeding 60 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- agree: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ 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/).
"""
comments: str
@@ -454,486 +385,35 @@ class AbuseReportsGeneralReport(TypedDict, total=False):
Database (https://lumendatabase.org/).
"""
- country: str
+ original_work: str
"""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: str
- """A list of IP addresses separated by ‘ ’ (new line character).
+ reported_country: str
+ """Text containing 2 characters"""
- The list of destination IPs should not exceed 30 IP addresses. Each one of the
- IP addresses ought to be unique
- """
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
+ tele: str
+ """Text not exceeding 20 characters.
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ This field may be released by Cloudflare to third parties such as the Lumen
+ Database (https://lumendatabase.org/).
"""
- justification: str
- """
- A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
- """
+ title: str
+ """Text not exceeding 255 characters"""
- ncmec_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
-
- original_work: str
- """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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ports_protocols: str
- """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.
- """
-
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
- """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: str
- """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: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- tele: str
- """Text not exceeding 20 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- title: str
- """Text not exceeding 255 characters"""
-
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
-
-class AbuseReportsPhishingReport(TypedDict, total=False):
- account_id: Required[str]
-
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
-
- email: Required[str]
- """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: Required[str]
- """Should match the value provided in `email`"""
-
- name: Required[str]
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- urls: Required[str]
- """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/).
- """
-
- address1: str
- """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: str
- """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: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- comments: str
- """Any additional comments about the infringement not exceeding 2000 characters"""
-
- company: str
- """Text not exceeding 100 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- country: str
- """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: str
- """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
- """
-
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- justification: str
- """
- 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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
-
- original_work: str
- """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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ports_protocols: str
- """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.
- """
-
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
- """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: str
- """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: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- tele: str
- """Text not exceeding 20 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- title: str
- """Text not exceeding 255 characters"""
-
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
-
-class AbuseReportsChildrenAbuseReport(TypedDict, total=False):
- account_id: Required[str]
-
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
-
- email: Required[str]
- """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: Required[str]
- """Should match the value provided in `email`"""
-
- name: Required[str]
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- urls: Required[str]
- """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/).
- """
-
- address1: str
- """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: str
- """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: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- comments: str
- """Any additional comments about the infringement not exceeding 2000 characters"""
-
- company: str
- """Text not exceeding 100 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- country: str
- """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: str
- """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
- """
-
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- justification: str
- """
- 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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
-
- original_work: str
- """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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ports_protocols: str
- """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.
- """
-
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
- """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: str
- """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: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- tele: str
- """Text not exceeding 20 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- title: str
- """Text not exceeding 255 characters"""
-
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
-
-class AbuseReportsThreatReport(TypedDict, total=False):
+class AbuseReportsCsamReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_children"]]
+ """The abuse report type."""
email: Required[str]
"""A valid email of the abuse reporter.
@@ -943,141 +423,71 @@ class AbuseReportsThreatReport(TypedDict, total=False):
"""
email2: Required[str]
- """Should match the value provided in `email`"""
-
- name: Required[str]
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- urls: Required[str]
- """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/).
- """
-
- address1: str
- """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: str
- """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: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- comments: str
- """Any additional comments about the infringement not exceeding 2000 characters"""
-
- company: str
- """Text not exceeding 100 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
- country: str
- """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: str
- """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
- """
-
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- justification: str
- """
- A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
- """
+ """Should match the value provided in `email`"""
- ncmec_notification: Literal["send", "send-anon", "none"]
+ host_notification: Required[Literal["send", "send-anon"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
+ justification: Required[str]
+ """
+ A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters.
+ """
- original_work: str
+ name: Required[str]
"""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: Literal["send", "send-anon", "none"]
+ ncmec_notification: Required[Literal["send", "send-anon"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- ports_protocols: str
- """A comma separated list of ports and protocols e.g.
+ owner_notification: Required[Literal["send", "send-anon", "none"]]
+ """Notification type based on the abuse type.
- 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.
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
- """Required for DMCA reports, should be same as Name.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- An affirmation that all information in the report is true and accurate while
- agreeing to the policies of Cloudflare's abuse reports
+ 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/).
"""
- source_ips: str
- """A list of IP addresses separated by ‘ ’ (new line character).
+ comments: str
+ """Any additional comments about the infringement not exceeding 2000 characters"""
- The list of source IPs should not exceed 30 IP addresses. Each one of the IP
- addresses ought to be unique
+ company: str
+ """Text not exceeding 100 characters.
+
+ This field may be released by Cloudflare to third parties such as the Lumen
+ Database (https://lumendatabase.org/).
"""
- state: str
+ country: str
"""Text not exceeding 255 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
+ reported_country: str
+ """Text containing 2 characters"""
+
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
+
tele: str
"""Text not exceeding 20 characters.
@@ -1088,32 +498,12 @@ class AbuseReportsThreatReport(TypedDict, total=False):
title: str
"""Text not exceeding 255 characters"""
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
-class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
+class AbuseReportsThreatReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_threat"]]
+ """The abuse report type."""
email: Required[str]
"""A valid email of the abuse reporter.
@@ -1125,43 +515,38 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
email2: Required[str]
"""Should match the value provided in `email`"""
- name: Required[str]
- """Text not exceeding 255 characters.
+ host_notification: Required[Literal["send", "send-anon"]]
+ """Notification type based on the abuse type.
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- urls: Required[str]
- """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/).
+ justification: Required[str]
+ """
+ A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters.
"""
- address1: str
- """Text not exceeding 100 characters.
+ name: Required[str]
+ """Text not exceeding 255 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- agent_name: str
- """The name of the copyright holder.
+ owner_notification: Required[Literal["send", "send-anon"]]
+ """Notification type based on the abuse type.
- Text not exceeding 60 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- agree: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ 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/).
"""
comments: str
@@ -1174,90 +559,76 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
Database (https://lumendatabase.org/).
"""
- country: str
- """Text not exceeding 255 characters.
+ reported_country: str
+ """Text containing 2 characters"""
+
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
+
+ tele: str
+ """Text not exceeding 20 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
- destination_ips: str
- """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
- """
+ title: str
+ """Text not exceeding 255 characters"""
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
+class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
+ account_id: Required[str]
- justification: str
- """
- A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
- """
+ act: Required[Literal["abuse_registrar_whois"]]
+ """The abuse report type."""
- ncmec_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
+ email: Required[str]
+ """A valid email of the abuse reporter.
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ This field may be released by Cloudflare to third parties such as the Lumen
+ Database (https://lumendatabase.org/).
"""
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
+ email2: Required[str]
+ """Should match the value provided in `email`"""
- original_work: str
+ name: Required[str]
"""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: Literal["send", "send-anon", "none"]
+ owner_notification: Required[Literal["send", "send-anon", "none"]]
"""Notification type based on the abuse type.
NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- ports_protocols: str
- """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.
- """
-
- reported_country: str
- """Text containing 2 characters"""
-
- reported_user_agent: str
- """Text not exceeding 255 characters"""
-
- signature: str
- """Required for DMCA reports, should be same as Name.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- An affirmation that all information in the report is true and accurate while
- agreeing to the policies of Cloudflare's abuse reports
+ 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/).
"""
- source_ips: str
- """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
- """
+ comments: str
+ """Any additional comments about the infringement not exceeding 2000 characters"""
- state: str
- """Text not exceeding 255 characters.
+ company: str
+ """Text not exceeding 100 characters.
This field may be released by Cloudflare to third parties such as the Lumen
Database (https://lumendatabase.org/).
"""
+ reported_country: str
+ """Text containing 2 characters"""
+
+ reported_user_agent: str
+ """Text not exceeding 255 characters"""
+
tele: str
"""Text not exceeding 20 characters.
@@ -1268,32 +639,12 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False):
title: str
"""Text not exceeding 255 characters"""
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
class AbuseReportsNcseiReport(TypedDict, total=False):
account_id: Required[str]
- act: Required[
- Literal[
- "abuse_dmca",
- "abuse_trademark",
- "abuse_general",
- "abuse_phishing",
- "abuse_children",
- "abuse_threat",
- "abuse_registrar_whois",
- "abuse_ncsei",
- ]
- ]
- """The abuse report type"""
+ act: Required[Literal["abuse_ncsei"]]
+ """The abuse report type."""
email: Required[str]
"""A valid email of the abuse reporter.
@@ -1305,6 +656,12 @@ class AbuseReportsNcseiReport(TypedDict, total=False):
email2: Required[str]
"""Should match the value provided in `email`"""
+ host_notification: Required[Literal["send", "send-anon"]]
+ """Notification type based on the abuse type.
+
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
+ """
+
name: Required[str]
"""Text not exceeding 255 characters.
@@ -1312,38 +669,23 @@ class AbuseReportsNcseiReport(TypedDict, total=False):
Database (https://lumendatabase.org/).
"""
- urls: Required[str]
- """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/).
- """
+ ncsei_subject_representation: Required[bool]
+ """If the submitter is the target of NCSEI in the URLs of the abuse report."""
- address1: str
- """Text not exceeding 100 characters.
+ owner_notification: Required[Literal["send", "send-anon", "none"]]
+ """Notification type based on the abuse type.
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
+ NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
"""
- agent_name: str
- """The name of the copyright holder.
+ urls: Required[str]
+ """A list of valid URLs separated by ‘\n’ (new line character).
- Text not exceeding 60 characters. This field may be released by Cloudflare to
+ 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/).
"""
- agree: Literal[0, 1]
- """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"""
-
- city: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
comments: str
"""Any additional comments about the infringement not exceeding 2000 characters"""
@@ -1361,83 +703,12 @@ class AbuseReportsNcseiReport(TypedDict, total=False):
Database (https://lumendatabase.org/).
"""
- destination_ips: str
- """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
- """
-
- host_notification: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- justification: str
- """
- 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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ncsei_subject_representation: bool
- """If the submitter is the target of NCSEI in the URLs of the abuse report."""
-
- original_work: str
- """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: Literal["send", "send-anon", "none"]
- """Notification type based on the abuse type.
-
- NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
- """
-
- ports_protocols: str
- """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.
- """
-
reported_country: str
"""Text containing 2 characters"""
reported_user_agent: str
"""Text not exceeding 255 characters"""
- signature: str
- """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: str
- """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: str
- """Text not exceeding 255 characters.
-
- This field may be released by Cloudflare to third parties such as the Lumen
- Database (https://lumendatabase.org/).
- """
-
tele: str
"""Text not exceeding 20 characters.
@@ -1448,22 +719,13 @@ class AbuseReportsNcseiReport(TypedDict, total=False):
title: str
"""Text not exceeding 255 characters"""
- trademark_number: str
- """Text not exceeding 1000 characters"""
-
- trademark_office: str
- """Text not exceeding 1000 characters"""
-
- trademark_symbol: str
- """Text not exceeding 1000 characters"""
-
AbuseReportCreateParams: TypeAlias = Union[
AbuseReportsDmcaReport,
AbuseReportsTrademarkReport,
AbuseReportsGeneralReport,
AbuseReportsPhishingReport,
- AbuseReportsChildrenAbuseReport,
+ AbuseReportsCsamReport,
AbuseReportsThreatReport,
AbuseReportsRegistrarWhoisReport,
AbuseReportsNcseiReport,
diff --git a/src/cloudflare/types/accounts/token_update_params.py b/src/cloudflare/types/accounts/token_update_params.py
index fe7ed0cf440..cb32132b32d 100644
--- a/src/cloudflare/types/accounts/token_update_params.py
+++ b/src/cloudflare/types/accounts/token_update_params.py
@@ -23,9 +23,6 @@ class TokenUpdateParams(TypedDict, total=False):
policies: Required[Iterable[TokenPolicy]]
"""List of access policies assigned to the token."""
- status: Required[Literal["active", "disabled", "expired"]]
- """Status of the token."""
-
condition: Condition
expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
@@ -37,6 +34,9 @@ class TokenUpdateParams(TypedDict, total=False):
not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""The time before which the token MUST NOT be accepted for processing."""
+ status: Literal["active", "disabled", "expired"]
+ """Status of the token."""
+
_ConditionRequestIPReservedKeywords = TypedDict(
"_ConditionRequestIPReservedKeywords",
diff --git a/src/cloudflare/types/accounts/tokens/__init__.py b/src/cloudflare/types/accounts/tokens/__init__.py
index bc8d7e3d210..249ef18bc57 100644
--- a/src/cloudflare/types/accounts/tokens/__init__.py
+++ b/src/cloudflare/types/accounts/tokens/__init__.py
@@ -3,5 +3,7 @@
from __future__ import annotations
from .value_update_params import ValueUpdateParams as ValueUpdateParams
+from .permission_group_get_params import PermissionGroupGetParams as PermissionGroupGetParams
+from .permission_group_list_params import PermissionGroupListParams as PermissionGroupListParams
from .permission_group_get_response import PermissionGroupGetResponse as PermissionGroupGetResponse
from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse
diff --git a/src/cloudflare/types/accounts/tokens/permission_group_get_params.py b/src/cloudflare/types/accounts/tokens/permission_group_get_params.py
new file mode 100644
index 00000000000..c91ca4db066
--- /dev/null
+++ b/src/cloudflare/types/accounts/tokens/permission_group_get_params.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PermissionGroupGetParams"]
+
+
+class PermissionGroupGetParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Account identifier tag."""
+
+ name: str
+ """Filter by the name of the permission group. The value must be URL-encoded."""
+
+ scope: str
+ """Filter by the scope of the permission group. The value must be URL-encoded."""
diff --git a/src/cloudflare/types/accounts/tokens/permission_group_get_response.py b/src/cloudflare/types/accounts/tokens/permission_group_get_response.py
index f7b20d1bcfb..81d6a1d88ba 100644
--- a/src/cloudflare/types/accounts/tokens/permission_group_get_response.py
+++ b/src/cloudflare/types/accounts/tokens/permission_group_get_response.py
@@ -1,14 +1,14 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
from ...._models import BaseModel
-__all__ = ["PermissionGroupGetResponse"]
+__all__ = ["PermissionGroupGetResponse", "PermissionGroupGetResponseItem"]
-class PermissionGroupGetResponse(BaseModel):
+class PermissionGroupGetResponseItem(BaseModel):
id: Optional[str] = None
"""Public ID."""
@@ -26,3 +26,6 @@ class PermissionGroupGetResponse(BaseModel):
]
] = None
"""Resources to which the Permission Group is scoped"""
+
+
+PermissionGroupGetResponse: TypeAlias = List[PermissionGroupGetResponseItem]
diff --git a/src/cloudflare/types/accounts/tokens/permission_group_list_params.py b/src/cloudflare/types/accounts/tokens/permission_group_list_params.py
new file mode 100644
index 00000000000..3a3000cb8a6
--- /dev/null
+++ b/src/cloudflare/types/accounts/tokens/permission_group_list_params.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PermissionGroupListParams"]
+
+
+class PermissionGroupListParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Account identifier tag."""
+
+ name: str
+ """Filter by the name of the permission group. The value must be URL-encoded."""
+
+ scope: str
+ """Filter by the scope of the permission group. The value must be URL-encoded."""
diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py
index 8260aa32d68..24bd9ef9d4a 100644
--- a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py
+++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py
@@ -58,6 +58,14 @@ class BGPPrefix(BaseModel):
asn_prepend_count: Optional[int] = None
"""Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute"""
+ auto_advertise_withdraw: Optional[bool] = None
+ """
+ Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no
+ matching BGP prefix in the Magic routing table. When true, Cloudflare will
+ automatically withdraw the BGP prefix when there are no matching BGP routes, and
+ will resume advertising when there is at least one matching BGP route.
+ """
+
bgp_signal_opts: Optional[BGPSignalOpts] = None
cidr: Optional[str] = None
@@ -68,10 +76,3 @@ class BGPPrefix(BaseModel):
modified_at: Optional[datetime] = None
on_demand: Optional[OnDemand] = None
-
- withdraw_if_no_route: Optional[bool] = None
- """
- Controls whether the BGP prefix is automatically withdrawn when prefix is
- withdrawn from Magic routing table (for Magic Transit customers using Direct
- CNI)
- """
diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py
index e7bba9bc9ef..f610ee9434f 100644
--- a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py
+++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py
@@ -17,15 +17,16 @@ class BGPPrefixEditParams(TypedDict, total=False):
asn_prepend_count: int
"""Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute"""
- on_demand: OnDemand
-
- withdraw_if_no_route: bool
+ auto_advertise_withdraw: bool
"""
- Controls whether the BGP prefix is automatically withdrawn when prefix is
- withdrawn from Magic routing table (for Magic Transit customers using Direct
- CNI)
+ Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no
+ matching BGP prefix in the Magic routing table. When true, Cloudflare will
+ automatically withdraw the BGP prefix when there are no matching BGP routes, and
+ will resume advertising when there is at least one matching BGP route.
"""
+ on_demand: OnDemand
+
class OnDemand(TypedDict, total=False):
advertised: bool
diff --git a/src/cloudflare/types/ai/finetunes/asset_create_response.py b/src/cloudflare/types/ai/finetunes/asset_create_response.py
index eef3e2d7d2d..5647b5f222c 100644
--- a/src/cloudflare/types/ai/finetunes/asset_create_response.py
+++ b/src/cloudflare/types/ai/finetunes/asset_create_response.py
@@ -1,21 +1,9 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from datetime import datetime
-
from ...._models import BaseModel
__all__ = ["AssetCreateResponse"]
class AssetCreateResponse(BaseModel):
- id: str
-
- bucket_name: str
-
- created_at: datetime
-
- file_name: str
-
- finetune_id: str
-
- modified_at: datetime
+ success: bool
diff --git a/src/cloudflare/types/argo/__init__.py b/src/cloudflare/types/argo/__init__.py
index 5ba8527803d..a1776f6ed1c 100644
--- a/src/cloudflare/types/argo/__init__.py
+++ b/src/cloudflare/types/argo/__init__.py
@@ -3,8 +3,6 @@
from __future__ import annotations
from .smart_routing_edit_params import SmartRoutingEditParams as SmartRoutingEditParams
-from .smart_routing_get_response import SmartRoutingGetResponse as SmartRoutingGetResponse
from .tiered_caching_edit_params import TieredCachingEditParams as TieredCachingEditParams
-from .smart_routing_edit_response import SmartRoutingEditResponse as SmartRoutingEditResponse
from .tiered_caching_get_response import TieredCachingGetResponse as TieredCachingGetResponse
from .tiered_caching_edit_response import TieredCachingEditResponse as TieredCachingEditResponse
diff --git a/src/cloudflare/types/argo/smart_routing_edit_params.py b/src/cloudflare/types/argo/smart_routing_edit_params.py
index 44d5123b878..bc03aaab65f 100644
--- a/src/cloudflare/types/argo/smart_routing_edit_params.py
+++ b/src/cloudflare/types/argo/smart_routing_edit_params.py
@@ -9,7 +9,7 @@
class SmartRoutingEditParams(TypedDict, total=False):
zone_id: Required[str]
- """Identifier"""
+ """Specifies the zone associated with the API call."""
value: Required[Literal["on", "off"]]
"""Enables Argo Smart Routing."""
diff --git a/src/cloudflare/types/argo/smart_routing_edit_response.py b/src/cloudflare/types/argo/smart_routing_edit_response.py
deleted file mode 100644
index 7fa39d8d0ca..00000000000
--- a/src/cloudflare/types/argo/smart_routing_edit_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
-__all__ = ["SmartRoutingEditResponse"]
-
-SmartRoutingEditResponse: TypeAlias = Union[Optional[str], Optional[object]]
diff --git a/src/cloudflare/types/argo/smart_routing_get_response.py b/src/cloudflare/types/argo/smart_routing_get_response.py
deleted file mode 100644
index f65642d31d3..00000000000
--- a/src/cloudflare/types/argo/smart_routing_get_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
-__all__ = ["SmartRoutingGetResponse"]
-
-SmartRoutingGetResponse: TypeAlias = Union[Optional[str], Optional[object]]
diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py
index 1321d2b5f99..072d28c6a48 100644
--- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py
+++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py
@@ -35,8 +35,12 @@ class StaleZoneConfiguration(BaseModel):
class BotFightModeConfiguration(BaseModel):
- ai_bots_protection: Optional[Literal["block", "disabled"]] = None
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py
index 4eb28780e1e..f74042c5799 100644
--- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py
+++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py
@@ -8,8 +8,12 @@
class BotFightModeConfigurationParam(TypedDict, total=False):
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/bot_management/bot_management_update_params.py b/src/cloudflare/types/bot_management/bot_management_update_params.py
index 447deb3c4c7..310a2d6515f 100644
--- a/src/cloudflare/types/bot_management/bot_management_update_params.py
+++ b/src/cloudflare/types/bot_management/bot_management_update_params.py
@@ -18,8 +18,12 @@ class BotFightModeConfiguration(TypedDict, total=False):
zone_id: Required[str]
"""Identifier."""
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
@@ -38,8 +42,12 @@ class SuperBotFightModeDefinitelyConfiguration(TypedDict, total=False):
zone_id: Required[str]
"""Identifier."""
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
@@ -71,8 +79,12 @@ class SuperBotFightModeLikelyConfiguration(TypedDict, total=False):
zone_id: Required[str]
"""Identifier."""
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
@@ -107,8 +119,12 @@ class SubscriptionConfiguration(TypedDict, total=False):
zone_id: Required[str]
"""Identifier."""
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
auto_update_model: bool
"""
diff --git a/src/cloudflare/types/bot_management/subscription_configuration.py b/src/cloudflare/types/bot_management/subscription_configuration.py
index 8a874700038..5aa253353c6 100644
--- a/src/cloudflare/types/bot_management/subscription_configuration.py
+++ b/src/cloudflare/types/bot_management/subscription_configuration.py
@@ -35,8 +35,12 @@ class StaleZoneConfiguration(BaseModel):
class SubscriptionConfiguration(BaseModel):
- ai_bots_protection: Optional[Literal["block", "disabled"]] = None
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
auto_update_model: Optional[bool] = None
"""
diff --git a/src/cloudflare/types/bot_management/subscription_configuration_param.py b/src/cloudflare/types/bot_management/subscription_configuration_param.py
index a58d9f30ac6..9a61562625e 100644
--- a/src/cloudflare/types/bot_management/subscription_configuration_param.py
+++ b/src/cloudflare/types/bot_management/subscription_configuration_param.py
@@ -8,8 +8,12 @@
class SubscriptionConfigurationParam(TypedDict, total=False):
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
auto_update_model: bool
"""
diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py
index 63e9cbc33cf..23595091365 100644
--- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py
+++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py
@@ -20,8 +20,12 @@ class StaleZoneConfiguration(BaseModel):
class SuperBotFightModeDefinitelyConfiguration(BaseModel):
- ai_bots_protection: Optional[Literal["block", "disabled"]] = None
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py
index d8b195afaf4..c04a33374e5 100644
--- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py
+++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py
@@ -8,8 +8,12 @@
class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False):
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py
index 1547b01318c..e3cf122345b 100644
--- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py
+++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py
@@ -14,8 +14,12 @@ class StaleZoneConfiguration(BaseModel):
class SuperBotFightModeLikelyConfiguration(BaseModel):
- ai_bots_protection: Optional[Literal["block", "disabled"]] = None
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py
index 6cb2e09143d..ef00c4bc186 100644
--- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py
+++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py
@@ -8,8 +8,12 @@
class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False):
- ai_bots_protection: Literal["block", "disabled"]
- """Enable rule to block AI Scrapers and Crawlers."""
+ ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"]
+ """Enable rule to block AI Scrapers and Crawlers.
+
+ Please note the value `only_on_ad_pages` is currently not available for
+ Enterprise customers.
+ """
crawler_protection: Literal["enabled", "disabled"]
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
diff --git a/src/cloudflare/types/brand_protection/__init__.py b/src/cloudflare/types/brand_protection/__init__.py
index 3fa7ed724bd..f3e3feffbce 100644
--- a/src/cloudflare/types/brand_protection/__init__.py
+++ b/src/cloudflare/types/brand_protection/__init__.py
@@ -2,10 +2,17 @@
from __future__ import annotations
-from .info import Info as Info
-from .submit import Submit as Submit
-from .rule_match import RuleMatch as RuleMatch
-from .scan_status import ScanStatus as ScanStatus
-from .url_info_model_results import URLInfoModelResults as URLInfoModelResults
-from .brand_protection_submit_params import BrandProtectionSubmitParams as BrandProtectionSubmitParams
-from .brand_protection_url_info_params import BrandProtectionURLInfoParams as BrandProtectionURLInfoParams
+from .match_get_params import MatchGetParams as MatchGetParams
+from .logo_create_params import LogoCreateParams as LogoCreateParams
+from .match_get_response import MatchGetResponse as MatchGetResponse
+from .query_create_params import QueryCreateParams as QueryCreateParams
+from .query_delete_params import QueryDeleteParams as QueryDeleteParams
+from .logo_create_response import LogoCreateResponse as LogoCreateResponse
+from .logo_match_get_params import LogoMatchGetParams as LogoMatchGetParams
+from .match_download_params import MatchDownloadParams as MatchDownloadParams
+from .logo_match_get_response import LogoMatchGetResponse as LogoMatchGetResponse
+from .match_download_response import MatchDownloadResponse as MatchDownloadResponse
+from .logo_match_download_params import LogoMatchDownloadParams as LogoMatchDownloadParams
+from .logo_match_download_response import LogoMatchDownloadResponse as LogoMatchDownloadResponse
+from .brand_protection_submit_response import BrandProtectionSubmitResponse as BrandProtectionSubmitResponse
+from .brand_protection_url_info_response import BrandProtectionURLInfoResponse as BrandProtectionURLInfoResponse
diff --git a/src/cloudflare/types/brand_protection/brand_protection_submit_response.py b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py
new file mode 100644
index 00000000000..3254b97c4d0
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BrandProtectionSubmitResponse"]
+
+
+class BrandProtectionSubmitResponse(BaseModel):
+ skipped_urls: Optional[List[Dict[str, object]]] = None
+
+ submitted_urls: Optional[List[Dict[str, object]]] = None
diff --git a/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py b/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py
deleted file mode 100644
index 26a4bfa6d9e..00000000000
--- a/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import List, Iterable
-from typing_extensions import Required, TypedDict
-
-__all__ = ["BrandProtectionURLInfoParams"]
-
-
-class BrandProtectionURLInfoParams(TypedDict, total=False):
- account_id: Required[str]
- """Identifier."""
-
- url: List[str]
- """Submission URL(s) to filter submission results by."""
-
- url_id: Iterable[int]
- """Submission ID(s) to filter submission results by."""
diff --git a/src/cloudflare/types/kv/namespaces/metadata_get_response.py b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py
similarity index 58%
rename from src/cloudflare/types/kv/namespaces/metadata_get_response.py
rename to src/cloudflare/types/brand_protection/brand_protection_url_info_response.py
index 74bf2b5c93e..25dd3de5a58 100644
--- a/src/cloudflare/types/kv/namespaces/metadata_get_response.py
+++ b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py
@@ -3,6 +3,6 @@
from typing import Dict
from typing_extensions import TypeAlias
-__all__ = ["MetadataGetResponse"]
+__all__ = ["BrandProtectionURLInfoResponse"]
-MetadataGetResponse: TypeAlias = Dict[str, object]
+BrandProtectionURLInfoResponse: TypeAlias = Dict[str, object]
diff --git a/src/cloudflare/types/brand_protection/info.py b/src/cloudflare/types/brand_protection/info.py
deleted file mode 100644
index ecc27c62f00..00000000000
--- a/src/cloudflare/types/brand_protection/info.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from pydantic import Field as FieldInfo
-
-from ..._models import BaseModel
-from .rule_match import RuleMatch
-from .scan_status import ScanStatus
-from .url_info_model_results import URLInfoModelResults
-
-__all__ = ["Info", "Categorization"]
-
-
-class Categorization(BaseModel):
- category: Optional[str] = None
- """Name of the category applied."""
-
- verification_status: Optional[str] = None
- """Result of human review for this categorization."""
-
-
-class Info(BaseModel):
- categorizations: Optional[List[Categorization]] = None
- """List of categorizations applied to this submission."""
-
- ai_model_results: Optional[List[URLInfoModelResults]] = FieldInfo(alias="model_results", default=None)
- """List of model results for completed scans."""
-
- rule_matches: Optional[List[RuleMatch]] = None
- """
- List of signatures that matched against site content found when crawling the
- URL.
- """
-
- scan_status: Optional[ScanStatus] = None
- """Status of the most recent scan found."""
-
- screenshot_download_signature: Optional[str] = None
- """For internal use."""
-
- screenshot_path: Optional[str] = None
- """For internal use."""
-
- url: Optional[str] = None
- """URL that was submitted."""
diff --git a/src/cloudflare/types/brand_protection/logo_create_params.py b/src/cloudflare/types/brand_protection/logo_create_params.py
new file mode 100644
index 00000000000..2fd40da7f6b
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/logo_create_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import FileTypes
+
+__all__ = ["LogoCreateParams"]
+
+
+class LogoCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ match_type: str
+
+ tag: str
+
+ threshold: float
+
+ image: FileTypes
diff --git a/src/cloudflare/types/brand_protection/logo_create_response.py b/src/cloudflare/types/brand_protection/logo_create_response.py
new file mode 100644
index 00000000000..d6a6055502f
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/logo_create_response.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["LogoCreateResponse"]
+
+
+class LogoCreateResponse(BaseModel):
+ id: Optional[int] = None
+
+ tag: Optional[str] = None
+
+ upload_path: Optional[str] = None
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py b/src/cloudflare/types/brand_protection/logo_match_download_params.py
similarity index 53%
rename from src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py
rename to src/cloudflare/types/brand_protection/logo_match_download_params.py
index 5fd3dc33226..51dd3a9eba7 100644
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py
+++ b/src/cloudflare/types/brand_protection/logo_match_download_params.py
@@ -2,16 +2,17 @@
from __future__ import annotations
+from typing import List
from typing_extensions import Required, TypedDict
-__all__ = ["InsightEditParams"]
+__all__ = ["LogoMatchDownloadParams"]
-class InsightEditParams(TypedDict, total=False):
+class LogoMatchDownloadParams(TypedDict, total=False):
account_id: Required[str]
- """Account ID."""
- event_id: Required[str]
- """Event UUID."""
+ limit: str
- content: Required[str]
+ logo_id: List[str]
+
+ offset: str
diff --git a/src/cloudflare/types/brand_protection/logo_match_download_response.py b/src/cloudflare/types/brand_protection/logo_match_download_response.py
new file mode 100644
index 00000000000..494aeefcdd5
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/logo_match_download_response.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["LogoMatchDownloadResponse"]
+
+
+class LogoMatchDownloadResponse(BaseModel):
+ matches: Optional[List[Dict[str, object]]] = None
+
+ total: Optional[int] = None
diff --git a/src/cloudflare/types/brand_protection/logo_match_get_params.py b/src/cloudflare/types/brand_protection/logo_match_get_params.py
new file mode 100644
index 00000000000..f91e3001a97
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/logo_match_get_params.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+from typing_extensions import Required, TypedDict
+
+__all__ = ["LogoMatchGetParams"]
+
+
+class LogoMatchGetParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ limit: str
+
+ logo_id: List[str]
+
+ offset: str
diff --git a/src/cloudflare/types/brand_protection/logo_match_get_response.py b/src/cloudflare/types/brand_protection/logo_match_get_response.py
new file mode 100644
index 00000000000..b61e431ad09
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/logo_match_get_response.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["LogoMatchGetResponse"]
+
+
+class LogoMatchGetResponse(BaseModel):
+ matches: Optional[List[Dict[str, object]]] = None
+
+ total: Optional[int] = None
diff --git a/src/cloudflare/types/brand_protection/match_download_params.py b/src/cloudflare/types/brand_protection/match_download_params.py
new file mode 100644
index 00000000000..c9c1474e874
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/match_download_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["MatchDownloadParams"]
+
+
+class MatchDownloadParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ id: str
+
+ include_domain_id: bool
+
+ limit: int
+
+ offset: int
diff --git a/src/cloudflare/types/brand_protection/match_download_response.py b/src/cloudflare/types/brand_protection/match_download_response.py
new file mode 100644
index 00000000000..8f19d4deab4
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/match_download_response.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["MatchDownloadResponse"]
+
+
+class MatchDownloadResponse(BaseModel):
+ matches: Optional[List[Dict[str, object]]] = None
+
+ total: Optional[int] = None
diff --git a/src/cloudflare/types/brand_protection/match_get_params.py b/src/cloudflare/types/brand_protection/match_get_params.py
new file mode 100644
index 00000000000..e328903a3ec
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/match_get_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["MatchGetParams"]
+
+
+class MatchGetParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ id: str
+
+ include_domain_id: bool
+
+ limit: int
+
+ offset: int
diff --git a/src/cloudflare/types/brand_protection/match_get_response.py b/src/cloudflare/types/brand_protection/match_get_response.py
new file mode 100644
index 00000000000..bdf7bfdcb6d
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/match_get_response.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["MatchGetResponse"]
+
+
+class MatchGetResponse(BaseModel):
+ matches: Optional[List[Dict[str, object]]] = None
+
+ total: Optional[int] = None
diff --git a/src/cloudflare/types/brand_protection/query_create_params.py b/src/cloudflare/types/brand_protection/query_create_params.py
new file mode 100644
index 00000000000..543c7bbbc71
--- /dev/null
+++ b/src/cloudflare/types/brand_protection/query_create_params.py
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import datetime
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["QueryCreateParams"]
+
+
+class QueryCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ id: str
+
+ query_scan: Annotated[bool, PropertyInfo(alias="scan")]
+
+ query_tag: Annotated[str, PropertyInfo(alias="tag")]
+
+ max_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+
+ min_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+
+ body_scan: Annotated[bool, PropertyInfo(alias="scan")]
+
+ string_matches: object
+
+ body_tag: Annotated[str, PropertyInfo(alias="tag")]
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py b/src/cloudflare/types/brand_protection/query_delete_params.py
similarity index 60%
rename from src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py
rename to src/cloudflare/types/brand_protection/query_delete_params.py
index bcb266c36be..d4a095e924d 100644
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py
+++ b/src/cloudflare/types/brand_protection/query_delete_params.py
@@ -4,11 +4,14 @@
from typing_extensions import Required, TypedDict
-__all__ = ["InsightCreateParams"]
+__all__ = ["QueryDeleteParams"]
-class InsightCreateParams(TypedDict, total=False):
+class QueryDeleteParams(TypedDict, total=False):
account_id: Required[str]
- """Account ID."""
- content: Required[str]
+ id: str
+
+ scan: bool
+
+ tag: str
diff --git a/src/cloudflare/types/brand_protection/rule_match.py b/src/cloudflare/types/brand_protection/rule_match.py
deleted file mode 100644
index 00452de5674..00000000000
--- a/src/cloudflare/types/brand_protection/rule_match.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ..._models import BaseModel
-
-__all__ = ["RuleMatch"]
-
-
-class RuleMatch(BaseModel):
- banning: Optional[bool] = None
- """For internal use."""
-
- blocking: Optional[bool] = None
- """For internal use."""
-
- description: Optional[str] = None
- """Description of the signature that matched."""
-
- name: Optional[str] = None
- """Name of the signature that matched."""
diff --git a/src/cloudflare/types/brand_protection/scan_status.py b/src/cloudflare/types/brand_protection/scan_status.py
deleted file mode 100644
index 711de0b5ed6..00000000000
--- a/src/cloudflare/types/brand_protection/scan_status.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ..._models import BaseModel
-
-__all__ = ["ScanStatus"]
-
-
-class ScanStatus(BaseModel):
- last_processed: Optional[str] = None
- """Timestamp of when the submission was processed."""
-
- scan_complete: Optional[bool] = None
- """For internal use."""
-
- status_code: Optional[int] = None
- """Status code that the crawler received when loading the submitted URL."""
-
- submission_id: Optional[int] = None
- """ID of the most recent submission."""
diff --git a/src/cloudflare/types/brand_protection/submit.py b/src/cloudflare/types/brand_protection/submit.py
deleted file mode 100644
index e8d8ce9c0d1..00000000000
--- a/src/cloudflare/types/brand_protection/submit.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ..._models import BaseModel
-
-__all__ = ["Submit", "ExcludedURL", "SkippedURL", "SubmittedURL"]
-
-
-class ExcludedURL(BaseModel):
- url: Optional[str] = None
- """URL that was excluded."""
-
-
-class SkippedURL(BaseModel):
- url: Optional[str] = None
- """URL that was skipped."""
-
- url_id: Optional[int] = None
- """ID of the submission of that URL that is currently scanning."""
-
-
-class SubmittedURL(BaseModel):
- url: Optional[str] = None
- """URL that was submitted."""
-
- url_id: Optional[int] = None
- """ID assigned to this URL submission. Used to retrieve scanning results."""
-
-
-class Submit(BaseModel):
- excluded_urls: Optional[List[ExcludedURL]] = None
- """
- URLs that were excluded from scanning because their domain is in our no-scan
- list.
- """
-
- skipped_urls: Optional[List[SkippedURL]] = None
- """URLs that were skipped because the same URL is currently being scanned."""
-
- submitted_urls: Optional[List[SubmittedURL]] = None
- """URLs that were successfully submitted for scanning."""
diff --git a/src/cloudflare/types/brand_protection/url_info_model_results.py b/src/cloudflare/types/brand_protection/url_info_model_results.py
deleted file mode 100644
index 009d47d14ca..00000000000
--- a/src/cloudflare/types/brand_protection/url_info_model_results.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from pydantic import Field as FieldInfo
-
-from ..._models import BaseModel
-
-__all__ = ["URLInfoModelResults"]
-
-
-class URLInfoModelResults(BaseModel):
- ai_model_name: Optional[str] = FieldInfo(alias="model_name", default=None)
- """Name of the model."""
-
- ai_model_score: Optional[float] = FieldInfo(alias="model_score", default=None)
- """This is the score that is outputted by the model for this submission."""
diff --git a/src/cloudflare/types/browser_rendering/pdf_create_params.py b/src/cloudflare/types/browser_rendering/pdf_create_params.py
index a131f2e7193..73fb0505890 100644
--- a/src/cloudflare/types/browser_rendering/pdf_create_params.py
+++ b/src/cloudflare/types/browser_rendering/pdf_create_params.py
@@ -14,6 +14,8 @@
"Authenticate",
"Cookie",
"GotoOptions",
+ "PDFOptions",
+ "PDFOptionsMargin",
"Viewport",
"WaitForSelector",
]
@@ -95,6 +97,9 @@ class PDFCreateParams(TypedDict, total=False):
Either `html` or `url` must be set.
"""
+ pdf_options: Annotated[PDFOptions, PropertyInfo(alias="pdfOptions")]
+ """Check [options](https://pptr.dev/api/puppeteer.pdfoptions)."""
+
reject_request_pattern: Annotated[List[str], PropertyInfo(alias="rejectRequestPattern")]
"""Block undesired requests that match the provided regex patterns, eg.
@@ -221,6 +226,66 @@ class GotoOptions(TypedDict, total=False):
]
+class PDFOptionsMargin(TypedDict, total=False):
+ bottom: Union[str, float]
+
+ left: Union[str, float]
+
+ right: Union[str, float]
+
+ top: Union[str, float]
+
+
+class PDFOptions(TypedDict, total=False):
+ display_header_footer: Annotated[bool, PropertyInfo(alias="displayHeaderFooter")]
+ """Whether to show the header and footer."""
+
+ footer_template: Annotated[str, PropertyInfo(alias="footerTemplate")]
+ """HTML template for the print footer."""
+
+ format: Literal["letter", "legal", "tabloid", "ledger", "a0", "a1", "a2", "a3", "a4", "a5", "a6"]
+ """Paper format. Takes priority over width and height if set."""
+
+ header_template: Annotated[str, PropertyInfo(alias="headerTemplate")]
+ """HTML template for the print header."""
+
+ height: Union[str, float]
+ """Sets the height of paper. Can be a number or string with unit."""
+
+ landscape: bool
+ """Whether to print in landscape orientation."""
+
+ margin: PDFOptionsMargin
+ """Set the PDF margins. Useful when setting header and footer."""
+
+ omit_background: Annotated[bool, PropertyInfo(alias="omitBackground")]
+ """Hides default white background and allows generating pdfs with transparency."""
+
+ outline: bool
+ """Generate document outline."""
+
+ page_ranges: Annotated[str, PropertyInfo(alias="pageRanges")]
+ """Paper ranges to print, e.g. '1-5, 8, 11-13'."""
+
+ prefer_css_page_size: Annotated[bool, PropertyInfo(alias="preferCSSPageSize")]
+ """Give CSS @page size priority over other size declarations."""
+
+ print_background: Annotated[bool, PropertyInfo(alias="printBackground")]
+ """Set to true to print background graphics."""
+
+ scale: float
+ """Scales the rendering of the web page. Amount must be between 0.1 and 2."""
+
+ tagged: bool
+ """Generate tagged (accessible) PDF."""
+
+ timeout: float
+ """Timeout in milliseconds."""
+
+ width: Union[str, float]
+ """Sets the width of paper. Can be a number or string with unit."""
+
+
class Viewport(TypedDict, total=False):
height: Required[float]
diff --git a/src/cloudflare/types/cache/cache_purge_response.py b/src/cloudflare/types/cache/cache_purge_response.py
index 0fd0bab3225..b273a296fbc 100644
--- a/src/cloudflare/types/cache/cache_purge_response.py
+++ b/src/cloudflare/types/cache/cache_purge_response.py
@@ -7,4 +7,3 @@
class CachePurgeResponse(BaseModel):
id: str
- """Identifier."""
diff --git a/src/cloudflare/types/cloudforce_one/__init__.py b/src/cloudflare/types/cloudforce_one/__init__.py
index 580f8a76c3e..89926d23c3f 100644
--- a/src/cloudflare/types/cloudforce_one/__init__.py
+++ b/src/cloudflare/types/cloudforce_one/__init__.py
@@ -18,7 +18,9 @@
from .threat_event_create_params import ThreatEventCreateParams as ThreatEventCreateParams
from .threat_event_edit_response import ThreatEventEditResponse as ThreatEventEditResponse
from .threat_event_list_response import ThreatEventListResponse as ThreatEventListResponse
+from .binary_storage_create_params import BinaryStorageCreateParams as BinaryStorageCreateParams
from .threat_event_create_response import ThreatEventCreateResponse as ThreatEventCreateResponse
from .threat_event_delete_response import ThreatEventDeleteResponse as ThreatEventDeleteResponse
+from .binary_storage_create_response import BinaryStorageCreateResponse as BinaryStorageCreateResponse
from .threat_event_bulk_create_params import ThreatEventBulkCreateParams as ThreatEventBulkCreateParams
from .threat_event_bulk_create_response import ThreatEventBulkCreateResponse as ThreatEventBulkCreateResponse
diff --git a/src/cloudflare/types/cloudforce_one/binary_storage_create_params.py b/src/cloudflare/types/cloudforce_one/binary_storage_create_params.py
new file mode 100644
index 00000000000..ff8d1882de7
--- /dev/null
+++ b/src/cloudflare/types/cloudforce_one/binary_storage_create_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import FileTypes
+
+__all__ = ["BinaryStorageCreateParams"]
+
+
+class BinaryStorageCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Account ID."""
+
+ file: Required[FileTypes]
+ """The binary file content to upload."""
diff --git a/src/cloudflare/types/cloudforce_one/binary_storage_create_response.py b/src/cloudflare/types/cloudforce_one/binary_storage_create_response.py
new file mode 100644
index 00000000000..55c34d4e2fa
--- /dev/null
+++ b/src/cloudflare/types/cloudforce_one/binary_storage_create_response.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["BinaryStorageCreateResponse"]
+
+
+class BinaryStorageCreateResponse(BaseModel):
+ content_type: str
+
+ md5: str
+
+ sha1: str
+
+ sha256: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py
index 366b219d1b6..816393ffb76 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py
@@ -29,10 +29,6 @@ class DataRaw(TypedDict, total=False):
class Data(TypedDict, total=False):
- attacker: Required[str]
-
- attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]]
-
category: Required[str]
date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
@@ -47,6 +43,10 @@ class Data(TypedDict, total=False):
account_id: Annotated[float, PropertyInfo(alias="accountId")]
+ attacker: str
+
+ attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")]
+
dataset_id: Annotated[str, PropertyInfo(alias="datasetId")]
indicator: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py
index 7d9273c9f24..e246309fd92 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py
@@ -1,69 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
from typing_extensions import TypeAlias
-from pydantic import Field as FieldInfo
+__all__ = ["ThreatEventBulkCreateResponse"]
-from ..._models import BaseModel
-
-__all__ = ["ThreatEventBulkCreateResponse", "ThreatEventBulkCreateResponseItem"]
-
-
-class ThreatEventBulkCreateResponseItem(BaseModel):
- id: float
-
- account_id: float = FieldInfo(alias="accountId")
-
- attacker: str
-
- attacker_country: str = FieldInfo(alias="attackerCountry")
-
- category: str
-
- category_id: float = FieldInfo(alias="categoryId")
-
- date: str
-
- event: str
-
- indicator: str
-
- indicator_type: str = FieldInfo(alias="indicatorType")
-
- indicator_type_id: float = FieldInfo(alias="indicatorTypeId")
-
- kill_chain: float = FieldInfo(alias="killChain")
-
- mitre_attack: List[str] = FieldInfo(alias="mitreAttack")
-
- num_referenced: float = FieldInfo(alias="numReferenced")
-
- num_references: float = FieldInfo(alias="numReferences")
-
- raw_id: str = FieldInfo(alias="rawId")
-
- referenced: List[str]
-
- referenced_ids: List[float] = FieldInfo(alias="referencedIds")
-
- references: List[str]
-
- references_ids: List[float] = FieldInfo(alias="referencesIds")
-
- tags: List[str]
-
- target_country: str = FieldInfo(alias="targetCountry")
-
- target_industry: str = FieldInfo(alias="targetIndustry")
-
- tlp: str
-
- uuid: str
-
- insight: Optional[str] = None
-
- releasability_id: Optional[str] = FieldInfo(alias="releasabilityId", default=None)
-
-
-ThreatEventBulkCreateResponse: TypeAlias = List[ThreatEventBulkCreateResponseItem]
+ThreatEventBulkCreateResponse: TypeAlias = float
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py
index 225d471ad0b..890a2252d93 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py
@@ -15,10 +15,6 @@ class ThreatEventCreateParams(TypedDict, total=False):
path_account_id: Required[Annotated[str, PropertyInfo(alias="account_id")]]
"""Account ID."""
- attacker: Required[str]
-
- attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]]
-
category: Required[str]
date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
@@ -33,6 +29,10 @@ class ThreatEventCreateParams(TypedDict, total=False):
body_account_id: Annotated[float, PropertyInfo(alias="accountId")]
+ attacker: str
+
+ attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")]
+
dataset_id: Annotated[str, PropertyInfo(alias="datasetId")]
indicator: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py
index 4295255b079..4481584c481 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py
@@ -20,8 +20,6 @@ class ThreatEventCreateResponse(BaseModel):
category: str
- category_id: float = FieldInfo(alias="categoryId")
-
date: str
event: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py b/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py
index 1878da8e9e5..5488eb9964c 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py
@@ -2,13 +2,13 @@
from __future__ import annotations
-from typing import Union
+from typing import Dict, Union, Optional
from datetime import datetime
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
-__all__ = ["ThreatEventEditParams"]
+__all__ = ["ThreatEventEditParams", "Raw"]
class ThreatEventEditParams(TypedDict, total=False):
@@ -29,8 +29,20 @@ class ThreatEventEditParams(TypedDict, total=False):
indicator_type: Annotated[str, PropertyInfo(alias="indicatorType")]
+ insight: str
+
+ raw: Raw
+
target_country: Annotated[str, PropertyInfo(alias="targetCountry")]
target_industry: Annotated[str, PropertyInfo(alias="targetIndustry")]
tlp: str
+
+
+class Raw(TypedDict, total=False):
+ data: Optional[Dict[str, object]]
+
+ source: str
+
+ tlp: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py
index d231b5a963b..aea29555fc7 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py
@@ -20,8 +20,6 @@ class ThreatEventEditResponse(BaseModel):
category: str
- category_id: float = FieldInfo(alias="categoryId")
-
date: str
event: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py
index 93a44b230ec..7f78c9ea9e6 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py
@@ -20,8 +20,6 @@ class ThreatEventGetResponse(BaseModel):
category: str
- category_id: float = FieldInfo(alias="categoryId")
-
date: str
event: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py
index 4c7c2b691ad..111bbd14aae 100644
--- a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py
+++ b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py
@@ -21,8 +21,6 @@ class ThreatEventListResponseItem(BaseModel):
category: str
- category_id: float = FieldInfo(alias="categoryId")
-
date: str
event: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py
index f4e3339f8d7..e164956d90b 100644
--- a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py
+++ b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py
@@ -9,19 +9,15 @@
from .cron_edit_response import CronEditResponse as CronEditResponse
from .cron_list_response import CronListResponse as CronListResponse
from .dataset_edit_params import DatasetEditParams as DatasetEditParams
-from .insight_edit_params import InsightEditParams as InsightEditParams
from .tag_create_response import TagCreateResponse as TagCreateResponse
from .category_edit_params import CategoryEditParams as CategoryEditParams
from .dataset_get_response import DatasetGetResponse as DatasetGetResponse
from .dataset_raw_response import DatasetRawResponse as DatasetRawResponse
-from .insight_get_response import InsightGetResponse as InsightGetResponse
from .category_get_response import CategoryGetResponse as CategoryGetResponse
from .country_list_response import CountryListResponse as CountryListResponse
from .dataset_create_params import DatasetCreateParams as DatasetCreateParams
from .dataset_edit_response import DatasetEditResponse as DatasetEditResponse
from .dataset_list_response import DatasetListResponse as DatasetListResponse
-from .insight_create_params import InsightCreateParams as InsightCreateParams
-from .insight_edit_response import InsightEditResponse as InsightEditResponse
from .attacker_list_response import AttackerListResponse as AttackerListResponse
from .category_create_params import CategoryCreateParams as CategoryCreateParams
from .category_edit_response import CategoryEditResponse as CategoryEditResponse
@@ -29,8 +25,6 @@
from .relate_delete_response import RelateDeleteResponse as RelateDeleteResponse
from .dataset_create_response import DatasetCreateResponse as DatasetCreateResponse
from .event_tag_create_params import EventTagCreateParams as EventTagCreateParams
-from .insight_create_response import InsightCreateResponse as InsightCreateResponse
-from .insight_delete_response import InsightDeleteResponse as InsightDeleteResponse
from .category_create_response import CategoryCreateResponse as CategoryCreateResponse
from .category_delete_response import CategoryDeleteResponse as CategoryDeleteResponse
from .event_tag_create_response import EventTagCreateResponse as EventTagCreateResponse
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py
deleted file mode 100644
index 4090786269b..00000000000
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["InsightCreateResponse"]
-
-
-class InsightCreateResponse(BaseModel):
- content: str
-
- uuid: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py
deleted file mode 100644
index d8f336d78cc..00000000000
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["InsightDeleteResponse"]
-
-
-class InsightDeleteResponse(BaseModel):
- success: bool
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py
deleted file mode 100644
index ce0558b59f0..00000000000
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["InsightEditResponse"]
-
-
-class InsightEditResponse(BaseModel):
- content: str
-
- uuid: str
diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py
deleted file mode 100644
index 59d96187ff8..00000000000
--- a/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["InsightGetResponse"]
-
-
-class InsightGetResponse(BaseModel):
- content: str
-
- uuid: str
diff --git a/src/cloudflare/types/custom_pages/__init__.py b/src/cloudflare/types/custom_pages/__init__.py
index e5ca1c5b4a9..82f908e3834 100644
--- a/src/cloudflare/types/custom_pages/__init__.py
+++ b/src/cloudflare/types/custom_pages/__init__.py
@@ -3,5 +3,6 @@
from __future__ import annotations
from .custom_page_get_response import CustomPageGetResponse as CustomPageGetResponse
+from .custom_page_list_response import CustomPageListResponse as CustomPageListResponse
from .custom_page_update_params import CustomPageUpdateParams as CustomPageUpdateParams
from .custom_page_update_response import CustomPageUpdateResponse as CustomPageUpdateResponse
diff --git a/src/cloudflare/types/custom_pages/custom_page_get_response.py b/src/cloudflare/types/custom_pages/custom_page_get_response.py
index 9d47f7bec47..3644da0fec0 100644
--- a/src/cloudflare/types/custom_pages/custom_page_get_response.py
+++ b/src/cloudflare/types/custom_pages/custom_page_get_response.py
@@ -1,8 +1,29 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union
-from typing_extensions import TypeAlias
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
__all__ = ["CustomPageGetResponse"]
-CustomPageGetResponse: TypeAlias = Union[str, object, None]
+
+class CustomPageGetResponse(BaseModel):
+ id: Optional[str] = None
+
+ created_on: Optional[datetime] = None
+
+ description: Optional[str] = None
+
+ modified_on: Optional[datetime] = None
+
+ preview_target: Optional[str] = None
+
+ required_tokens: Optional[List[str]] = None
+
+ state: Optional[Literal["default", "customized"]] = None
+ """The custom page state."""
+
+ url: Optional[str] = None
+ """The URL associated with the custom page."""
diff --git a/src/cloudflare/types/custom_pages/custom_page_list_response.py b/src/cloudflare/types/custom_pages/custom_page_list_response.py
new file mode 100644
index 00000000000..da03e87bada
--- /dev/null
+++ b/src/cloudflare/types/custom_pages/custom_page_list_response.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["CustomPageListResponse"]
+
+
+class CustomPageListResponse(BaseModel):
+ id: Optional[str] = None
+
+ created_on: Optional[datetime] = None
+
+ description: Optional[str] = None
+
+ modified_on: Optional[datetime] = None
+
+ preview_target: Optional[str] = None
+
+ required_tokens: Optional[List[str]] = None
+
+ state: Optional[Literal["default", "customized"]] = None
+ """The custom page state."""
+
+ url: Optional[str] = None
+ """The URL associated with the custom page."""
diff --git a/src/cloudflare/types/custom_pages/custom_page_update_response.py b/src/cloudflare/types/custom_pages/custom_page_update_response.py
index abffe604a1c..fd32fe3fd44 100644
--- a/src/cloudflare/types/custom_pages/custom_page_update_response.py
+++ b/src/cloudflare/types/custom_pages/custom_page_update_response.py
@@ -1,8 +1,29 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union
-from typing_extensions import TypeAlias
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
__all__ = ["CustomPageUpdateResponse"]
-CustomPageUpdateResponse: TypeAlias = Union[str, object, None]
+
+class CustomPageUpdateResponse(BaseModel):
+ id: Optional[str] = None
+
+ created_on: Optional[datetime] = None
+
+ description: Optional[str] = None
+
+ modified_on: Optional[datetime] = None
+
+ preview_target: Optional[str] = None
+
+ required_tokens: Optional[List[str]] = None
+
+ state: Optional[Literal["default", "customized"]] = None
+ """The custom page state."""
+
+ url: Optional[str] = None
+ """The URL associated with the custom page."""
diff --git a/src/cloudflare/types/diagnostics/__init__.py b/src/cloudflare/types/diagnostics/__init__.py
index 8dafb1b2780..34ee1d787f3 100644
--- a/src/cloudflare/types/diagnostics/__init__.py
+++ b/src/cloudflare/types/diagnostics/__init__.py
@@ -4,3 +4,10 @@
from .traceroute import Traceroute as Traceroute
from .traceroute_create_params import TracerouteCreateParams as TracerouteCreateParams
+from .endpoint_healthcheck_get_response import EndpointHealthcheckGetResponse as EndpointHealthcheckGetResponse
+from .endpoint_healthcheck_create_params import EndpointHealthcheckCreateParams as EndpointHealthcheckCreateParams
+from .endpoint_healthcheck_list_response import EndpointHealthcheckListResponse as EndpointHealthcheckListResponse
+from .endpoint_healthcheck_update_params import EndpointHealthcheckUpdateParams as EndpointHealthcheckUpdateParams
+from .endpoint_healthcheck_create_response import EndpointHealthcheckCreateResponse as EndpointHealthcheckCreateResponse
+from .endpoint_healthcheck_delete_response import EndpointHealthcheckDeleteResponse as EndpointHealthcheckDeleteResponse
+from .endpoint_healthcheck_update_response import EndpointHealthcheckUpdateResponse as EndpointHealthcheckUpdateResponse
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py
new file mode 100644
index 00000000000..f47f969bac2
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["EndpointHealthcheckCreateParams"]
+
+
+class EndpointHealthcheckCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Identifier"""
+
+ check_type: Required[Literal["icmp"]]
+ """type of check to perform"""
+
+ endpoint: Required[str]
+ """the IP address of the host to perform checks against"""
+
+ name: str
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py
new file mode 100644
index 00000000000..9d27507c25c
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["EndpointHealthcheckCreateResponse"]
+
+
+class EndpointHealthcheckCreateResponse(BaseModel):
+ check_type: Literal["icmp"]
+ """type of check to perform"""
+
+ endpoint: str
+ """the IP address of the host to perform checks against"""
+
+ id: Optional[str] = None
+ """UUID."""
+
+ name: Optional[str] = None
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_delete_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_delete_response.py
new file mode 100644
index 00000000000..bd763657c92
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_delete_response.py
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["EndpointHealthcheckDeleteResponse", "Error", "ErrorSource", "Message", "MessageSource"]
+
+
+class ErrorSource(BaseModel):
+ pointer: Optional[str] = None
+
+
+class Error(BaseModel):
+ code: int
+
+ message: str
+
+ documentation_url: Optional[str] = None
+
+ source: Optional[ErrorSource] = None
+
+
+class MessageSource(BaseModel):
+ pointer: Optional[str] = None
+
+
+class Message(BaseModel):
+ code: int
+
+ message: str
+
+ documentation_url: Optional[str] = None
+
+ source: Optional[MessageSource] = None
+
+
+class EndpointHealthcheckDeleteResponse(BaseModel):
+ errors: List[Error]
+
+ messages: List[Message]
+
+ success: Literal[True]
+ """Whether the API call was successful."""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_get_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_get_response.py
new file mode 100644
index 00000000000..0106c8489c5
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_get_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["EndpointHealthcheckGetResponse"]
+
+
+class EndpointHealthcheckGetResponse(BaseModel):
+ check_type: Literal["icmp"]
+ """type of check to perform"""
+
+ endpoint: str
+ """the IP address of the host to perform checks against"""
+
+ id: Optional[str] = None
+ """UUID."""
+
+ name: Optional[str] = None
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py
new file mode 100644
index 00000000000..0d6b2811c24
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["EndpointHealthcheckListResponse"]
+
+
+class EndpointHealthcheckListResponse(BaseModel):
+ check_type: Literal["icmp"]
+ """type of check to perform"""
+
+ endpoint: str
+ """the IP address of the host to perform checks against"""
+
+ id: Optional[str] = None
+ """UUID."""
+
+ name: Optional[str] = None
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_params.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_params.py
new file mode 100644
index 00000000000..85e0b0b7077
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["EndpointHealthcheckUpdateParams"]
+
+
+class EndpointHealthcheckUpdateParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Identifier"""
+
+ check_type: Required[Literal["icmp"]]
+ """type of check to perform"""
+
+ endpoint: Required[str]
+ """the IP address of the host to perform checks against"""
+
+ name: str
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_response.py
new file mode 100644
index 00000000000..57a1b932e20
--- /dev/null
+++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_update_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["EndpointHealthcheckUpdateResponse"]
+
+
+class EndpointHealthcheckUpdateResponse(BaseModel):
+ check_type: Literal["icmp"]
+ """type of check to perform"""
+
+ endpoint: str
+ """the IP address of the host to perform checks against"""
+
+ id: Optional[str] = None
+ """UUID."""
+
+ name: Optional[str] = None
+ """Optional name associated with this check"""
diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py
index 2dd809edd25..648463bed2e 100644
--- a/src/cloudflare/types/dns/a_record.py
+++ b/src/cloudflare/types/dns/a_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class ARecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["A"]
"""Record type."""
@@ -55,10 +62,3 @@ class ARecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/a_record_param.py b/src/cloudflare/types/dns/a_record_param.py
index 60ceae7a5eb..b573575d8c7 100644
--- a/src/cloudflare/types/dns/a_record_param.py
+++ b/src/cloudflare/types/dns/a_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class ARecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["A"]]
"""Record type."""
@@ -56,10 +63,3 @@ class ARecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py
index ee1099da332..3b21661b7df 100644
--- a/src/cloudflare/types/dns/aaaa_record.py
+++ b/src/cloudflare/types/dns/aaaa_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class AAAARecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["AAAA"]
"""Record type."""
@@ -55,10 +62,3 @@ class AAAARecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/aaaa_record_param.py b/src/cloudflare/types/dns/aaaa_record_param.py
index f9cea4e61a9..74734faac24 100644
--- a/src/cloudflare/types/dns/aaaa_record_param.py
+++ b/src/cloudflare/types/dns/aaaa_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class AAAARecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["AAAA"]]
"""Record type."""
@@ -56,10 +63,3 @@ class AAAARecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/batch_patch_param.py b/src/cloudflare/types/dns/batch_patch_param.py
index ce96ef8edce..0fb447a867c 100644
--- a/src/cloudflare/types/dns/batch_patch_param.py
+++ b/src/cloudflare/types/dns/batch_patch_param.py
@@ -103,7 +103,14 @@ class OpenpgpkeyRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class PTRRecord(PTRRecordParam, total=False):
id: Required[str]
diff --git a/src/cloudflare/types/dns/batch_put_param.py b/src/cloudflare/types/dns/batch_put_param.py
index b747c350cfe..3f946486188 100644
--- a/src/cloudflare/types/dns/batch_put_param.py
+++ b/src/cloudflare/types/dns/batch_put_param.py
@@ -103,7 +103,14 @@ class OpenpgpkeyRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class PTRRecord(PTRRecordParam, total=False):
id: Required[str]
diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py
index 1ef5bd859c2..d45413ee844 100644
--- a/src/cloudflare/types/dns/caa_record.py
+++ b/src/cloudflare/types/dns/caa_record.py
@@ -41,7 +41,14 @@ class Settings(BaseModel):
class CAARecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["CAA"]
"""Record type."""
@@ -69,10 +76,3 @@ class CAARecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/caa_record_param.py b/src/cloudflare/types/dns/caa_record_param.py
index b93e29827b2..5bef8b9175f 100644
--- a/src/cloudflare/types/dns/caa_record_param.py
+++ b/src/cloudflare/types/dns/caa_record_param.py
@@ -42,7 +42,14 @@ class Settings(TypedDict, total=False):
class CAARecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CAA"]]
"""Record type."""
@@ -67,10 +74,3 @@ class CAARecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py
index 65b16674b18..956293b6be1 100644
--- a/src/cloudflare/types/dns/cert_record.py
+++ b/src/cloudflare/types/dns/cert_record.py
@@ -44,7 +44,14 @@ class Settings(BaseModel):
class CERTRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["CERT"]
"""Record type."""
@@ -72,10 +79,3 @@ class CERTRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/cert_record_param.py b/src/cloudflare/types/dns/cert_record_param.py
index 45693c6dca0..7e812ae2b85 100644
--- a/src/cloudflare/types/dns/cert_record_param.py
+++ b/src/cloudflare/types/dns/cert_record_param.py
@@ -45,7 +45,14 @@ class Settings(TypedDict, total=False):
class CERTRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CERT"]]
"""Record type."""
@@ -70,10 +77,3 @@ class CERTRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py
index 127dda55f61..0aaa0cc58fa 100644
--- a/src/cloudflare/types/dns/cname_record.py
+++ b/src/cloudflare/types/dns/cname_record.py
@@ -38,7 +38,14 @@ class Settings(BaseModel):
class CNAMERecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["CNAME"]
"""Record type."""
@@ -63,10 +70,3 @@ class CNAMERecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/cname_record_param.py b/src/cloudflare/types/dns/cname_record_param.py
index 8802ee8312d..48a37f20899 100644
--- a/src/cloudflare/types/dns/cname_record_param.py
+++ b/src/cloudflare/types/dns/cname_record_param.py
@@ -39,7 +39,14 @@ class Settings(TypedDict, total=False):
class CNAMERecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CNAME"]]
"""Record type."""
@@ -64,10 +71,3 @@ class CNAMERecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py
index bcb7831cc97..ca31e8b77e1 100644
--- a/src/cloudflare/types/dns/dnskey_record.py
+++ b/src/cloudflare/types/dns/dnskey_record.py
@@ -44,7 +44,14 @@ class Settings(BaseModel):
class DNSKEYRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["DNSKEY"]
"""Record type."""
@@ -72,10 +79,3 @@ class DNSKEYRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/dnskey_record_param.py b/src/cloudflare/types/dns/dnskey_record_param.py
index 9476e6ac47b..7c98cdebff5 100644
--- a/src/cloudflare/types/dns/dnskey_record_param.py
+++ b/src/cloudflare/types/dns/dnskey_record_param.py
@@ -45,7 +45,14 @@ class Settings(TypedDict, total=False):
class DNSKEYRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DNSKEY"]]
"""Record type."""
@@ -70,10 +77,3 @@ class DNSKEYRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py
index 3af34140392..c8f467973ac 100644
--- a/src/cloudflare/types/dns/ds_record.py
+++ b/src/cloudflare/types/dns/ds_record.py
@@ -44,7 +44,14 @@ class Settings(BaseModel):
class DSRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["DS"]
"""Record type."""
@@ -72,10 +79,3 @@ class DSRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ds_record_param.py b/src/cloudflare/types/dns/ds_record_param.py
index d696be3fa31..f44fbe4d209 100644
--- a/src/cloudflare/types/dns/ds_record_param.py
+++ b/src/cloudflare/types/dns/ds_record_param.py
@@ -45,7 +45,14 @@ class Settings(TypedDict, total=False):
class DSRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DS"]]
"""Record type."""
@@ -70,10 +77,3 @@ class DSRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py
index 80b38c42901..e71ad06df51 100644
--- a/src/cloudflare/types/dns/https_record.py
+++ b/src/cloudflare/types/dns/https_record.py
@@ -41,7 +41,14 @@ class Settings(BaseModel):
class HTTPSRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["HTTPS"]
"""Record type."""
@@ -69,10 +76,3 @@ class HTTPSRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/https_record_param.py b/src/cloudflare/types/dns/https_record_param.py
index 5636ae61c23..070a27973ae 100644
--- a/src/cloudflare/types/dns/https_record_param.py
+++ b/src/cloudflare/types/dns/https_record_param.py
@@ -42,7 +42,14 @@ class Settings(TypedDict, total=False):
class HTTPSRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["HTTPS"]]
"""Record type."""
@@ -67,10 +74,3 @@ class HTTPSRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py
index e485095d218..995566a2d79 100644
--- a/src/cloudflare/types/dns/loc_record.py
+++ b/src/cloudflare/types/dns/loc_record.py
@@ -68,7 +68,14 @@ class Settings(BaseModel):
class LOCRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["LOC"]
"""Record type."""
@@ -96,10 +103,3 @@ class LOCRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/loc_record_param.py b/src/cloudflare/types/dns/loc_record_param.py
index 00cb4b5225f..8d885e15e2e 100644
--- a/src/cloudflare/types/dns/loc_record_param.py
+++ b/src/cloudflare/types/dns/loc_record_param.py
@@ -69,7 +69,14 @@ class Settings(TypedDict, total=False):
class LOCRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["LOC"]]
"""Record type."""
@@ -94,10 +101,3 @@ class LOCRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py
index a27e72470f9..6251f393869 100644
--- a/src/cloudflare/types/dns/mx_record.py
+++ b/src/cloudflare/types/dns/mx_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class MXRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["MX"]
"""Record type."""
@@ -61,10 +68,3 @@ class MXRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/mx_record_param.py b/src/cloudflare/types/dns/mx_record_param.py
index e3e17499870..2ab786404d0 100644
--- a/src/cloudflare/types/dns/mx_record_param.py
+++ b/src/cloudflare/types/dns/mx_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class MXRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["MX"]]
"""Record type."""
@@ -62,10 +69,3 @@ class MXRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py
index 1fe64354fac..b0a8c82192f 100644
--- a/src/cloudflare/types/dns/naptr_record.py
+++ b/src/cloudflare/types/dns/naptr_record.py
@@ -50,7 +50,14 @@ class Settings(BaseModel):
class NAPTRRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["NAPTR"]
"""Record type."""
@@ -78,10 +85,3 @@ class NAPTRRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/naptr_record_param.py b/src/cloudflare/types/dns/naptr_record_param.py
index 906b491c288..0e1c982430a 100644
--- a/src/cloudflare/types/dns/naptr_record_param.py
+++ b/src/cloudflare/types/dns/naptr_record_param.py
@@ -51,7 +51,14 @@ class Settings(TypedDict, total=False):
class NAPTRRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NAPTR"]]
"""Record type."""
@@ -76,10 +83,3 @@ class NAPTRRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py
index db4c0bce8f3..cb141f1e0d1 100644
--- a/src/cloudflare/types/dns/ns_record.py
+++ b/src/cloudflare/types/dns/ns_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class NSRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["NS"]
"""Record type."""
@@ -55,10 +62,3 @@ class NSRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ns_record_param.py b/src/cloudflare/types/dns/ns_record_param.py
index 8233112b1c8..60175ef9708 100644
--- a/src/cloudflare/types/dns/ns_record_param.py
+++ b/src/cloudflare/types/dns/ns_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class NSRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NS"]]
"""Record type."""
@@ -56,10 +63,3 @@ class NSRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py
index ceafad5c9ad..52afea56a93 100644
--- a/src/cloudflare/types/dns/ptr_record.py
+++ b/src/cloudflare/types/dns/ptr_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class PTRRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["PTR"]
"""Record type."""
@@ -55,10 +62,3 @@ class PTRRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/ptr_record_param.py b/src/cloudflare/types/dns/ptr_record_param.py
index d5fbca6b7b7..24c09628fdb 100644
--- a/src/cloudflare/types/dns/ptr_record_param.py
+++ b/src/cloudflare/types/dns/ptr_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class PTRRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["PTR"]]
"""Record type."""
@@ -56,10 +63,3 @@ class PTRRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/record_batch_params.py b/src/cloudflare/types/dns/record_batch_params.py
index 1bfa0dac5c2..f5aaecb1c56 100644
--- a/src/cloudflare/types/dns/record_batch_params.py
+++ b/src/cloudflare/types/dns/record_batch_params.py
@@ -77,7 +77,14 @@ class PostDNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False):
class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -103,13 +110,6 @@ class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
Post: TypeAlias = Union[
ARecordParam,
diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py
index 64648001011..a807296816e 100644
--- a/src/cloudflare/types/dns/record_create_params.py
+++ b/src/cloudflare/types/dns/record_create_params.py
@@ -73,7 +73,14 @@ class ARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["A"]]
"""Record type."""
@@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class ARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -130,7 +130,14 @@ class AAAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["AAAA"]]
"""Record type."""
@@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class AAAARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -187,7 +187,14 @@ class CNAMERecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CNAME"]]
"""Record type."""
@@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CNAMERecordSettings(TypedDict, total=False):
flatten_cname: bool
@@ -252,7 +252,14 @@ class MXRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["MX"]]
"""Record type."""
@@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class MXRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -315,7 +315,14 @@ class NSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NS"]]
"""Record type."""
@@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NSRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -372,7 +372,14 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -429,7 +429,14 @@ class PTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["PTR"]]
"""Record type."""
@@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class PTRRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -486,7 +486,14 @@ class TXTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TXT"]]
"""Record type."""
@@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TXTRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -551,7 +551,14 @@ class CAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CAA"]]
"""Record type."""
@@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CAARecordData(TypedDict, total=False):
flags: float
@@ -619,7 +619,14 @@ class CERTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CERT"]]
"""Record type."""
@@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CERTRecordData(TypedDict, total=False):
algorithm: float
@@ -690,7 +690,14 @@ class DNSKEYRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DNSKEY"]]
"""Record type."""
@@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSKEYRecordData(TypedDict, total=False):
algorithm: float
@@ -761,7 +761,14 @@ class DSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DS"]]
"""Record type."""
@@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DSRecordData(TypedDict, total=False):
algorithm: float
@@ -832,7 +832,14 @@ class HTTPSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["HTTPS"]]
"""Record type."""
@@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class HTTPSRecordData(TypedDict, total=False):
priority: float
@@ -900,7 +900,14 @@ class LOCRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["LOC"]]
"""Record type."""
@@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class LOCRecordData(TypedDict, total=False):
altitude: float
@@ -995,7 +995,14 @@ class NAPTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NAPTR"]]
"""Record type."""
@@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NAPTRRecordData(TypedDict, total=False):
flags: str
@@ -1072,7 +1072,14 @@ class SMIMEARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SMIMEA"]]
"""Record type."""
@@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SMIMEARecordData(TypedDict, total=False):
certificate: str
@@ -1143,7 +1143,14 @@ class SRVRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SRV"]]
"""Record type."""
@@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SRVRecordData(TypedDict, total=False):
port: float
@@ -1217,7 +1217,14 @@ class SSHFPRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SSHFP"]]
"""Record type."""
@@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SSHFPRecordData(TypedDict, total=False):
algorithm: float
@@ -1285,7 +1285,14 @@ class SVCBRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SVCB"]]
"""Record type."""
@@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SVCBRecordData(TypedDict, total=False):
priority: float
@@ -1353,7 +1353,14 @@ class TLSARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TLSA"]]
"""Record type."""
@@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TLSARecordData(TypedDict, total=False):
certificate: str
@@ -1424,7 +1424,14 @@ class URIRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["URI"]]
"""Record type."""
@@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class URIRecordData(TypedDict, total=False):
target: str
diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py
index 4fe64d7b17c..cc8414148d1 100644
--- a/src/cloudflare/types/dns/record_edit_params.py
+++ b/src/cloudflare/types/dns/record_edit_params.py
@@ -73,7 +73,14 @@ class ARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["A"]]
"""Record type."""
@@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class ARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -130,7 +130,14 @@ class AAAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["AAAA"]]
"""Record type."""
@@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class AAAARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -187,7 +187,14 @@ class CNAMERecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CNAME"]]
"""Record type."""
@@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CNAMERecordSettings(TypedDict, total=False):
flatten_cname: bool
@@ -252,7 +252,14 @@ class MXRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["MX"]]
"""Record type."""
@@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class MXRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -315,7 +315,14 @@ class NSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NS"]]
"""Record type."""
@@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NSRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -372,7 +372,14 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -429,7 +429,14 @@ class PTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["PTR"]]
"""Record type."""
@@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class PTRRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -486,7 +486,14 @@ class TXTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TXT"]]
"""Record type."""
@@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TXTRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -551,7 +551,14 @@ class CAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CAA"]]
"""Record type."""
@@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CAARecordData(TypedDict, total=False):
flags: float
@@ -619,7 +619,14 @@ class CERTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CERT"]]
"""Record type."""
@@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CERTRecordData(TypedDict, total=False):
algorithm: float
@@ -690,7 +690,14 @@ class DNSKEYRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DNSKEY"]]
"""Record type."""
@@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSKEYRecordData(TypedDict, total=False):
algorithm: float
@@ -761,7 +761,14 @@ class DSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DS"]]
"""Record type."""
@@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DSRecordData(TypedDict, total=False):
algorithm: float
@@ -832,7 +832,14 @@ class HTTPSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["HTTPS"]]
"""Record type."""
@@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class HTTPSRecordData(TypedDict, total=False):
priority: float
@@ -900,7 +900,14 @@ class LOCRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["LOC"]]
"""Record type."""
@@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class LOCRecordData(TypedDict, total=False):
altitude: float
@@ -995,7 +995,14 @@ class NAPTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NAPTR"]]
"""Record type."""
@@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NAPTRRecordData(TypedDict, total=False):
flags: str
@@ -1072,7 +1072,14 @@ class SMIMEARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SMIMEA"]]
"""Record type."""
@@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SMIMEARecordData(TypedDict, total=False):
certificate: str
@@ -1143,7 +1143,14 @@ class SRVRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SRV"]]
"""Record type."""
@@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SRVRecordData(TypedDict, total=False):
port: float
@@ -1217,7 +1217,14 @@ class SSHFPRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SSHFP"]]
"""Record type."""
@@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SSHFPRecordData(TypedDict, total=False):
algorithm: float
@@ -1285,7 +1285,14 @@ class SVCBRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SVCB"]]
"""Record type."""
@@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SVCBRecordData(TypedDict, total=False):
priority: float
@@ -1353,7 +1353,14 @@ class TLSARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TLSA"]]
"""Record type."""
@@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TLSARecordData(TypedDict, total=False):
certificate: str
@@ -1424,7 +1424,14 @@ class URIRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["URI"]]
"""Record type."""
@@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class URIRecordData(TypedDict, total=False):
target: str
diff --git a/src/cloudflare/types/dns/record_response.py b/src/cloudflare/types/dns/record_response.py
index b9a3de7c9c3..3e162a929fb 100644
--- a/src/cloudflare/types/dns/record_response.py
+++ b/src/cloudflare/types/dns/record_response.py
@@ -213,7 +213,7 @@ class OpenpgpkeyRecord(BaseModel):
"""When the record was last modified."""
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
proxiable: bool
"""Whether the record can be proxied by Cloudflare or not."""
diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py
index 3420e186d33..bff2f13b8c0 100644
--- a/src/cloudflare/types/dns/record_update_params.py
+++ b/src/cloudflare/types/dns/record_update_params.py
@@ -73,7 +73,14 @@ class ARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["A"]]
"""Record type."""
@@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class ARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -130,7 +130,14 @@ class AAAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["AAAA"]]
"""Record type."""
@@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class AAAARecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -187,7 +187,14 @@ class CNAMERecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CNAME"]]
"""Record type."""
@@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CNAMERecordSettings(TypedDict, total=False):
flatten_cname: bool
@@ -252,7 +252,14 @@ class MXRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["MX"]]
"""Record type."""
@@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class MXRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -315,7 +315,14 @@ class NSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NS"]]
"""Record type."""
@@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NSRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -372,7 +372,14 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["OPENPGPKEY"]]
"""Record type."""
@@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -429,7 +429,14 @@ class PTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["PTR"]]
"""Record type."""
@@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class PTRRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -486,7 +486,14 @@ class TXTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TXT"]]
"""Record type."""
@@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TXTRecordSettings(TypedDict, total=False):
ipv4_only: bool
@@ -551,7 +551,14 @@ class CAARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CAA"]]
"""Record type."""
@@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CAARecordData(TypedDict, total=False):
flags: float
@@ -619,7 +619,14 @@ class CERTRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["CERT"]]
"""Record type."""
@@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class CERTRecordData(TypedDict, total=False):
algorithm: float
@@ -690,7 +690,14 @@ class DNSKEYRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DNSKEY"]]
"""Record type."""
@@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DNSKEYRecordData(TypedDict, total=False):
algorithm: float
@@ -761,7 +761,14 @@ class DSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["DS"]]
"""Record type."""
@@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class DSRecordData(TypedDict, total=False):
algorithm: float
@@ -832,7 +832,14 @@ class HTTPSRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["HTTPS"]]
"""Record type."""
@@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class HTTPSRecordData(TypedDict, total=False):
priority: float
@@ -900,7 +900,14 @@ class LOCRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["LOC"]]
"""Record type."""
@@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class LOCRecordData(TypedDict, total=False):
altitude: float
@@ -995,7 +995,14 @@ class NAPTRRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["NAPTR"]]
"""Record type."""
@@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class NAPTRRecordData(TypedDict, total=False):
flags: str
@@ -1072,7 +1072,14 @@ class SMIMEARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SMIMEA"]]
"""Record type."""
@@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SMIMEARecordData(TypedDict, total=False):
certificate: str
@@ -1143,7 +1143,14 @@ class SRVRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SRV"]]
"""Record type."""
@@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SRVRecordData(TypedDict, total=False):
port: float
@@ -1217,7 +1217,14 @@ class SSHFPRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SSHFP"]]
"""Record type."""
@@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SSHFPRecordData(TypedDict, total=False):
algorithm: float
@@ -1285,7 +1285,14 @@ class SVCBRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SVCB"]]
"""Record type."""
@@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class SVCBRecordData(TypedDict, total=False):
priority: float
@@ -1353,7 +1353,14 @@ class TLSARecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TLSA"]]
"""Record type."""
@@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class TLSARecordData(TypedDict, total=False):
certificate: str
@@ -1424,7 +1424,14 @@ class URIRecord(TypedDict, total=False):
"""Identifier."""
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["URI"]]
"""Record type."""
@@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
-
class URIRecordData(TypedDict, total=False):
target: str
diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py
index 36809d36e62..1b6ed65dd62 100644
--- a/src/cloudflare/types/dns/smimea_record.py
+++ b/src/cloudflare/types/dns/smimea_record.py
@@ -44,7 +44,14 @@ class Settings(BaseModel):
class SMIMEARecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["SMIMEA"]
"""Record type."""
@@ -72,10 +79,3 @@ class SMIMEARecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/smimea_record_param.py b/src/cloudflare/types/dns/smimea_record_param.py
index 88563331e7c..072f3bf36c0 100644
--- a/src/cloudflare/types/dns/smimea_record_param.py
+++ b/src/cloudflare/types/dns/smimea_record_param.py
@@ -45,7 +45,14 @@ class Settings(TypedDict, total=False):
class SMIMEARecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SMIMEA"]]
"""Record type."""
@@ -70,10 +77,3 @@ class SMIMEARecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py
index c6af1db2cdb..cecbe2dfbf9 100644
--- a/src/cloudflare/types/dns/srv_record.py
+++ b/src/cloudflare/types/dns/srv_record.py
@@ -47,7 +47,14 @@ class Settings(BaseModel):
class SRVRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["SRV"]
"""Record type."""
@@ -78,10 +85,3 @@ class SRVRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/srv_record_param.py b/src/cloudflare/types/dns/srv_record_param.py
index 26661a4d488..208ca041ea3 100644
--- a/src/cloudflare/types/dns/srv_record_param.py
+++ b/src/cloudflare/types/dns/srv_record_param.py
@@ -48,7 +48,14 @@ class Settings(TypedDict, total=False):
class SRVRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SRV"]]
"""Record type."""
@@ -73,10 +80,3 @@ class SRVRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py
index 34eebe100af..8e2f059d8f7 100644
--- a/src/cloudflare/types/dns/sshfp_record.py
+++ b/src/cloudflare/types/dns/sshfp_record.py
@@ -41,7 +41,14 @@ class Settings(BaseModel):
class SSHFPRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["SSHFP"]
"""Record type."""
@@ -69,10 +76,3 @@ class SSHFPRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/sshfp_record_param.py b/src/cloudflare/types/dns/sshfp_record_param.py
index 55300dd798c..458b6b1c8a7 100644
--- a/src/cloudflare/types/dns/sshfp_record_param.py
+++ b/src/cloudflare/types/dns/sshfp_record_param.py
@@ -42,7 +42,14 @@ class Settings(TypedDict, total=False):
class SSHFPRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SSHFP"]]
"""Record type."""
@@ -67,10 +74,3 @@ class SSHFPRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py
index 2047b8b3a6e..c07f87e2465 100644
--- a/src/cloudflare/types/dns/svcb_record.py
+++ b/src/cloudflare/types/dns/svcb_record.py
@@ -41,7 +41,14 @@ class Settings(BaseModel):
class SVCBRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["SVCB"]
"""Record type."""
@@ -69,10 +76,3 @@ class SVCBRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/svcb_record_param.py b/src/cloudflare/types/dns/svcb_record_param.py
index df50717f966..aabef93487c 100644
--- a/src/cloudflare/types/dns/svcb_record_param.py
+++ b/src/cloudflare/types/dns/svcb_record_param.py
@@ -42,7 +42,14 @@ class Settings(TypedDict, total=False):
class SVCBRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["SVCB"]]
"""Record type."""
@@ -67,10 +74,3 @@ class SVCBRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py
index d6e349d2002..e7518c4ce09 100644
--- a/src/cloudflare/types/dns/tlsa_record.py
+++ b/src/cloudflare/types/dns/tlsa_record.py
@@ -44,7 +44,14 @@ class Settings(BaseModel):
class TLSARecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["TLSA"]
"""Record type."""
@@ -72,10 +79,3 @@ class TLSARecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/tlsa_record_param.py b/src/cloudflare/types/dns/tlsa_record_param.py
index 2a0d3c80d73..30885ef1374 100644
--- a/src/cloudflare/types/dns/tlsa_record_param.py
+++ b/src/cloudflare/types/dns/tlsa_record_param.py
@@ -45,7 +45,14 @@ class Settings(TypedDict, total=False):
class TLSARecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TLSA"]]
"""Record type."""
@@ -70,10 +77,3 @@ class TLSARecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py
index e55205570da..86f1ecc1085 100644
--- a/src/cloudflare/types/dns/txt_record.py
+++ b/src/cloudflare/types/dns/txt_record.py
@@ -30,7 +30,14 @@ class Settings(BaseModel):
class TXTRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["TXT"]
"""Record type."""
@@ -63,10 +70,3 @@ class TXTRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/txt_record_param.py b/src/cloudflare/types/dns/txt_record_param.py
index 877cba3a547..b7f6ceb4ec1 100644
--- a/src/cloudflare/types/dns/txt_record_param.py
+++ b/src/cloudflare/types/dns/txt_record_param.py
@@ -31,7 +31,14 @@ class Settings(TypedDict, total=False):
class TXTRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["TXT"]]
"""Record type."""
@@ -64,10 +71,3 @@ class TXTRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py
index deb5ec91ebb..669c1bcb068 100644
--- a/src/cloudflare/types/dns/uri_record.py
+++ b/src/cloudflare/types/dns/uri_record.py
@@ -38,7 +38,14 @@ class Settings(BaseModel):
class URIRecord(BaseModel):
name: str
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: TTL
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Literal["URI"]
"""Record type."""
@@ -72,10 +79,3 @@ class URIRecord(BaseModel):
tags: Optional[List[RecordTags]] = None
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: Optional[TTL] = None
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/dns/uri_record_param.py b/src/cloudflare/types/dns/uri_record_param.py
index eff1a6684b8..45df00a0504 100644
--- a/src/cloudflare/types/dns/uri_record_param.py
+++ b/src/cloudflare/types/dns/uri_record_param.py
@@ -39,7 +39,14 @@ class Settings(TypedDict, total=False):
class URIRecordParam(TypedDict, total=False):
name: Required[str]
- """DNS record name (or @ for the zone apex) in Punycode."""
+ """Complete DNS record name, including the zone name, in Punycode."""
+
+ ttl: Required[TTLParam]
+ """Time To Live (TTL) of the DNS record in seconds.
+
+ Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
+ minimum reduced to 30 for Enterprise zones.
+ """
type: Required[Literal["URI"]]
"""Record type."""
@@ -70,10 +77,3 @@ class URIRecordParam(TypedDict, total=False):
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
-
- ttl: TTLParam
- """Time To Live (TTL) of the DNS record in seconds.
-
- Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
- minimum reduced to 30 for Enterprise zones.
- """
diff --git a/src/cloudflare/types/durable_objects/__init__.py b/src/cloudflare/types/durable_objects/__init__.py
index c2e170ca3ca..16d53c80fdc 100644
--- a/src/cloudflare/types/durable_objects/__init__.py
+++ b/src/cloudflare/types/durable_objects/__init__.py
@@ -3,3 +3,4 @@
from __future__ import annotations
from .namespace import Namespace as Namespace
+from .namespace_list_params import NamespaceListParams as NamespaceListParams
diff --git a/src/cloudflare/types/brand_protection/brand_protection_submit_params.py b/src/cloudflare/types/durable_objects/namespace_list_params.py
similarity index 57%
rename from src/cloudflare/types/brand_protection/brand_protection_submit_params.py
rename to src/cloudflare/types/durable_objects/namespace_list_params.py
index 589a5fc1074..fbcee077363 100644
--- a/src/cloudflare/types/brand_protection/brand_protection_submit_params.py
+++ b/src/cloudflare/types/durable_objects/namespace_list_params.py
@@ -4,12 +4,15 @@
from typing_extensions import Required, TypedDict
-__all__ = ["BrandProtectionSubmitParams"]
+__all__ = ["NamespaceListParams"]
-class BrandProtectionSubmitParams(TypedDict, total=False):
+class NamespaceListParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier."""
- url: str
- """URL(s) to filter submissions results by."""
+ page: int
+ """Current page."""
+
+ per_page: int
+ """Items per-page."""
diff --git a/src/cloudflare/types/email_security/investigate/move_bulk_response.py b/src/cloudflare/types/email_security/investigate/move_bulk_response.py
index ea093f060f1..b3151973d9c 100644
--- a/src/cloudflare/types/email_security/investigate/move_bulk_response.py
+++ b/src/cloudflare/types/email_security/investigate/move_bulk_response.py
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from typing import Optional
from datetime import datetime
from ...._models import BaseModel
@@ -10,14 +11,14 @@
class MoveBulkResponse(BaseModel):
completed_timestamp: datetime
- destination: str
-
item_count: int
- message_id: str
+ destination: Optional[str] = None
+
+ message_id: Optional[str] = None
- operation: str
+ operation: Optional[str] = None
- recipient: str
+ recipient: Optional[str] = None
- status: str
+ status: Optional[str] = None
diff --git a/src/cloudflare/types/email_security/investigate/move_create_response.py b/src/cloudflare/types/email_security/investigate/move_create_response.py
index c8509acc388..be90f629d31 100644
--- a/src/cloudflare/types/email_security/investigate/move_create_response.py
+++ b/src/cloudflare/types/email_security/investigate/move_create_response.py
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from typing import Optional
from datetime import datetime
from ...._models import BaseModel
@@ -10,14 +11,14 @@
class MoveCreateResponse(BaseModel):
completed_timestamp: datetime
- destination: str
-
item_count: int
- message_id: str
+ destination: Optional[str] = None
+
+ message_id: Optional[str] = None
- operation: str
+ operation: Optional[str] = None
- recipient: str
+ recipient: Optional[str] = None
- status: str
+ status: Optional[str] = None
diff --git a/src/cloudflare/types/email_security/investigate/trace_get_response.py b/src/cloudflare/types/email_security/investigate/trace_get_response.py
index 58ab898d0ed..98bce7e2bd2 100644
--- a/src/cloudflare/types/email_security/investigate/trace_get_response.py
+++ b/src/cloudflare/types/email_security/investigate/trace_get_response.py
@@ -19,6 +19,8 @@ class InboundLine(BaseModel):
class Inbound(BaseModel):
lines: Optional[List[InboundLine]] = None
+ pending: Optional[bool] = None
+
class OutboundLine(BaseModel):
lineno: int
@@ -31,6 +33,8 @@ class OutboundLine(BaseModel):
class Outbound(BaseModel):
lines: Optional[List[OutboundLine]] = None
+ pending: Optional[bool] = None
+
class TraceGetResponse(BaseModel):
inbound: Inbound
diff --git a/src/cloudflare/types/email_security/investigate_get_response.py b/src/cloudflare/types/email_security/investigate_get_response.py
index 2e5495bcc9c..22548ab760a 100644
--- a/src/cloudflare/types/email_security/investigate_get_response.py
+++ b/src/cloudflare/types/email_security/investigate_get_response.py
@@ -7,11 +7,47 @@
from ..._models import BaseModel
-__all__ = ["InvestigateGetResponse", "Properties", "Validation"]
+__all__ = ["InvestigateGetResponse", "Properties", "Finding", "Validation"]
class Properties(BaseModel):
- whitelisted_pattern_type: Optional[str] = None
+ allowlisted_pattern: Optional[str] = None
+
+ allowlisted_pattern_type: Optional[
+ Literal[
+ "quarantine_release",
+ "acceptable_sender",
+ "allowed_sender",
+ "allowed_recipient",
+ "domain_similarity",
+ "domain_recency",
+ "managed_acceptable_sender",
+ ]
+ ] = None
+
+ blocklisted_message: Optional[bool] = None
+
+ blocklisted_pattern: Optional[str] = None
+
+ whitelisted_pattern_type: Optional[
+ Literal[
+ "quarantine_release",
+ "acceptable_sender",
+ "allowed_sender",
+ "allowed_recipient",
+ "domain_similarity",
+ "domain_recency",
+ "managed_acceptable_sender",
+ ]
+ ] = None
+
+
+class Finding(BaseModel):
+ detail: Optional[str] = None
+
+ name: Optional[str] = None
+
+ value: Optional[str] = None
class Validation(BaseModel):
@@ -79,6 +115,8 @@ class InvestigateGetResponse(BaseModel):
]
] = None
+ findings: Optional[List[Finding]] = None
+
from_: Optional[str] = FieldInfo(alias="from", default=None)
from_name: Optional[str] = None
diff --git a/src/cloudflare/types/email_security/investigate_list_params.py b/src/cloudflare/types/email_security/investigate_list_params.py
index b8a3a98db14..080657abe9a 100644
--- a/src/cloudflare/types/email_security/investigate_list_params.py
+++ b/src/cloudflare/types/email_security/investigate_list_params.py
@@ -78,3 +78,5 @@ class InvestigateListParams(TypedDict, total=False):
start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""The beginning of the search date range. Defaults to `now - 30 days`."""
+
+ subject: str
diff --git a/src/cloudflare/types/email_security/investigate_list_response.py b/src/cloudflare/types/email_security/investigate_list_response.py
index 580f118a42f..2eeef150c11 100644
--- a/src/cloudflare/types/email_security/investigate_list_response.py
+++ b/src/cloudflare/types/email_security/investigate_list_response.py
@@ -7,11 +7,47 @@
from ..._models import BaseModel
-__all__ = ["InvestigateListResponse", "Properties", "Validation"]
+__all__ = ["InvestigateListResponse", "Properties", "Finding", "Validation"]
class Properties(BaseModel):
- whitelisted_pattern_type: Optional[str] = None
+ allowlisted_pattern: Optional[str] = None
+
+ allowlisted_pattern_type: Optional[
+ Literal[
+ "quarantine_release",
+ "acceptable_sender",
+ "allowed_sender",
+ "allowed_recipient",
+ "domain_similarity",
+ "domain_recency",
+ "managed_acceptable_sender",
+ ]
+ ] = None
+
+ blocklisted_message: Optional[bool] = None
+
+ blocklisted_pattern: Optional[str] = None
+
+ whitelisted_pattern_type: Optional[
+ Literal[
+ "quarantine_release",
+ "acceptable_sender",
+ "allowed_sender",
+ "allowed_recipient",
+ "domain_similarity",
+ "domain_recency",
+ "managed_acceptable_sender",
+ ]
+ ] = None
+
+
+class Finding(BaseModel):
+ detail: Optional[str] = None
+
+ name: Optional[str] = None
+
+ value: Optional[str] = None
class Validation(BaseModel):
@@ -79,6 +115,8 @@ class InvestigateListResponse(BaseModel):
]
] = None
+ findings: Optional[List[Finding]] = None
+
from_: Optional[str] = FieldInfo(alias="from", default=None)
from_name: Optional[str] = None
diff --git a/src/cloudflare/types/email_security/settings/allow_policy_list_params.py b/src/cloudflare/types/email_security/settings/allow_policy_list_params.py
index 20b3901d97e..85380271064 100644
--- a/src/cloudflare/types/email_security/settings/allow_policy_list_params.py
+++ b/src/cloudflare/types/email_security/settings/allow_policy_list_params.py
@@ -32,6 +32,8 @@ class AllowPolicyListParams(TypedDict, total=False):
page: int
"""The page number of paginated results."""
+ pattern: str
+
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"]
per_page: int
diff --git a/src/cloudflare/types/email_security/settings/block_sender_list_params.py b/src/cloudflare/types/email_security/settings/block_sender_list_params.py
index 714e6955316..712ad5932dd 100644
--- a/src/cloudflare/types/email_security/settings/block_sender_list_params.py
+++ b/src/cloudflare/types/email_security/settings/block_sender_list_params.py
@@ -20,6 +20,8 @@ class BlockSenderListParams(TypedDict, total=False):
page: int
"""The page number of paginated results."""
+ pattern: str
+
pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"]
per_page: int
diff --git a/src/cloudflare/types/email_security/settings/domain_edit_params.py b/src/cloudflare/types/email_security/settings/domain_edit_params.py
index 594a3d7d98c..c0799ec62ed 100644
--- a/src/cloudflare/types/email_security/settings/domain_edit_params.py
+++ b/src/cloudflare/types/email_security/settings/domain_edit_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Optional
+from typing import List
from typing_extensions import Literal, Required, TypedDict
__all__ = ["DomainEditParams"]
@@ -16,7 +16,7 @@ class DomainEditParams(TypedDict, total=False):
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]]
- domain: Optional[str]
+ domain: str
drop_dispositions: List[
Literal[
@@ -35,9 +35,9 @@ class DomainEditParams(TypedDict, total=False):
folder: Literal["AllItems", "Inbox"]
- integration_id: Optional[str]
+ integration_id: str
- lookback_hops: Optional[int]
+ lookback_hops: int
require_tls_inbound: bool
diff --git a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py
index 0dcdda7c0ef..90d1acfc7c0 100644
--- a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py
+++ b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from typing import Optional
from typing_extensions import Required, TypedDict
__all__ = ["TrustedDomainEditParams"]
@@ -12,20 +11,20 @@ class TrustedDomainEditParams(TypedDict, total=False):
account_id: Required[str]
"""Account Identifier"""
- comments: Optional[str]
+ comments: str
- is_recent: Optional[bool]
+ is_recent: bool
"""
Select to prevent recently registered domains from triggering a Suspicious or
Malicious disposition.
"""
- is_regex: Optional[bool]
+ is_regex: bool
- is_similarity: Optional[bool]
+ is_similarity: bool
"""
Select for partner or other approved domains that have similar spelling to your
connected domains. Prevents listed domains from triggering a Spoof disposition.
"""
- pattern: Optional[str]
+ pattern: str
diff --git a/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py b/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py
index a273ce83e95..b9446971853 100644
--- a/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py
+++ b/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py
@@ -24,6 +24,8 @@ class TrustedDomainListParams(TypedDict, total=False):
page: int
"""The page number of paginated results."""
+ pattern: str
+
per_page: int
"""The number of results per page."""
diff --git a/src/cloudflare/types/email_security/submission_list_params.py b/src/cloudflare/types/email_security/submission_list_params.py
index 69dbfd3e9bd..2114d3c0e9d 100644
--- a/src/cloudflare/types/email_security/submission_list_params.py
+++ b/src/cloudflare/types/email_security/submission_list_params.py
@@ -35,6 +35,8 @@ class SubmissionListParams(TypedDict, total=False):
start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""The beginning of the search date range. Defaults to `now - 30 days`."""
+ status: str
+
submission_id: str
type: Literal["TEAM", "USER"]
diff --git a/src/cloudflare/types/firewall/lockdown_create_params.py b/src/cloudflare/types/firewall/lockdown_create_params.py
index 7a8edc23ab5..40da506f5fb 100644
--- a/src/cloudflare/types/firewall/lockdown_create_params.py
+++ b/src/cloudflare/types/firewall/lockdown_create_params.py
@@ -30,7 +30,7 @@ class LockdownCreateParams(TypedDict, total=False):
"""
description: str
- """An informative summary of the rate limit.
+ """An informative summary of the rule.
This value is sanitized and any tags will be removed.
"""
diff --git a/src/cloudflare/types/firewall/ua_rule_create_params.py b/src/cloudflare/types/firewall/ua_rule_create_params.py
index 63ae7961c1f..01e49728041 100644
--- a/src/cloudflare/types/firewall/ua_rule_create_params.py
+++ b/src/cloudflare/types/firewall/ua_rule_create_params.py
@@ -16,6 +16,15 @@ class UARuleCreateParams(TypedDict, total=False):
mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]]
"""The action to apply to a matched request."""
+ description: str
+ """An informative summary of the rule.
+
+ This value is sanitized and any tags will be removed.
+ """
+
+ paused: bool
+ """When true, indicates that the rule is currently paused."""
+
class Configuration(TypedDict, total=False):
target: Literal["ua"]
diff --git a/src/cloudflare/types/firewall/ua_rule_create_response.py b/src/cloudflare/types/firewall/ua_rule_create_response.py
index bb2d6671967..83b176379ac 100644
--- a/src/cloudflare/types/firewall/ua_rule_create_response.py
+++ b/src/cloudflare/types/firewall/ua_rule_create_response.py
@@ -1,8 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
+from typing import Optional
+from typing_extensions import Literal
-__all__ = ["UARuleCreateResponse"]
+from ..._models import BaseModel
-UARuleCreateResponse: TypeAlias = Union[Optional[str], Optional[object]]
+__all__ = ["UARuleCreateResponse", "Configuration"]
+
+
+class Configuration(BaseModel):
+ target: Optional[str] = None
+ """The configuration target for this rule.
+
+ You must set the target to `ua` for User Agent Blocking rules.
+ """
+
+ value: Optional[str] = None
+ """The exact user agent string to match.
+
+ This value will be compared to the received `User-Agent` HTTP header value.
+ """
+
+
+class UARuleCreateResponse(BaseModel):
+ id: Optional[str] = None
+ """The unique identifier of the User Agent Blocking rule."""
+
+ configuration: Optional[Configuration] = None
+ """The configuration object for the current rule."""
+
+ description: Optional[str] = None
+ """An informative summary of the rule."""
+
+ mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
+ """The action to apply to a matched request."""
+
+ paused: Optional[bool] = None
+ """When true, indicates that the rule is currently paused."""
diff --git a/src/cloudflare/types/firewall/ua_rule_delete_response.py b/src/cloudflare/types/firewall/ua_rule_delete_response.py
index 0d7cbd7d69d..2ded475139d 100644
--- a/src/cloudflare/types/firewall/ua_rule_delete_response.py
+++ b/src/cloudflare/types/firewall/ua_rule_delete_response.py
@@ -1,12 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
+from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["UARuleDeleteResponse"]
+__all__ = ["UARuleDeleteResponse", "Configuration"]
+
+
+class Configuration(BaseModel):
+ target: Optional[str] = None
+ """The configuration target for this rule.
+
+ You must set the target to `ua` for User Agent Blocking rules.
+ """
+
+ value: Optional[str] = None
+ """The exact user agent string to match.
+
+ This value will be compared to the received `User-Agent` HTTP header value.
+ """
class UARuleDeleteResponse(BaseModel):
id: Optional[str] = None
"""The unique identifier of the User Agent Blocking rule."""
+
+ configuration: Optional[Configuration] = None
+ """The configuration object for the current rule."""
+
+ description: Optional[str] = None
+ """An informative summary of the rule."""
+
+ mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
+ """The action to apply to a matched request."""
+
+ paused: Optional[bool] = None
+ """When true, indicates that the rule is currently paused."""
diff --git a/src/cloudflare/types/firewall/ua_rule_get_response.py b/src/cloudflare/types/firewall/ua_rule_get_response.py
index 10613bd3d5b..ef98656691d 100644
--- a/src/cloudflare/types/firewall/ua_rule_get_response.py
+++ b/src/cloudflare/types/firewall/ua_rule_get_response.py
@@ -1,8 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
+from typing import Optional
+from typing_extensions import Literal
-__all__ = ["UARuleGetResponse"]
+from ..._models import BaseModel
-UARuleGetResponse: TypeAlias = Union[Optional[str], Optional[object]]
+__all__ = ["UARuleGetResponse", "Configuration"]
+
+
+class Configuration(BaseModel):
+ target: Optional[str] = None
+ """The configuration target for this rule.
+
+ You must set the target to `ua` for User Agent Blocking rules.
+ """
+
+ value: Optional[str] = None
+ """The exact user agent string to match.
+
+ This value will be compared to the received `User-Agent` HTTP header value.
+ """
+
+
+class UARuleGetResponse(BaseModel):
+ id: Optional[str] = None
+ """The unique identifier of the User Agent Blocking rule."""
+
+ configuration: Optional[Configuration] = None
+ """The configuration object for the current rule."""
+
+ description: Optional[str] = None
+ """An informative summary of the rule."""
+
+ mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
+ """The action to apply to a matched request."""
+
+ paused: Optional[bool] = None
+ """When true, indicates that the rule is currently paused."""
diff --git a/src/cloudflare/types/firewall/ua_rule_list_params.py b/src/cloudflare/types/firewall/ua_rule_list_params.py
index cc342a98c48..c40c8bd6cde 100644
--- a/src/cloudflare/types/firewall/ua_rule_list_params.py
+++ b/src/cloudflare/types/firewall/ua_rule_list_params.py
@@ -14,12 +14,12 @@ class UARuleListParams(TypedDict, total=False):
description: str
"""A string to search for in the description of existing rules."""
- description_search: str
- """A string to search for in the description of existing rules."""
-
page: float
"""Page number of paginated results."""
+ paused: bool
+ """When true, indicates that the rule is currently paused."""
+
per_page: float
"""The maximum number of results per page.
@@ -27,5 +27,5 @@ class UARuleListParams(TypedDict, total=False):
or `20`.
"""
- ua_search: str
+ user_agent: str
"""A string to search for in the user agent values of existing rules."""
diff --git a/src/cloudflare/types/firewall/ua_rule_update_params.py b/src/cloudflare/types/firewall/ua_rule_update_params.py
index 95d526a5c3a..eb27661492d 100644
--- a/src/cloudflare/types/firewall/ua_rule_update_params.py
+++ b/src/cloudflare/types/firewall/ua_rule_update_params.py
@@ -24,6 +24,15 @@ class UARuleUpdateParams(TypedDict, total=False):
mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]]
"""The action to apply to a matched request."""
+ description: str
+ """An informative summary of the rule.
+
+ This value is sanitized and any tags will be removed.
+ """
+
+ paused: bool
+ """When true, indicates that the rule is currently paused."""
+
Configuration: TypeAlias = Union[
AccessRuleIPConfigurationParam,
diff --git a/src/cloudflare/types/firewall/ua_rule_update_response.py b/src/cloudflare/types/firewall/ua_rule_update_response.py
index 4dc4d0ae168..6576f69965c 100644
--- a/src/cloudflare/types/firewall/ua_rule_update_response.py
+++ b/src/cloudflare/types/firewall/ua_rule_update_response.py
@@ -1,8 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
+from typing import Optional
+from typing_extensions import Literal
-__all__ = ["UARuleUpdateResponse"]
+from ..._models import BaseModel
-UARuleUpdateResponse: TypeAlias = Union[Optional[str], Optional[object]]
+__all__ = ["UARuleUpdateResponse", "Configuration"]
+
+
+class Configuration(BaseModel):
+ target: Optional[str] = None
+ """The configuration target for this rule.
+
+ You must set the target to `ua` for User Agent Blocking rules.
+ """
+
+ value: Optional[str] = None
+ """The exact user agent string to match.
+
+ This value will be compared to the received `User-Agent` HTTP header value.
+ """
+
+
+class UARuleUpdateResponse(BaseModel):
+ id: Optional[str] = None
+ """The unique identifier of the User Agent Blocking rule."""
+
+ configuration: Optional[Configuration] = None
+ """The configuration object for the current rule."""
+
+ description: Optional[str] = None
+ """An informative summary of the rule."""
+
+ mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None
+ """The action to apply to a matched request."""
+
+ paused: Optional[bool] = None
+ """When true, indicates that the rule is currently paused."""
diff --git a/src/cloudflare/types/firewall/waf/override.py b/src/cloudflare/types/firewall/waf/override.py
index a758b89d18b..2a1312ee4ec 100644
--- a/src/cloudflare/types/firewall/waf/override.py
+++ b/src/cloudflare/types/firewall/waf/override.py
@@ -27,7 +27,7 @@ class Override(BaseModel):
"""
paused: Optional[bool] = None
- """When true, indicates that the WAF package is currently paused."""
+ """When true, indicates that the rule is currently paused."""
priority: Optional[float] = None
"""
diff --git a/src/cloudflare/types/hyperdrive/config_create_params.py b/src/cloudflare/types/hyperdrive/config_create_params.py
index 9a753acdd76..50a65a5af56 100644
--- a/src/cloudflare/types/hyperdrive/config_create_params.py
+++ b/src/cloudflare/types/hyperdrive/config_create_params.py
@@ -29,6 +29,12 @@ class ConfigCreateParams(TypedDict, total=False):
mtls: MTLS
+ origin_connection_limit: int
+ """
+ The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+ """
+
class OriginPublicDatabase(TypedDict, total=False):
database: Required[str]
diff --git a/src/cloudflare/types/hyperdrive/config_edit_params.py b/src/cloudflare/types/hyperdrive/config_edit_params.py
index e1d9887063d..8adba3c4f7c 100644
--- a/src/cloudflare/types/hyperdrive/config_edit_params.py
+++ b/src/cloudflare/types/hyperdrive/config_edit_params.py
@@ -30,6 +30,12 @@ class ConfigEditParams(TypedDict, total=False):
origin: Origin
+ origin_connection_limit: int
+ """
+ The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+ """
+
class CachingHyperdriveHyperdriveCachingCommon(TypedDict, total=False):
disabled: bool
diff --git a/src/cloudflare/types/hyperdrive/config_update_params.py b/src/cloudflare/types/hyperdrive/config_update_params.py
index c9e8b668194..9e22c66ee81 100644
--- a/src/cloudflare/types/hyperdrive/config_update_params.py
+++ b/src/cloudflare/types/hyperdrive/config_update_params.py
@@ -29,6 +29,12 @@ class ConfigUpdateParams(TypedDict, total=False):
mtls: MTLS
+ origin_connection_limit: int
+ """
+ The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+ """
+
class OriginPublicDatabase(TypedDict, total=False):
database: Required[str]
diff --git a/src/cloudflare/types/hyperdrive/hyperdrive.py b/src/cloudflare/types/hyperdrive/hyperdrive.py
index d9ea0507b3d..033b05a5249 100644
--- a/src/cloudflare/types/hyperdrive/hyperdrive.py
+++ b/src/cloudflare/types/hyperdrive/hyperdrive.py
@@ -111,3 +111,9 @@ class Hyperdrive(BaseModel):
"""Defines the last modified time of the Hyperdrive configuration."""
mtls: Optional[MTLS] = None
+
+ origin_connection_limit: Optional[int] = None
+ """
+ The (soft) maximum number of connections the Hyperdrive is allowed to make to
+ the origin database.
+ """
diff --git a/src/cloudflare/types/images/image.py b/src/cloudflare/types/images/image.py
index 1dcd113d999..7260a8c3d04 100644
--- a/src/cloudflare/types/images/image.py
+++ b/src/cloudflare/types/images/image.py
@@ -14,6 +14,9 @@ class Image(BaseModel):
id: Optional[str] = None
"""Image unique identifier."""
+ creator: Optional[str] = None
+ """Can set the creator field with an internal user ID."""
+
filename: Optional[str] = None
"""Image file name."""
diff --git a/src/cloudflare/types/images/v1_create_params.py b/src/cloudflare/types/images/v1_create_params.py
index ede7cddf3e8..87764baa3a7 100644
--- a/src/cloudflare/types/images/v1_create_params.py
+++ b/src/cloudflare/types/images/v1_create_params.py
@@ -4,6 +4,7 @@
from typing_extensions import Required, Annotated, TypedDict
+from ..._types import FileTypes
from ..._utils import PropertyInfo
__all__ = ["V1CreateParams"]
@@ -13,7 +14,13 @@ class V1CreateParams(TypedDict, total=False):
account_id: Required[str]
"""Account identifier tag."""
- file: object
+ id: str
+ """An optional custom unique identifier for your image."""
+
+ creator: str
+ """Can set the creator field with an internal user ID."""
+
+ file: FileTypes
"""An image binary data. Only needed when type is uploading a file."""
metadata: object
diff --git a/src/cloudflare/types/images/v1_edit_params.py b/src/cloudflare/types/images/v1_edit_params.py
index 5b77a97bd40..47b3f325861 100644
--- a/src/cloudflare/types/images/v1_edit_params.py
+++ b/src/cloudflare/types/images/v1_edit_params.py
@@ -13,6 +13,9 @@ class V1EditParams(TypedDict, total=False):
account_id: Required[str]
"""Account identifier tag."""
+ creator: str
+ """Can set the creator field with an internal user ID."""
+
metadata: object
"""User modifiable key-value store.
diff --git a/src/cloudflare/types/images/v1_list_params.py b/src/cloudflare/types/images/v1_list_params.py
index b77d95f1d8b..4e726436864 100644
--- a/src/cloudflare/types/images/v1_list_params.py
+++ b/src/cloudflare/types/images/v1_list_params.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import Required, TypedDict
__all__ = ["V1ListParams"]
@@ -11,6 +12,12 @@ class V1ListParams(TypedDict, total=False):
account_id: Required[str]
"""Account identifier tag."""
+ creator: Optional[str]
+ """Internal user ID set within the creator field.
+
+ Setting to empty string "" will return images where creator field is not set
+ """
+
page: float
"""Page number of paginated results."""
diff --git a/src/cloudflare/types/images/v2/direct_upload_create_params.py b/src/cloudflare/types/images/v2/direct_upload_create_params.py
index 477b46c0e38..f4c7b7971b1 100644
--- a/src/cloudflare/types/images/v2/direct_upload_create_params.py
+++ b/src/cloudflare/types/images/v2/direct_upload_create_params.py
@@ -22,6 +22,9 @@ class DirectUploadCreateParams(TypedDict, total=False):
Cannot start nor end with a / (forward slash). Cannot be a UUID.
"""
+ creator: str
+ """Can set the creator field with an internal user ID."""
+
expiry: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""The date after which the upload will not be accepted.
diff --git a/src/cloudflare/types/images/v2_list_params.py b/src/cloudflare/types/images/v2_list_params.py
index 234d7442c86..dd5a939fe9d 100644
--- a/src/cloudflare/types/images/v2_list_params.py
+++ b/src/cloudflare/types/images/v2_list_params.py
@@ -15,6 +15,12 @@ class V2ListParams(TypedDict, total=False):
continuation_token: Optional[str]
"""Continuation token for a next page. List images V2 returns continuation_token"""
+ creator: Optional[str]
+ """Internal user ID set within the creator field.
+
+ Setting to empty string "" will return images where creator field is not set
+ """
+
per_page: float
"""Number of items per page."""
diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_params.py b/src/cloudflare/types/kv/namespace_bulk_delete_params.py
index 1de9c109a16..48b7416598a 100644
--- a/src/cloudflare/types/kv/namespace_bulk_delete_params.py
+++ b/src/cloudflare/types/kv/namespace_bulk_delete_params.py
@@ -10,6 +10,6 @@
class NamespaceBulkDeleteParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
body: Required[List[str]]
diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_response.py b/src/cloudflare/types/kv/namespace_bulk_delete_response.py
index 5cf86953b96..0c3592c90d5 100644
--- a/src/cloudflare/types/kv/namespace_bulk_delete_response.py
+++ b/src/cloudflare/types/kv/namespace_bulk_delete_response.py
@@ -9,7 +9,7 @@
class NamespaceBulkDeleteResponse(BaseModel):
successful_key_count: Optional[float] = None
- """Number of keys successfully updated"""
+ """Number of keys successfully updated."""
unsuccessful_keys: Optional[List[str]] = None
"""Name of the keys that failed to be fully updated. They should be retried."""
diff --git a/src/cloudflare/types/kv/namespace_bulk_get_params.py b/src/cloudflare/types/kv/namespace_bulk_get_params.py
index 9f49de2a982..6b9964e2592 100644
--- a/src/cloudflare/types/kv/namespace_bulk_get_params.py
+++ b/src/cloudflare/types/kv/namespace_bulk_get_params.py
@@ -12,13 +12,13 @@
class NamespaceBulkGetParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
keys: Required[List[str]]
- """Array of keys to retrieve (maximum 100)"""
+ """Array of keys to retrieve (maximum of 100)."""
type: Literal["text", "json"]
- """Whether to parse JSON values in the response"""
+ """Whether to parse JSON values in the response."""
with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")]
- """Whether to include metadata in the response"""
+ """Whether to include metadata in the response."""
diff --git a/src/cloudflare/types/kv/namespace_bulk_get_response.py b/src/cloudflare/types/kv/namespace_bulk_get_response.py
index 8a590e1caa2..e43c7fe848c 100644
--- a/src/cloudflare/types/kv/namespace_bulk_get_response.py
+++ b/src/cloudflare/types/kv/namespace_bulk_get_response.py
@@ -15,26 +15,24 @@
class WorkersKVBulkGetResult(BaseModel):
values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None
- """Requested keys are paired with their values in an object"""
+ """Requested keys are paired with their values in an object."""
class WorkersKVBulkGetResultWithMetadataValues(BaseModel):
- metadata: Optional[Dict[str, object]] = None
- """The metadata associated with the key"""
+ metadata: object
- value: Union[str, float, bool, Dict[str, object]]
- """The value associated with the key"""
+ value: object
expiration: Optional[float] = None
"""
- The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
"""
class WorkersKVBulkGetResultWithMetadata(BaseModel):
values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None
- """Requested keys are paired with their values and metadata in an object"""
+ """Requested keys are paired with their values and metadata in an object."""
NamespaceBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None]
diff --git a/src/cloudflare/types/kv/namespace_bulk_update_params.py b/src/cloudflare/types/kv/namespace_bulk_update_params.py
index e1ce68a86b6..f5b480bf42f 100644
--- a/src/cloudflare/types/kv/namespace_bulk_update_params.py
+++ b/src/cloudflare/types/kv/namespace_bulk_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Iterable
+from typing import Iterable
from typing_extensions import Required, TypedDict
__all__ = ["NamespaceBulkUpdateParams", "Body"]
@@ -10,40 +10,36 @@
class NamespaceBulkUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
body: Required[Iterable[Body]]
class Body(TypedDict, total=False):
- base64: bool
- """Whether or not the server should base64 decode the value before storing it.
+ key: Required[str]
+ """A key's name.
- Useful for writing values that wouldn't otherwise be valid JSON strings, such as
- images.
+ The name may be at most 512 bytes. All printable, non-whitespace characters are
+ valid.
"""
- expiration: float
+ value: Required[str]
+ """A UTF-8 encoded string to be stored, up to 25 MiB in length."""
+
+ base64: bool
"""
- The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ Indicates whether or not the server should base64 decode the value before
+ storing it. Useful for writing values that wouldn't otherwise be valid JSON
+ strings, such as images.
"""
- expiration_ttl: float
- """The number of seconds for which the key should be visible before it expires.
-
- At least 60.
+ expiration: float
"""
-
- key: str
- """A key's name.
-
- The name may be at most 512 bytes. All printable, non-whitespace characters are
- valid.
+ Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
"""
- metadata: Dict[str, object]
- """Arbitrary JSON that is associated with a key."""
+ expiration_ttl: float
+ """Expires the key after a number of seconds. Must be at least 60."""
- value: str
- """A UTF-8 encoded string to be stored, up to 25 MiB in length."""
+ metadata: object
diff --git a/src/cloudflare/types/kv/namespace_bulk_update_response.py b/src/cloudflare/types/kv/namespace_bulk_update_response.py
index 6076c1444f5..3b67c223d81 100644
--- a/src/cloudflare/types/kv/namespace_bulk_update_response.py
+++ b/src/cloudflare/types/kv/namespace_bulk_update_response.py
@@ -9,7 +9,7 @@
class NamespaceBulkUpdateResponse(BaseModel):
successful_key_count: Optional[float] = None
- """Number of keys successfully updated"""
+ """Number of keys successfully updated."""
unsuccessful_keys: Optional[List[str]] = None
"""Name of the keys that failed to be fully updated. They should be retried."""
diff --git a/src/cloudflare/types/kv/namespace_create_params.py b/src/cloudflare/types/kv/namespace_create_params.py
index 876990c7603..85397033b26 100644
--- a/src/cloudflare/types/kv/namespace_create_params.py
+++ b/src/cloudflare/types/kv/namespace_create_params.py
@@ -9,7 +9,7 @@
class NamespaceCreateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
title: Required[str]
"""A human-readable string name for a Namespace."""
diff --git a/src/cloudflare/types/kv/namespace_list_params.py b/src/cloudflare/types/kv/namespace_list_params.py
index 2c832c88595..8c217e6fef4 100644
--- a/src/cloudflare/types/kv/namespace_list_params.py
+++ b/src/cloudflare/types/kv/namespace_list_params.py
@@ -9,7 +9,7 @@
class NamespaceListParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
direction: Literal["asc", "desc"]
"""Direction to order namespaces."""
diff --git a/src/cloudflare/types/kv/namespace_update_params.py b/src/cloudflare/types/kv/namespace_update_params.py
index 531377b614b..71f317ca4e4 100644
--- a/src/cloudflare/types/kv/namespace_update_params.py
+++ b/src/cloudflare/types/kv/namespace_update_params.py
@@ -9,7 +9,7 @@
class NamespaceUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
title: Required[str]
"""A human-readable string name for a Namespace."""
diff --git a/src/cloudflare/types/kv/namespaces/__init__.py b/src/cloudflare/types/kv/namespaces/__init__.py
index 48f776acf2e..34b5eaa0716 100644
--- a/src/cloudflare/types/kv/namespaces/__init__.py
+++ b/src/cloudflare/types/kv/namespaces/__init__.py
@@ -7,7 +7,6 @@
from .key_bulk_get_params import KeyBulkGetParams as KeyBulkGetParams
from .value_update_params import ValueUpdateParams as ValueUpdateParams
from .key_bulk_get_response import KeyBulkGetResponse as KeyBulkGetResponse
-from .metadata_get_response import MetadataGetResponse as MetadataGetResponse
from .value_delete_response import ValueDeleteResponse as ValueDeleteResponse
from .value_update_response import ValueUpdateResponse as ValueUpdateResponse
from .key_bulk_delete_params import KeyBulkDeleteParams as KeyBulkDeleteParams
diff --git a/src/cloudflare/types/kv/namespaces/key.py b/src/cloudflare/types/kv/namespaces/key.py
index 5b48057e954..35cfefbf3f8 100644
--- a/src/cloudflare/types/kv/namespaces/key.py
+++ b/src/cloudflare/types/kv/namespaces/key.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, Optional
+from typing import Optional
from ...._models import BaseModel
@@ -21,5 +21,4 @@ class Key(BaseModel):
will expire. This property is omitted for keys that will not expire.
"""
- metadata: Optional[Dict[str, object]] = None
- """Arbitrary JSON that is associated with a key."""
+ metadata: Optional[object] = None
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py
index 37cb14a66f5..7aa53a77075 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py
@@ -10,6 +10,6 @@
class KeyBulkDeleteParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
body: Required[List[str]]
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py
index 39e93931ddd..d533940c000 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py
@@ -9,7 +9,7 @@
class KeyBulkDeleteResponse(BaseModel):
successful_key_count: Optional[float] = None
- """Number of keys successfully updated"""
+ """Number of keys successfully updated."""
unsuccessful_keys: Optional[List[str]] = None
"""Name of the keys that failed to be fully updated. They should be retried."""
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py
index aa64e6454fd..d7e0801fa6d 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py
@@ -12,13 +12,13 @@
class KeyBulkGetParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
keys: Required[List[str]]
- """Array of keys to retrieve (maximum 100)"""
+ """Array of keys to retrieve (maximum of 100)."""
type: Literal["text", "json"]
- """Whether to parse JSON values in the response"""
+ """Whether to parse JSON values in the response."""
with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")]
- """Whether to include metadata in the response"""
+ """Whether to include metadata in the response."""
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py
index f4b93663728..f4901591f7e 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py
@@ -15,26 +15,24 @@
class WorkersKVBulkGetResult(BaseModel):
values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None
- """Requested keys are paired with their values in an object"""
+ """Requested keys are paired with their values in an object."""
class WorkersKVBulkGetResultWithMetadataValues(BaseModel):
- metadata: Optional[Dict[str, object]] = None
- """The metadata associated with the key"""
+ metadata: object
- value: Union[str, float, bool, Dict[str, object]]
- """The value associated with the key"""
+ value: object
expiration: Optional[float] = None
"""
- The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
"""
class WorkersKVBulkGetResultWithMetadata(BaseModel):
values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None
- """Requested keys are paired with their values and metadata in an object"""
+ """Requested keys are paired with their values and metadata in an object."""
KeyBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None]
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py
index 4e03451367a..1786cf98ad1 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Iterable
+from typing import Iterable
from typing_extensions import Required, TypedDict
__all__ = ["KeyBulkUpdateParams", "Body"]
@@ -10,40 +10,36 @@
class KeyBulkUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
body: Required[Iterable[Body]]
class Body(TypedDict, total=False):
- base64: bool
- """Whether or not the server should base64 decode the value before storing it.
+ key: Required[str]
+ """A key's name.
- Useful for writing values that wouldn't otherwise be valid JSON strings, such as
- images.
+ The name may be at most 512 bytes. All printable, non-whitespace characters are
+ valid.
"""
- expiration: float
+ value: Required[str]
+ """A UTF-8 encoded string to be stored, up to 25 MiB in length."""
+
+ base64: bool
"""
- The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ Indicates whether or not the server should base64 decode the value before
+ storing it. Useful for writing values that wouldn't otherwise be valid JSON
+ strings, such as images.
"""
- expiration_ttl: float
- """The number of seconds for which the key should be visible before it expires.
-
- At least 60.
+ expiration: float
"""
-
- key: str
- """A key's name.
-
- The name may be at most 512 bytes. All printable, non-whitespace characters are
- valid.
+ Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
"""
- metadata: Dict[str, object]
- """Arbitrary JSON that is associated with a key."""
+ expiration_ttl: float
+ """Expires the key after a number of seconds. Must be at least 60."""
- value: str
- """A UTF-8 encoded string to be stored, up to 25 MiB in length."""
+ metadata: object
diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py
index abe3b5b5794..1a13f4265c0 100644
--- a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py
+++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py
@@ -9,7 +9,7 @@
class KeyBulkUpdateResponse(BaseModel):
successful_key_count: Optional[float] = None
- """Number of keys successfully updated"""
+ """Number of keys successfully updated."""
unsuccessful_keys: Optional[List[str]] = None
"""Name of the keys that failed to be fully updated. They should be retried."""
diff --git a/src/cloudflare/types/kv/namespaces/key_list_params.py b/src/cloudflare/types/kv/namespaces/key_list_params.py
index 230b7b1986e..804e1ee1c56 100644
--- a/src/cloudflare/types/kv/namespaces/key_list_params.py
+++ b/src/cloudflare/types/kv/namespaces/key_list_params.py
@@ -9,7 +9,7 @@
class KeyListParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
cursor: str
"""
@@ -20,14 +20,14 @@ class KeyListParams(TypedDict, total=False):
"""
limit: float
- """The number of keys to return.
+ """Limits the number of keys returned in the response.
The cursor attribute may be used to iterate over the next batch of keys if there
are more than the limit.
"""
prefix: str
- """A string prefix used to filter down which keys will be returned.
+ """Filters returned keys by a name prefix.
Exact matches and any key names that begin with the prefix will be returned.
"""
diff --git a/src/cloudflare/types/kv/namespaces/value_update_params.py b/src/cloudflare/types/kv/namespaces/value_update_params.py
index 67d59ae19aa..97e720132fd 100644
--- a/src/cloudflare/types/kv/namespaces/value_update_params.py
+++ b/src/cloudflare/types/kv/namespaces/value_update_params.py
@@ -9,25 +9,21 @@
class ValueUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier"""
+ """Identifier."""
namespace_id: Required[str]
"""Namespace identifier tag."""
- metadata: Required[str]
- """Arbitrary JSON to be associated with a key/value pair."""
-
value: Required[str]
"""A byte sequence to be stored, up to 25 MiB in length."""
expiration: float
"""
- The time, measured in number of seconds since the UNIX epoch, at which the key
- should expire.
+ Expires the key at a certain time, measured in number of seconds since the UNIX
+ epoch.
"""
expiration_ttl: float
- """The number of seconds for which the key should be visible before it expires.
+ """Expires the key after a number of seconds. Must be at least 60."""
- At least 60.
- """
+ metadata: object
diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py
index f886d78e9be..499faa09c71 100644
--- a/src/cloudflare/types/logpush/job_create_params.py
+++ b/src/cloudflare/types/logpush/job_create_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import Union, Optional
from typing_extensions import Literal, Required, TypedDict
from .output_options_param import OutputOptionsParam
@@ -77,11 +77,10 @@ class JobCreateParams(TypedDict, total=False):
in smaller quantities of larger files.
"""
- kind: Literal["edge"]
+ kind: Literal["", "edge"]
"""
The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
"""
logpull_options: Optional[str]
@@ -93,31 +92,28 @@ class JobCreateParams(TypedDict, total=False):
keep on making this call for you, setting start and end times appropriately.
"""
- max_upload_bytes: Optional[int]
+ max_upload_bytes: Union[Literal[0], int, None]
"""The maximum uncompressed file size of a batch of logs.
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
that you cannot set a minimum file size; this means that log files may be much
- smaller than this batch size. This parameter is not available for jobs with
- `edge` as its kind.
+ smaller than this batch size.
"""
- max_upload_interval_seconds: Optional[int]
+ max_upload_interval_seconds: Union[Literal[0], int, None]
"""The maximum interval in seconds for log batches.
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
it. Note that you cannot specify a minimum interval for log batches; this means
- that log files may be sent in shorter intervals than this. This parameter is
- only used for jobs with `edge` as its kind.
+ that log files may be sent in shorter intervals than this.
"""
- max_upload_records: Optional[int]
+ max_upload_records: Union[Literal[0], int, None]
"""The maximum number of log lines per batch.
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
Note that you cannot specify a minimum number of log lines per batch; this means
- that log files may contain many fewer lines than this. This parameter is not
- available for jobs with `edge` as its kind.
+ that log files may contain many fewer lines than this.
"""
name: Optional[str]
diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py
index d651e2dda90..bebb04f5cbb 100644
--- a/src/cloudflare/types/logpush/job_update_params.py
+++ b/src/cloudflare/types/logpush/job_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import Union, Optional
from typing_extensions import Literal, TypedDict
from .output_options_param import OutputOptionsParam
@@ -43,11 +43,10 @@ class JobUpdateParams(TypedDict, total=False):
in smaller quantities of larger files.
"""
- kind: Literal["edge"]
+ kind: Literal["", "edge"]
"""
The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
"""
logpull_options: Optional[str]
@@ -59,31 +58,28 @@ class JobUpdateParams(TypedDict, total=False):
keep on making this call for you, setting start and end times appropriately.
"""
- max_upload_bytes: Optional[int]
+ max_upload_bytes: Union[Literal[0], int, None]
"""The maximum uncompressed file size of a batch of logs.
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
that you cannot set a minimum file size; this means that log files may be much
- smaller than this batch size. This parameter is not available for jobs with
- `edge` as its kind.
+ smaller than this batch size.
"""
- max_upload_interval_seconds: Optional[int]
+ max_upload_interval_seconds: Union[Literal[0], int, None]
"""The maximum interval in seconds for log batches.
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
it. Note that you cannot specify a minimum interval for log batches; this means
- that log files may be sent in shorter intervals than this. This parameter is
- only used for jobs with `edge` as its kind.
+ that log files may be sent in shorter intervals than this.
"""
- max_upload_records: Optional[int]
+ max_upload_records: Union[Literal[0], int, None]
"""The maximum number of log lines per batch.
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
Note that you cannot specify a minimum number of log lines per batch; this means
- that log files may contain many fewer lines than this. This parameter is not
- available for jobs with `edge` as its kind.
+ that log files may contain many fewer lines than this.
"""
name: Optional[str]
diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py
index e6c5006b0dc..49fca6784cf 100644
--- a/src/cloudflare/types/logpush/logpush_job.py
+++ b/src/cloudflare/types/logpush/logpush_job.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
+from typing import Union, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -75,11 +75,10 @@ class LogpushJob(BaseModel):
in smaller quantities of larger files.
"""
- kind: Optional[Literal["edge"]] = None
+ kind: Optional[Literal["", "edge"]] = None
"""
The kind parameter (optional) is used to differentiate between Logpush and Edge
- Log Delivery jobs. Currently, Edge Log Delivery is only supported for the
- `http_requests` dataset.
+ Log Delivery jobs (when supported by the dataset).
"""
last_complete: Optional[datetime] = None
@@ -108,31 +107,28 @@ class LogpushJob(BaseModel):
keep on making this call for you, setting start and end times appropriately.
"""
- max_upload_bytes: Optional[int] = None
+ max_upload_bytes: Union[Literal[0], int, None] = None
"""The maximum uncompressed file size of a batch of logs.
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
that you cannot set a minimum file size; this means that log files may be much
- smaller than this batch size. This parameter is not available for jobs with
- `edge` as its kind.
+ smaller than this batch size.
"""
- max_upload_interval_seconds: Optional[int] = None
+ max_upload_interval_seconds: Union[Literal[0], int, None] = None
"""The maximum interval in seconds for log batches.
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
it. Note that you cannot specify a minimum interval for log batches; this means
- that log files may be sent in shorter intervals than this. This parameter is
- only used for jobs with `edge` as its kind.
+ that log files may be sent in shorter intervals than this.
"""
- max_upload_records: Optional[int] = None
+ max_upload_records: Union[Literal[0], int, None] = None
"""The maximum number of log lines per batch.
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
Note that you cannot specify a minimum number of log lines per batch; this means
- that log files may contain many fewer lines than this. This parameter is not
- available for jobs with `edge` as its kind.
+ that log files may contain many fewer lines than this.
"""
name: Optional[str] = None
diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py
index 4bca98d1cde..700b72f955b 100644
--- a/src/cloudflare/types/magic_transit/__init__.py
+++ b/src/cloudflare/types/magic_transit/__init__.py
@@ -41,6 +41,7 @@
from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse
from .route_update_response import RouteUpdateResponse as RouteUpdateResponse
from .connector_get_response import ConnectorGetResponse as ConnectorGetResponse
+from .connector_create_params import ConnectorCreateParams as ConnectorCreateParams
from .connector_edit_response import ConnectorEditResponse as ConnectorEditResponse
from .connector_list_response import ConnectorListResponse as ConnectorListResponse
from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams
@@ -49,6 +50,8 @@
from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse
from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams
from .route_bulk_update_params import RouteBulkUpdateParams as RouteBulkUpdateParams
+from .connector_create_response import ConnectorCreateResponse as ConnectorCreateResponse
+from .connector_delete_response import ConnectorDeleteResponse as ConnectorDeleteResponse
from .connector_update_response import ConnectorUpdateResponse as ConnectorUpdateResponse
from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse
from .gre_tunnel_create_response import GRETunnelCreateResponse as GRETunnelCreateResponse
diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_bulk_update_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_bulk_update_response.py
index 40969abf133..107afde8a11 100644
--- a/src/cloudflare/types/magic_transit/cf_interconnect_bulk_update_response.py
+++ b/src/cloudflare/types/magic_transit/cf_interconnect_bulk_update_response.py
@@ -42,6 +42,14 @@ class ModifiedInterconnect(BaseModel):
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
"""
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py
index e31c5e4f7d9..2830731891a 100644
--- a/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py
+++ b/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py
@@ -42,6 +42,14 @@ class Interconnect(BaseModel):
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
"""
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_list_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_list_response.py
index 29d4bc9b95b..cc528b06ca1 100644
--- a/src/cloudflare/types/magic_transit/cf_interconnect_list_response.py
+++ b/src/cloudflare/types/magic_transit/cf_interconnect_list_response.py
@@ -42,6 +42,14 @@ class Interconnect(BaseModel):
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
"""
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py
index 64f46755c29..7e1d8f76d87 100644
--- a/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py
+++ b/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py
@@ -29,6 +29,14 @@ class CfInterconnectUpdateParams(TypedDict, total=False):
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
"""
+ interface_address6: str
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
mtu: int
"""The Maximum Transmission Unit (MTU) in bytes for the interconnect.
diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py
index 851a6c7664b..801c19f101f 100644
--- a/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py
+++ b/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py
@@ -42,6 +42,14 @@ class ModifiedInterconnect(BaseModel):
10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
"""
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/connector_create_params.py b/src/cloudflare/types/magic_transit/connector_create_params.py
new file mode 100644
index 00000000000..3325692038f
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/connector_create_params.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ConnectorCreateParams", "Device"]
+
+
+class ConnectorCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Account identifier"""
+
+ device: Required[Device]
+
+ activated: bool
+
+ interrupt_window_duration_hours: float
+
+ interrupt_window_hour_of_day: float
+
+ notes: str
+
+ timezone: str
+
+
+class Device(TypedDict, total=False):
+ id: str
+
+ serial_number: str
diff --git a/src/cloudflare/types/magic_transit/connector_create_response.py b/src/cloudflare/types/magic_transit/connector_create_response.py
new file mode 100644
index 00000000000..02edf9b3370
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/connector_create_response.py
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["ConnectorCreateResponse", "Device"]
+
+
+class Device(BaseModel):
+ id: str
+
+ serial_number: Optional[str] = None
+
+
+class ConnectorCreateResponse(BaseModel):
+ id: str
+
+ activated: bool
+
+ interrupt_window_duration_hours: float
+
+ interrupt_window_hour_of_day: float
+
+ last_updated: str
+
+ notes: str
+
+ timezone: str
+
+ device: Optional[Device] = None
+
+ last_heartbeat: Optional[str] = None
+
+ last_seen_version: Optional[str] = None
diff --git a/src/cloudflare/types/magic_transit/connector_delete_response.py b/src/cloudflare/types/magic_transit/connector_delete_response.py
new file mode 100644
index 00000000000..7b07e28c483
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/connector_delete_response.py
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["ConnectorDeleteResponse", "Device"]
+
+
+class Device(BaseModel):
+ id: str
+
+ serial_number: Optional[str] = None
+
+
+class ConnectorDeleteResponse(BaseModel):
+ id: str
+
+ activated: bool
+
+ interrupt_window_duration_hours: float
+
+ interrupt_window_hour_of_day: float
+
+ last_updated: str
+
+ notes: str
+
+ timezone: str
+
+ device: Optional[Device] = None
+
+ last_heartbeat: Optional[str] = None
+
+ last_seen_version: Optional[str] = None
diff --git a/src/cloudflare/types/magic_transit/connectors/event_list_params.py b/src/cloudflare/types/magic_transit/connectors/event_list_params.py
index 7ffc819ab42..b8ba2917823 100644
--- a/src/cloudflare/types/magic_transit/connectors/event_list_params.py
+++ b/src/cloudflare/types/magic_transit/connectors/event_list_params.py
@@ -19,4 +19,7 @@ class EventListParams(TypedDict, total=False):
cursor: str
+ k: str
+ """Filter by event kind"""
+
limit: float
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_bulk_update_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_bulk_update_response.py
index 5cb1d10c83b..ea88162428c 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_bulk_update_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_bulk_update_response.py
@@ -99,6 +99,14 @@ class ModifiedGRETunnel(BaseModel):
health_check: Optional[ModifiedGRETunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_create_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_create_params.py
index cb0a4c24b3d..ceea9c012b0 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_create_params.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_create_params.py
@@ -41,6 +41,14 @@ class GRETunnelCreateParams(TypedDict, total=False):
health_check: HealthCheck
+ interface_address6: str
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
mtu: int
"""Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
index c1c12dbe110..967ec687fbd 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
@@ -93,6 +93,14 @@ class GRETunnelCreateResponse(BaseModel):
health_check: Optional[HealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py
index 6d64c28e06e..1051a9fb471 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py
@@ -99,6 +99,14 @@ class DeletedGRETunnel(BaseModel):
health_check: Optional[DeletedGRETunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py
index 02db19f143d..2fe27ce6c27 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py
@@ -99,6 +99,14 @@ class GRETunnel(BaseModel):
health_check: Optional[GRETunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
index 5a633efb2e6..09610fa8f3a 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
@@ -99,6 +99,14 @@ class GRETunnel(BaseModel):
health_check: Optional[GRETunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
index edd75736135..52545d851d5 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
@@ -41,6 +41,14 @@ class GRETunnelUpdateParams(TypedDict, total=False):
health_check: HealthCheck
+ interface_address6: str
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
mtu: int
"""Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py
index 2e92af6716f..13412323bc4 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py
@@ -99,6 +99,14 @@ class ModifiedGRETunnel(BaseModel):
health_check: Optional[ModifiedGRETunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_response.py
index 1b00c989cfb..7c1bbcd3e42 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_response.py
@@ -105,6 +105,14 @@ class ModifiedIPSECTunnel(BaseModel):
health_check: Optional[ModifiedIPSECTunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
index d7927be7bb0..aedf4f2bdd9 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
@@ -40,6 +40,14 @@ class IPSECTunnelCreateParams(TypedDict, total=False):
health_check: HealthCheck
+ interface_address6: str
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
psk: str
"""A randomly generated or provided string for use in the IPsec tunnel."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
index 8a8f1175285..67d08a74a4d 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
@@ -99,6 +99,14 @@ class IPSECTunnelCreateResponse(BaseModel):
health_check: Optional[HealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py
index 2278373ccad..a4bf6406548 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py
@@ -105,6 +105,14 @@ class DeletedIPSECTunnel(BaseModel):
health_check: Optional[DeletedIPSECTunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py
index b90872ea81b..58f107b22af 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py
@@ -105,6 +105,14 @@ class IPSECTunnel(BaseModel):
health_check: Optional[IPSECTunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
index 8891333e340..70500da7861 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
@@ -105,6 +105,14 @@ class IPSECTunnel(BaseModel):
health_check: Optional[IPSECTunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
index ee3fbf9d4ba..b488dc4d2cc 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
@@ -40,6 +40,14 @@ class IPSECTunnelUpdateParams(TypedDict, total=False):
health_check: HealthCheck
+ interface_address6: str
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
psk: str
"""A randomly generated or provided string for use in the IPsec tunnel."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py
index 1af189d7eaa..48d66dc57d8 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py
@@ -105,6 +105,14 @@ class ModifiedIPSECTunnel(BaseModel):
health_check: Optional[ModifiedIPSECTunnelHealthCheck] = None
+ interface_address6: Optional[str] = None
+ """
+ A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
+ address being the first IP of the subnet and not same as the address of
+ virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
+ interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
+ """
+
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/network_interconnects/interconnect_create_response.py b/src/cloudflare/types/network_interconnects/interconnect_create_response.py
index 309764de3ef..21f706020e6 100644
--- a/src/cloudflare/types/network_interconnects/interconnect_create_response.py
+++ b/src/cloudflare/types/network_interconnects/interconnect_create_response.py
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import TypeAlias
+from typing_extensions import Literal, TypeAlias
from ..._models import BaseModel
@@ -49,5 +49,10 @@ class NscInterconnectGcpPartnerBody(BaseModel):
owner: Optional[str] = None
+ speed: Optional[Literal["50M", "100M", "200M", "300M", "400M", "500M", "1G", "2G", "5G", "10G", "20G", "50G"]] = (
+ None
+ )
+ """Bandwidth structure as visible through the customer-facing API."""
+
InterconnectCreateResponse: TypeAlias = Union[NscInterconnectPhysicalBody, NscInterconnectGcpPartnerBody]
diff --git a/src/cloudflare/types/network_interconnects/interconnect_get_response.py b/src/cloudflare/types/network_interconnects/interconnect_get_response.py
index 345079eb625..6e0e75db84a 100644
--- a/src/cloudflare/types/network_interconnects/interconnect_get_response.py
+++ b/src/cloudflare/types/network_interconnects/interconnect_get_response.py
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import TypeAlias
+from typing_extensions import Literal, TypeAlias
from ..._models import BaseModel
@@ -49,5 +49,10 @@ class NscInterconnectGcpPartnerBody(BaseModel):
owner: Optional[str] = None
+ speed: Optional[Literal["50M", "100M", "200M", "300M", "400M", "500M", "1G", "2G", "5G", "10G", "20G", "50G"]] = (
+ None
+ )
+ """Bandwidth structure as visible through the customer-facing API."""
+
InterconnectGetResponse: TypeAlias = Union[NscInterconnectPhysicalBody, NscInterconnectGcpPartnerBody]
diff --git a/src/cloudflare/types/network_interconnects/interconnect_list_response.py b/src/cloudflare/types/network_interconnects/interconnect_list_response.py
index 264aa5ea7f3..07ac20fe58d 100644
--- a/src/cloudflare/types/network_interconnects/interconnect_list_response.py
+++ b/src/cloudflare/types/network_interconnects/interconnect_list_response.py
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import TypeAlias
+from typing_extensions import Literal, TypeAlias
from ..._models import BaseModel
@@ -50,6 +50,11 @@ class ItemNscInterconnectGcpPartnerBody(BaseModel):
owner: Optional[str] = None
+ speed: Optional[Literal["50M", "100M", "200M", "300M", "400M", "500M", "1G", "2G", "5G", "10G", "20G", "50G"]] = (
+ None
+ )
+ """Bandwidth structure as visible through the customer-facing API."""
+
Item: TypeAlias = Union[ItemNscInterconnectPhysicalBody, ItemNscInterconnectGcpPartnerBody]
diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py
index d2ee6584473..6f15952230b 100644
--- a/src/cloudflare/types/radar/__init__.py
+++ b/src/cloudflare/types/radar/__init__.py
@@ -2,16 +2,23 @@
from __future__ import annotations
+from .bot_get_params import BotGetParams as BotGetParams
+from .bot_list_params import BotListParams as BotListParams
+from .bot_get_response import BotGetResponse as BotGetResponse
+from .bot_list_response import BotListResponse as BotListResponse
from .entity_get_params import EntityGetParams as EntityGetParams
+from .bot_summary_params import BotSummaryParams as BotSummaryParams
from .radar_email_series import RadarEmailSeries as RadarEmailSeries
from .ranking_top_params import RankingTopParams as RankingTopParams
from .dataset_list_params import DatasetListParams as DatasetListParams
from .entity_get_response import EntityGetResponse as EntityGetResponse
from .radar_email_summary import RadarEmailSummary as RadarEmailSummary
+from .bot_summary_response import BotSummaryResponse as BotSummaryResponse
from .dataset_get_response import DatasetGetResponse as DatasetGetResponse
from .ranking_top_response import RankingTopResponse as RankingTopResponse
from .search_global_params import SearchGlobalParams as SearchGlobalParams
from .bgp_timeseries_params import BGPTimeseriesParams as BGPTimeseriesParams
+from .bot_timeseries_params import BotTimeseriesParams as BotTimeseriesParams
from .dataset_list_response import DatasetListResponse as DatasetListResponse
from .dns_timeseries_params import DNSTimeseriesParams as DNSTimeseriesParams
from .annotation_list_params import AnnotationListParams as AnnotationListParams
@@ -20,6 +27,7 @@
from .search_global_response import SearchGlobalResponse as SearchGlobalResponse
from .as112_timeseries_params import AS112TimeseriesParams as AS112TimeseriesParams
from .bgp_timeseries_response import BGPTimeseriesResponse as BGPTimeseriesResponse
+from .bot_timeseries_response import BotTimeseriesResponse as BotTimeseriesResponse
from .dataset_download_params import DatasetDownloadParams as DatasetDownloadParams
from .dns_timeseries_response import DNSTimeseriesResponse as DNSTimeseriesResponse
from .annotation_list_response import AnnotationListResponse as AnnotationListResponse
@@ -30,7 +38,9 @@
from .netflow_timeseries_params import NetflowTimeseriesParams as NetflowTimeseriesParams
from .traffic_anomaly_get_params import TrafficAnomalyGetParams as TrafficAnomalyGetParams
from .netflow_timeseries_response import NetflowTimeseriesResponse as NetflowTimeseriesResponse
+from .bot_timeseries_groups_params import BotTimeseriesGroupsParams as BotTimeseriesGroupsParams
from .traffic_anomaly_get_response import TrafficAnomalyGetResponse as TrafficAnomalyGetResponse
+from .bot_timeseries_groups_response import BotTimeseriesGroupsResponse as BotTimeseriesGroupsResponse
from .ranking_timeseries_groups_params import RankingTimeseriesGroupsParams as RankingTimeseriesGroupsParams
from .tcp_resets_timeout_summary_params import TCPResetsTimeoutSummaryParams as TCPResetsTimeoutSummaryParams
from .ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse as RankingTimeseriesGroupsResponse
diff --git a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py
index 109a493fd38..3743f7c7e9f 100644
--- a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py
+++ b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/ai/inference/summary_model_response.py b/src/cloudflare/types/radar/ai/inference/summary_model_response.py
index 16b300edfda..8ba6e577a28 100644
--- a/src/cloudflare/types/radar/ai/inference/summary_model_response.py
+++ b/src/cloudflare/types/radar/ai/inference/summary_model_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/ai/inference/summary_task_response.py b/src/cloudflare/types/radar/ai/inference/summary_task_response.py
index d4dd193c2a0..a79a345dd90 100644
--- a/src/cloudflare/types/radar/ai/inference/summary_task_response.py
+++ b/src/cloudflare/types/radar/ai/inference/summary_task_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py
index c9af7e04f58..9e7dd1690b2 100644
--- a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py
+++ b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py
index f45dc1088fe..e19a30aace7 100644
--- a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py
+++ b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py b/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py
index a50abb619b3..17443d5bfdf 100644
--- a/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py
+++ b/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/ai/to_markdown_create_params.py b/src/cloudflare/types/radar/ai/to_markdown_create_params.py
index 838f0bf0e1f..bfbdc57a5cd 100644
--- a/src/cloudflare/types/radar/ai/to_markdown_create_params.py
+++ b/src/cloudflare/types/radar/ai/to_markdown_create_params.py
@@ -4,12 +4,8 @@
from typing_extensions import Required, TypedDict
-from ...._types import FileTypes
-
__all__ = ["ToMarkdownCreateParams"]
class ToMarkdownCreateParams(TypedDict, total=False):
account_id: Required[str]
-
- body: FileTypes
diff --git a/src/cloudflare/types/radar/as112/summary_dnssec_response.py b/src/cloudflare/types/radar/as112/summary_dnssec_response.py
index 5d904b19e2f..28225eea271 100644
--- a/src/cloudflare/types/radar/as112/summary_dnssec_response.py
+++ b/src/cloudflare/types/radar/as112/summary_dnssec_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/summary_edns_response.py b/src/cloudflare/types/radar/as112/summary_edns_response.py
index a288f6df83b..ba51dba7a87 100644
--- a/src/cloudflare/types/radar/as112/summary_edns_response.py
+++ b/src/cloudflare/types/radar/as112/summary_edns_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/summary_ip_version_response.py b/src/cloudflare/types/radar/as112/summary_ip_version_response.py
index 5ade97ddc23..a27d807be2a 100644
--- a/src/cloudflare/types/radar/as112/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/as112/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/summary_protocol_response.py b/src/cloudflare/types/radar/as112/summary_protocol_response.py
index da6b44a7151..ccbbb014efa 100644
--- a/src/cloudflare/types/radar/as112/summary_protocol_response.py
+++ b/src/cloudflare/types/radar/as112/summary_protocol_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/summary_query_type_response.py b/src/cloudflare/types/radar/as112/summary_query_type_response.py
index b1515b5fada..aa517e5d4e4 100644
--- a/src/cloudflare/types/radar/as112/summary_query_type_response.py
+++ b/src/cloudflare/types/radar/as112/summary_query_type_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_response.py b/src/cloudflare/types/radar/as112/summary_response_codes_response.py
index 60887a68417..faa1b5297b2 100644
--- a/src/cloudflare/types/radar/as112/summary_response_codes_response.py
+++ b/src/cloudflare/types/radar/as112/summary_response_codes_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py b/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py
index 4240248af6a..29144452c39 100644
--- a/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py
+++ b/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py
index 9f8245b2ed6..ba71485ad18 100644
--- a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py
+++ b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py
index ed23b66b45f..1ff62cad56f 100644
--- a/src/cloudflare/types/radar/as112_timeseries_response.py
+++ b/src/cloudflare/types/radar/as112_timeseries_response.py
@@ -1,13 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-from .as112_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item
__all__ = [
"AS112TimeseriesResponse",
@@ -16,6 +15,7 @@
"MetaConfidenceInfoAnnotation",
"MetaDateRange",
"MetaUnit",
+ "AS112TimeseriesResponseItem",
]
@@ -94,12 +94,19 @@ class Meta(BaseModel):
"""Measurement units for the results."""
+class AS112TimeseriesResponseItem(BaseModel):
+ timestamps: List[datetime]
+
+ values: List[str]
+
+
class AS112TimeseriesResponse(BaseModel):
meta: Meta
"""Metadata for the results."""
+ __pydantic_extra__: Dict[str, AS112TimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
- def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ...
+ def __getattr__(self, attr: str) -> AS112TimeseriesResponseItem: ...
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py
index 2fe19bba6fb..4f348e206ef 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py
index de757ec4676..83aad5b60e2 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py
index a33a0aec474..50d4199f76c 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py
index b121482480f..fd840c4213d 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py
index db6dad30a05..86588aba267 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py
index bd97d43964d..19f23890a63 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py
index a5e0a1fde39..6fb79d768e0 100644
--- a/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py
index 507d3cd63b8..cd8133c26da 100644
--- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py
index e4a17e94b13..56c74f37ef6 100644
--- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py
index 2bb3dba6141..efe0e943ca2 100644
--- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py
index 18b51a6a0d4..3224e6aab2b 100644
--- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py
+++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py
@@ -1,13 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ...._models import BaseModel
-from .layer3_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item
__all__ = [
"Layer3TimeseriesResponse",
@@ -16,6 +15,7 @@
"MetaConfidenceInfoAnnotation",
"MetaDateRange",
"MetaUnit",
+ "Layer3TimeseriesResponseItem",
]
@@ -94,12 +94,19 @@ class Meta(BaseModel):
"""Measurement units for the results."""
+class Layer3TimeseriesResponseItem(BaseModel):
+ timestamps: List[datetime]
+
+ values: List[str]
+
+
class Layer3TimeseriesResponse(BaseModel):
meta: Meta
"""Metadata for the results."""
+ __pydantic_extra__: Dict[str, Layer3TimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
- def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ...
+ def __getattr__(self, attr: str) -> Layer3TimeseriesResponseItem: ...
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py
index 0874d807cd5..7d613a93aaa 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py
index 1417cb71058..ecff932930f 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py
index a33a0aec474..50d4199f76c 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py
index 8eca8811ec5..81de1ad187d 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py
index f0eb8ac27fe..f71087e19b3 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py
index eb5e429d477..e4e86461be1 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py
index a5e0a1fde39..6fb79d768e0 100644
--- a/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py
index 38f2e8a60ff..40b3fe53dcb 100644
--- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py
index 507d3cd63b8..cd8133c26da 100644
--- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py
index 957e3974c22..9d6d7089370 100644
--- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py
index e0c4fcc3c37..f8851f3e883 100644
--- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py
index 2bb3dba6141..efe0e943ca2 100644
--- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py
+++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py
index 4faebabab6e..a633711087e 100644
--- a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py
+++ b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py
@@ -68,13 +68,6 @@ class TopAttacksParams(TypedDict, total=False):
includes results from PT.
"""
- magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"]
- """Deprecated parameter.
-
- Future support includes only attack magnitude defined by total mitigated
- requests (MITIGATED_REQUESTS).
- """
-
mitigation_product: Annotated[
List[
Literal[
diff --git a/src/cloudflare/types/radar/bot_get_params.py b/src/cloudflare/types/radar/bot_get_params.py
new file mode 100644
index 00000000000..85b78dcff72
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_get_params.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["BotGetParams"]
+
+
+class BotGetParams(TypedDict, total=False):
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
diff --git a/src/cloudflare/types/radar/bot_get_response.py b/src/cloudflare/types/radar/bot_get_response.py
new file mode 100644
index 00000000000..4aeeb0b82c6
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_get_response.py
@@ -0,0 +1,37 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["BotGetResponse", "Bot"]
+
+
+class Bot(BaseModel):
+ category: str
+ """The category of the bot."""
+
+ description: str
+ """A summary for the bot (e.g., purpose)."""
+
+ name: str
+ """The name of the bot."""
+
+ operator: str
+ """The organization that owns and operates the bot."""
+
+ operator_url: str = FieldInfo(alias="operatorUrl")
+ """The link to the bot documentation."""
+
+ slug: str
+ """A kebab-case identifier derived from the bot name."""
+
+ user_agent_patterns: List[str] = FieldInfo(alias="userAgentPatterns")
+
+ user_agents: List[str] = FieldInfo(alias="userAgents")
+
+
+class BotGetResponse(BaseModel):
+ bot: Bot
diff --git a/src/cloudflare/types/radar/bot_list_params.py b/src/cloudflare/types/radar/bot_list_params.py
new file mode 100644
index 00000000000..5f24b188b0d
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_list_params.py
@@ -0,0 +1,49 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["BotListParams"]
+
+
+class BotListParams(TypedDict, total=False):
+ bot_category: Annotated[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ],
+ PropertyInfo(alias="botCategory"),
+ ]
+ """Filters results by bot category."""
+
+ bot_operator: Annotated[str, PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ bot_verification_status: Annotated[Literal["VERIFIED"], PropertyInfo(alias="botVerificationStatus")]
+ """Filters results by bot verification status."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ limit: int
+ """Limits the number of objects returned in the response."""
+
+ offset: int
+ """Skips the specified number of objects before fetching the results."""
diff --git a/src/cloudflare/types/radar/bot_list_response.py b/src/cloudflare/types/radar/bot_list_response.py
new file mode 100644
index 00000000000..66e1fdb72d9
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_list_response.py
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+
+__all__ = ["BotListResponse", "Bot"]
+
+
+class Bot(BaseModel):
+ category: str
+ """The category of the bot."""
+
+ description: str
+ """A summary for the bot (e.g., purpose)."""
+
+ name: str
+ """The name of the bot."""
+
+ operator: str
+ """The organization that owns and operates the bot."""
+
+ slug: str
+ """A kebab-case identifier derived from the bot name."""
+
+
+class BotListResponse(BaseModel):
+ bots: List[Bot]
diff --git a/src/cloudflare/types/radar/bot_summary_params.py b/src/cloudflare/types/radar/bot_summary_params.py
new file mode 100644
index 00000000000..f8a439351d2
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_summary_params.py
@@ -0,0 +1,98 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["BotSummaryParams"]
+
+
+class BotSummaryParams(TypedDict, total=False):
+ asn: List[str]
+ """Filters results by Autonomous System.
+
+ Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list.
+ Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes
+ results from AS174, but includes results from AS3356.
+ """
+
+ bot: List[str]
+ """Filters results by bot name."""
+
+ bot_category: Annotated[
+ List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ],
+ PropertyInfo(alias="botCategory"),
+ ]
+ """Filters results by bot category."""
+
+ bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")]
+ """Filters results by bot verification status (Verified vs. Unverified)."""
+
+ continent: List[str]
+ """Filters results by continent.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ continents from results. For example, `-EU,NA` excludes results from EU, but
+ includes results from NA.
+ """
+
+ date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")]
+ """End of the date range (inclusive)."""
+
+ date_range: Annotated[List[str], PropertyInfo(alias="dateRange")]
+ """Filters results by date range.
+
+ For example, use `7d` and `7dcontrol` to compare this week with the previous
+ week. Use this parameter or set specific start and end dates (`dateStart` and
+ `dateEnd` parameters).
+ """
+
+ date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")]
+ """Start of the date range."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")]
+ """
+ Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+ """
+
+ location: List[str]
+ """Filters results by location.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ locations from results. For example, `-US,PT` excludes results from the US, but
+ includes results from PT.
+ """
+
+ name: List[str]
+ """Array of names used to label the series in the response."""
diff --git a/src/cloudflare/types/radar/bot_summary_response.py b/src/cloudflare/types/radar/bot_summary_response.py
new file mode 100644
index 00000000000..41e89dd6fa0
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_summary_response.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = [
+ "BotSummaryResponse",
+ "Meta",
+ "MetaConfidenceInfo",
+ "MetaConfidenceInfoAnnotation",
+ "MetaDateRange",
+ "MetaUnit",
+]
+
+
+class MetaConfidenceInfoAnnotation(BaseModel):
+ data_source: str = FieldInfo(alias="dataSource")
+
+ description: str
+
+ end_date: datetime = FieldInfo(alias="endDate")
+
+ event_type: str = FieldInfo(alias="eventType")
+
+ is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
+ """Whether event is a single point in time or a time range."""
+
+ linked_url: str = FieldInfo(alias="linkedUrl")
+
+ start_date: datetime = FieldInfo(alias="startDate")
+
+
+class MetaConfidenceInfo(BaseModel):
+ annotations: List[MetaConfidenceInfoAnnotation]
+
+ level: int
+ """Provides an indication of how much confidence Cloudflare has in the data."""
+
+
+class MetaDateRange(BaseModel):
+ end_time: datetime = FieldInfo(alias="endTime")
+ """Adjusted end of date range."""
+
+ start_time: datetime = FieldInfo(alias="startTime")
+ """Adjusted start of date range."""
+
+
+class MetaUnit(BaseModel):
+ name: str
+
+ value: str
+
+
+class Meta(BaseModel):
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
+
+ date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
+
+ last_updated: datetime = FieldInfo(alias="lastUpdated")
+ """Timestamp of the last dataset update."""
+
+ normalization: Literal[
+ "PERCENTAGE",
+ "MIN0_MAX",
+ "MIN_MAX",
+ "RAW_VALUES",
+ "PERCENTAGE_CHANGE",
+ "ROLLING_AVERAGE",
+ "OVERLAPPED_PERCENTAGE",
+ "RATIO",
+ ]
+ """Normalization method applied to the results.
+
+ Refer to
+ [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ """
+
+ units: List[MetaUnit]
+ """Measurement units for the results."""
+
+
+class BotSummaryResponse(BaseModel):
+ meta: Meta
+ """Metadata for the results."""
+
+ summary_0: Dict[str, str]
diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_params.py b/src/cloudflare/types/radar/bot_timeseries_groups_params.py
new file mode 100644
index 00000000000..efab8a5c95b
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_timeseries_groups_params.py
@@ -0,0 +1,105 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["BotTimeseriesGroupsParams"]
+
+
+class BotTimeseriesGroupsParams(TypedDict, total=False):
+ agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")]
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ asn: List[str]
+ """Filters results by Autonomous System.
+
+ Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list.
+ Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes
+ results from AS174, but includes results from AS3356.
+ """
+
+ bot: List[str]
+ """Filters results by bot name."""
+
+ bot_category: Annotated[
+ List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ],
+ PropertyInfo(alias="botCategory"),
+ ]
+ """Filters results by bot category."""
+
+ bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")]
+ """Filters results by bot verification status (Verified vs. Unverified)."""
+
+ continent: List[str]
+ """Filters results by continent.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ continents from results. For example, `-EU,NA` excludes results from EU, but
+ includes results from NA.
+ """
+
+ date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")]
+ """End of the date range (inclusive)."""
+
+ date_range: Annotated[List[str], PropertyInfo(alias="dateRange")]
+ """Filters results by date range.
+
+ For example, use `7d` and `7dcontrol` to compare this week with the previous
+ week. Use this parameter or set specific start and end dates (`dateStart` and
+ `dateEnd` parameters).
+ """
+
+ date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")]
+ """Start of the date range."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")]
+ """
+ Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+ """
+
+ location: List[str]
+ """Filters results by location.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ locations from results. For example, `-US,PT` excludes results from the US, but
+ includes results from PT.
+ """
+
+ name: List[str]
+ """Array of names used to label the series in the response."""
diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_response.py b/src/cloudflare/types/radar/bot_timeseries_groups_response.py
new file mode 100644
index 00000000000..5ac78a6bf90
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_timeseries_groups_response.py
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = [
+ "BotTimeseriesGroupsResponse",
+ "Meta",
+ "MetaConfidenceInfo",
+ "MetaConfidenceInfoAnnotation",
+ "MetaDateRange",
+ "MetaUnit",
+ "Serie0",
+]
+
+
+class MetaConfidenceInfoAnnotation(BaseModel):
+ data_source: str = FieldInfo(alias="dataSource")
+
+ description: str
+
+ end_date: datetime = FieldInfo(alias="endDate")
+
+ event_type: str = FieldInfo(alias="eventType")
+
+ is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
+ """Whether event is a single point in time or a time range."""
+
+ linked_url: str = FieldInfo(alias="linkedUrl")
+
+ start_date: datetime = FieldInfo(alias="startDate")
+
+
+class MetaConfidenceInfo(BaseModel):
+ annotations: List[MetaConfidenceInfoAnnotation]
+
+ level: int
+ """Provides an indication of how much confidence Cloudflare has in the data."""
+
+
+class MetaDateRange(BaseModel):
+ end_time: datetime = FieldInfo(alias="endTime")
+ """Adjusted end of date range."""
+
+ start_time: datetime = FieldInfo(alias="startTime")
+ """Adjusted start of date range."""
+
+
+class MetaUnit(BaseModel):
+ name: str
+
+ value: str
+
+
+class Meta(BaseModel):
+ agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo(
+ alias="aggInterval"
+ )
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
+
+ date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
+
+ last_updated: datetime = FieldInfo(alias="lastUpdated")
+ """Timestamp of the last dataset update."""
+
+ normalization: Literal[
+ "PERCENTAGE",
+ "MIN0_MAX",
+ "MIN_MAX",
+ "RAW_VALUES",
+ "PERCENTAGE_CHANGE",
+ "ROLLING_AVERAGE",
+ "OVERLAPPED_PERCENTAGE",
+ "RATIO",
+ ]
+ """Normalization method applied to the results.
+
+ Refer to
+ [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ """
+
+ units: List[MetaUnit]
+ """Measurement units for the results."""
+
+
+class Serie0(BaseModel):
+ timestamps: List[datetime]
+
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+ if TYPE_CHECKING:
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> List[str]: ...
+
+
+class BotTimeseriesGroupsResponse(BaseModel):
+ meta: Meta
+ """Metadata for the results."""
+
+ serie_0: Serie0
diff --git a/src/cloudflare/types/radar/bot_timeseries_params.py b/src/cloudflare/types/radar/bot_timeseries_params.py
new file mode 100644
index 00000000000..9541c960fd7
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_timeseries_params.py
@@ -0,0 +1,98 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["BotTimeseriesParams"]
+
+
+class BotTimeseriesParams(TypedDict, total=False):
+ agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")]
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ asn: List[str]
+ """Filters results by Autonomous System.
+
+ Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list.
+ Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes
+ results from AS174, but includes results from AS3356.
+ """
+
+ bot: List[str]
+ """Filters results by bot name."""
+
+ bot_category: Annotated[
+ List[
+ Literal[
+ "SEARCH_ENGINE_CRAWLER",
+ "SEARCH_ENGINE_OPTIMIZATION",
+ "MONITORING_AND_ANALYTICS",
+ "ADVERTISING_AND_MARKETING",
+ "SOCIAL_MEDIA_MARKETING",
+ "PAGE_PREVIEW",
+ "ACADEMIC_RESEARCH",
+ "SECURITY",
+ "ACCESSIBILITY",
+ "WEBHOOKS",
+ "FEED_FETCHER",
+ "AI_CRAWLER",
+ "AGGREGATOR",
+ "AI_ASSISTANT",
+ "AI_SEARCH",
+ "ARCHIVER",
+ ]
+ ],
+ PropertyInfo(alias="botCategory"),
+ ]
+ """Filters results by bot category."""
+
+ bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")]
+ """Filters results by bot verification status (Verified vs. Unverified)."""
+
+ continent: List[str]
+ """Filters results by continent.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ continents from results. For example, `-EU,NA` excludes results from EU, but
+ includes results from NA.
+ """
+
+ date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")]
+ """End of the date range (inclusive)."""
+
+ date_range: Annotated[List[str], PropertyInfo(alias="dateRange")]
+ """Filters results by date range.
+
+ For example, use `7d` and `7dcontrol` to compare this week with the previous
+ week. Use this parameter or set specific start and end dates (`dateStart` and
+ `dateEnd` parameters).
+ """
+
+ date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")]
+ """Start of the date range."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ location: List[str]
+ """Filters results by location.
+
+ Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude
+ locations from results. For example, `-US,PT` excludes results from the US, but
+ includes results from PT.
+ """
+
+ name: List[str]
+ """Array of names used to label the series in the response."""
diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py
new file mode 100644
index 00000000000..6d47e77aff6
--- /dev/null
+++ b/src/cloudflare/types/radar/bot_timeseries_response.py
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = [
+ "BotTimeseriesResponse",
+ "Meta",
+ "MetaConfidenceInfo",
+ "MetaConfidenceInfoAnnotation",
+ "MetaDateRange",
+ "MetaUnit",
+ "BotTimeseriesResponseItem",
+]
+
+
+class MetaConfidenceInfoAnnotation(BaseModel):
+ data_source: str = FieldInfo(alias="dataSource")
+
+ description: str
+
+ end_date: datetime = FieldInfo(alias="endDate")
+
+ event_type: str = FieldInfo(alias="eventType")
+
+ is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
+ """Whether event is a single point in time or a time range."""
+
+ linked_url: str = FieldInfo(alias="linkedUrl")
+
+ start_date: datetime = FieldInfo(alias="startDate")
+
+
+class MetaConfidenceInfo(BaseModel):
+ annotations: List[MetaConfidenceInfoAnnotation]
+
+ level: int
+ """Provides an indication of how much confidence Cloudflare has in the data."""
+
+
+class MetaDateRange(BaseModel):
+ end_time: datetime = FieldInfo(alias="endTime")
+ """Adjusted end of date range."""
+
+ start_time: datetime = FieldInfo(alias="startTime")
+ """Adjusted start of date range."""
+
+
+class MetaUnit(BaseModel):
+ name: str
+
+ value: str
+
+
+class Meta(BaseModel):
+ agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo(
+ alias="aggInterval"
+ )
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
+
+ date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
+
+ last_updated: datetime = FieldInfo(alias="lastUpdated")
+ """Timestamp of the last dataset update."""
+
+ normalization: Literal[
+ "PERCENTAGE",
+ "MIN0_MAX",
+ "MIN_MAX",
+ "RAW_VALUES",
+ "PERCENTAGE_CHANGE",
+ "ROLLING_AVERAGE",
+ "OVERLAPPED_PERCENTAGE",
+ "RATIO",
+ ]
+ """Normalization method applied to the results.
+
+ Refer to
+ [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ """
+
+ units: List[MetaUnit]
+ """Measurement units for the results."""
+
+
+class BotTimeseriesResponseItem(BaseModel):
+ timestamps: List[datetime]
+
+ values: List[str]
+
+
+class BotTimeseriesResponse(BaseModel):
+ meta: Meta
+ """Metadata for the results."""
+
+ __pydantic_extra__: Dict[str, BotTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+ if TYPE_CHECKING:
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> BotTimeseriesResponseItem: ...
diff --git a/src/cloudflare/types/radar/bots/__init__.py b/src/cloudflare/types/radar/bots/__init__.py
new file mode 100644
index 00000000000..4dd0e4c99e7
--- /dev/null
+++ b/src/cloudflare/types/radar/bots/__init__.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .web_crawler_summary_params import WebCrawlerSummaryParams as WebCrawlerSummaryParams
+from .web_crawler_summary_response import WebCrawlerSummaryResponse as WebCrawlerSummaryResponse
+from .web_crawler_timeseries_groups_params import WebCrawlerTimeseriesGroupsParams as WebCrawlerTimeseriesGroupsParams
+from .web_crawler_timeseries_groups_response import (
+ WebCrawlerTimeseriesGroupsResponse as WebCrawlerTimeseriesGroupsResponse,
+)
diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_params.py b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py
new file mode 100644
index 00000000000..2fb3190cc07
--- /dev/null
+++ b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py
@@ -0,0 +1,43 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["WebCrawlerSummaryParams"]
+
+
+class WebCrawlerSummaryParams(TypedDict, total=False):
+ bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")]
+ """End of the date range (inclusive)."""
+
+ date_range: Annotated[List[str], PropertyInfo(alias="dateRange")]
+ """Filters results by date range.
+
+ For example, use `7d` and `7dcontrol` to compare this week with the previous
+ week. Use this parameter or set specific start and end dates (`dateStart` and
+ `dateEnd` parameters).
+ """
+
+ date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")]
+ """Start of the date range."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")]
+ """
+ Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+ """
+
+ name: List[str]
+ """Array of names used to label the series in the response."""
diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_response.py b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py
new file mode 100644
index 00000000000..fe5e221edfc
--- /dev/null
+++ b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = [
+ "WebCrawlerSummaryResponse",
+ "Meta",
+ "MetaConfidenceInfo",
+ "MetaConfidenceInfoAnnotation",
+ "MetaDateRange",
+ "MetaUnit",
+]
+
+
+class MetaConfidenceInfoAnnotation(BaseModel):
+ data_source: str = FieldInfo(alias="dataSource")
+
+ description: str
+
+ end_date: datetime = FieldInfo(alias="endDate")
+
+ event_type: str = FieldInfo(alias="eventType")
+
+ is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
+ """Whether event is a single point in time or a time range."""
+
+ linked_url: str = FieldInfo(alias="linkedUrl")
+
+ start_date: datetime = FieldInfo(alias="startDate")
+
+
+class MetaConfidenceInfo(BaseModel):
+ annotations: List[MetaConfidenceInfoAnnotation]
+
+ level: int
+ """Provides an indication of how much confidence Cloudflare has in the data."""
+
+
+class MetaDateRange(BaseModel):
+ end_time: datetime = FieldInfo(alias="endTime")
+ """Adjusted end of date range."""
+
+ start_time: datetime = FieldInfo(alias="startTime")
+ """Adjusted start of date range."""
+
+
+class MetaUnit(BaseModel):
+ name: str
+
+ value: str
+
+
+class Meta(BaseModel):
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
+
+ date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
+
+ last_updated: datetime = FieldInfo(alias="lastUpdated")
+ """Timestamp of the last dataset update."""
+
+ normalization: Literal[
+ "PERCENTAGE",
+ "MIN0_MAX",
+ "MIN_MAX",
+ "RAW_VALUES",
+ "PERCENTAGE_CHANGE",
+ "ROLLING_AVERAGE",
+ "OVERLAPPED_PERCENTAGE",
+ "RATIO",
+ ]
+ """Normalization method applied to the results.
+
+ Refer to
+ [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ """
+
+ units: List[MetaUnit]
+ """Measurement units for the results."""
+
+
+class WebCrawlerSummaryResponse(BaseModel):
+ meta: Meta
+ """Metadata for the results."""
+
+ summary_0: Dict[str, str]
diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py
new file mode 100644
index 00000000000..fe3831f14cd
--- /dev/null
+++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py
@@ -0,0 +1,50 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["WebCrawlerTimeseriesGroupsParams"]
+
+
+class WebCrawlerTimeseriesGroupsParams(TypedDict, total=False):
+ agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")]
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")]
+ """Filters results by bot operator."""
+
+ date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")]
+ """End of the date range (inclusive)."""
+
+ date_range: Annotated[List[str], PropertyInfo(alias="dateRange")]
+ """Filters results by date range.
+
+ For example, use `7d` and `7dcontrol` to compare this week with the previous
+ week. Use this parameter or set specific start and end dates (`dateStart` and
+ `dateEnd` parameters).
+ """
+
+ date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")]
+ """Start of the date range."""
+
+ format: Literal["JSON", "CSV"]
+ """Format in which results will be returned."""
+
+ limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")]
+ """
+ Limits the number of objects per group to the top items within the specified
+ time range. When item count exceeds the limit, extra items appear grouped under
+ an "other" category.
+ """
+
+ name: List[str]
+ """Array of names used to label the series in the response."""
diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py
new file mode 100644
index 00000000000..cefd53bd22f
--- /dev/null
+++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = [
+ "WebCrawlerTimeseriesGroupsResponse",
+ "Meta",
+ "MetaConfidenceInfo",
+ "MetaConfidenceInfoAnnotation",
+ "MetaDateRange",
+ "MetaUnit",
+ "Serie0",
+]
+
+
+class MetaConfidenceInfoAnnotation(BaseModel):
+ data_source: str = FieldInfo(alias="dataSource")
+
+ description: str
+
+ end_date: datetime = FieldInfo(alias="endDate")
+
+ event_type: str = FieldInfo(alias="eventType")
+
+ is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
+ """Whether event is a single point in time or a time range."""
+
+ linked_url: str = FieldInfo(alias="linkedUrl")
+
+ start_date: datetime = FieldInfo(alias="startDate")
+
+
+class MetaConfidenceInfo(BaseModel):
+ annotations: List[MetaConfidenceInfoAnnotation]
+
+ level: int
+ """Provides an indication of how much confidence Cloudflare has in the data."""
+
+
+class MetaDateRange(BaseModel):
+ end_time: datetime = FieldInfo(alias="endTime")
+ """Adjusted end of date range."""
+
+ start_time: datetime = FieldInfo(alias="startTime")
+ """Adjusted start of date range."""
+
+
+class MetaUnit(BaseModel):
+ name: str
+
+ value: str
+
+
+class Meta(BaseModel):
+ agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo(
+ alias="aggInterval"
+ )
+ """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+
+ Refer to
+ [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ """
+
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
+
+ date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
+
+ last_updated: datetime = FieldInfo(alias="lastUpdated")
+ """Timestamp of the last dataset update."""
+
+ normalization: Literal[
+ "PERCENTAGE",
+ "MIN0_MAX",
+ "MIN_MAX",
+ "RAW_VALUES",
+ "PERCENTAGE_CHANGE",
+ "ROLLING_AVERAGE",
+ "OVERLAPPED_PERCENTAGE",
+ "RATIO",
+ ]
+ """Normalization method applied to the results.
+
+ Refer to
+ [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ """
+
+ units: List[MetaUnit]
+ """Measurement units for the results."""
+
+
+class Serie0(BaseModel):
+ timestamps: List[datetime]
+
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+ if TYPE_CHECKING:
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> List[str]: ...
+
+
+class WebCrawlerTimeseriesGroupsResponse(BaseModel):
+ meta: Meta
+ """Metadata for the results."""
+
+ serie_0: Serie0
diff --git a/src/cloudflare/types/radar/dns/summary_cache_hit_response.py b/src/cloudflare/types/radar/dns/summary_cache_hit_response.py
index 8be64b8e267..1ff38d51bff 100644
--- a/src/cloudflare/types/radar/dns/summary_cache_hit_response.py
+++ b/src/cloudflare/types/radar/dns/summary_cache_hit_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py
index ab107386ba2..3e2121d5baf 100644
--- a/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py
+++ b/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py
index 4eac2ea6945..fe20b783db2 100644
--- a/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py
+++ b/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_response.py
index a902284fbbb..d00570c37bd 100644
--- a/src/cloudflare/types/radar/dns/summary_dnssec_response.py
+++ b/src/cloudflare/types/radar/dns/summary_dnssec_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_ip_version_response.py b/src/cloudflare/types/radar/dns/summary_ip_version_response.py
index 5ade97ddc23..a27d807be2a 100644
--- a/src/cloudflare/types/radar/dns/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/dns/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_matching_answer_response.py b/src/cloudflare/types/radar/dns/summary_matching_answer_response.py
index 9b88202cfa9..e672e23907b 100644
--- a/src/cloudflare/types/radar/dns/summary_matching_answer_response.py
+++ b/src/cloudflare/types/radar/dns/summary_matching_answer_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_protocol_response.py b/src/cloudflare/types/radar/dns/summary_protocol_response.py
index da6b44a7151..ccbbb014efa 100644
--- a/src/cloudflare/types/radar/dns/summary_protocol_response.py
+++ b/src/cloudflare/types/radar/dns/summary_protocol_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_query_type_response.py b/src/cloudflare/types/radar/dns/summary_query_type_response.py
index b1515b5fada..aa517e5d4e4 100644
--- a/src/cloudflare/types/radar/dns/summary_query_type_response.py
+++ b/src/cloudflare/types/radar/dns/summary_query_type_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_response_code_response.py b/src/cloudflare/types/radar/dns/summary_response_code_response.py
index 6062b9f7cf7..a18d3d27514 100644
--- a/src/cloudflare/types/radar/dns/summary_response_code_response.py
+++ b/src/cloudflare/types/radar/dns/summary_response_code_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -57,7 +57,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/summary_response_ttl_response.py b/src/cloudflare/types/radar/dns/summary_response_ttl_response.py
index 41994cccc65..5fca1ceb680 100644
--- a/src/cloudflare/types/radar/dns/summary_response_ttl_response.py
+++ b/src/cloudflare/types/radar/dns/summary_response_ttl_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py b/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py
index 4240248af6a..29144452c39 100644
--- a/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py
+++ b/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py b/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py
index 5925803e452..eb62257cb18 100644
--- a/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py
+++ b/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py
index 64f06be307e..29e59a67962 100644
--- a/src/cloudflare/types/radar/dns_timeseries_response.py
+++ b/src/cloudflare/types/radar/dns_timeseries_response.py
@@ -1,13 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-from .dns_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item
__all__ = [
"DNSTimeseriesResponse",
@@ -16,6 +15,7 @@
"MetaConfidenceInfoAnnotation",
"MetaDateRange",
"MetaUnit",
+ "DNSTimeseriesResponseItem",
]
@@ -94,12 +94,19 @@ class Meta(BaseModel):
"""Measurement units for the results."""
+class DNSTimeseriesResponseItem(BaseModel):
+ timestamps: List[datetime]
+
+ values: List[str]
+
+
class DNSTimeseriesResponse(BaseModel):
meta: Meta
"""Metadata for the results."""
+ __pydantic_extra__: Dict[str, DNSTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
- def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ...
+ def __getattr__(self, attr: str) -> DNSTimeseriesResponseItem: ...
diff --git a/src/cloudflare/types/radar/email/routing/summary_arc_response.py b/src/cloudflare/types/radar/email/routing/summary_arc_response.py
index 3ae3cd48245..270d0c51980 100644
--- a/src/cloudflare/types/radar/email/routing/summary_arc_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_arc_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py
index b5f22259c95..0aaf43bb7e6 100644
--- a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py
index ca4ac4a0d00..f563b39160f 100644
--- a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py
index e9fb924c13c..69729f37233 100644
--- a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py
index b121482480f..fd840c4213d 100644
--- a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/routing/summary_spf_response.py b/src/cloudflare/types/radar/email/routing/summary_spf_response.py
index 3ad9edc35f5..e4224eb9e3c 100644
--- a/src/cloudflare/types/radar/email/routing/summary_spf_response.py
+++ b/src/cloudflare/types/radar/email/routing/summary_spf_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_arc_response.py b/src/cloudflare/types/radar/email/security/summary_arc_response.py
index 3ae3cd48245..270d0c51980 100644
--- a/src/cloudflare/types/radar/email/security/summary_arc_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_arc_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_dkim_response.py b/src/cloudflare/types/radar/email/security/summary_dkim_response.py
index b5f22259c95..0aaf43bb7e6 100644
--- a/src/cloudflare/types/radar/email/security/summary_dkim_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_dkim_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py
index ca4ac4a0d00..f563b39160f 100644
--- a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_malicious_response.py b/src/cloudflare/types/radar/email/security/summary_malicious_response.py
index 2015166596d..89de9fb0d03 100644
--- a/src/cloudflare/types/radar/email/security/summary_malicious_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_malicious_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_spam_response.py b/src/cloudflare/types/radar/email/security/summary_spam_response.py
index ca258d7eea1..2f7fe8474f9 100644
--- a/src/cloudflare/types/radar/email/security/summary_spam_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_spam_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_spf_response.py b/src/cloudflare/types/radar/email/security/summary_spf_response.py
index 3ad9edc35f5..e4224eb9e3c 100644
--- a/src/cloudflare/types/radar/email/security/summary_spf_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_spf_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_spoof_response.py b/src/cloudflare/types/radar/email/security/summary_spoof_response.py
index 76799ed3118..042ac26e0ee 100644
--- a/src/cloudflare/types/radar/email/security/summary_spoof_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_spoof_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py
index 713b5e20eaf..f61c24afe60 100644
--- a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py
index c722089d9ab..d3d2fc268b6 100644
--- a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py
+++ b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/entities/asn_get_response.py b/src/cloudflare/types/radar/entities/asn_get_response.py
index 211edb79618..91682548ba1 100644
--- a/src/cloudflare/types/radar/entities/asn_get_response.py
+++ b/src/cloudflare/types/radar/entities/asn_get_response.py
@@ -60,9 +60,6 @@ class ASN(BaseModel):
aka: Optional[str] = None
- name_long: Optional[str] = FieldInfo(alias="nameLong", default=None)
- """Deprecated field. Please use 'aka'."""
-
class ASNGetResponse(BaseModel):
asn: ASN
diff --git a/src/cloudflare/types/radar/entities/asn_ip_response.py b/src/cloudflare/types/radar/entities/asn_ip_response.py
index 9cf0df4ecb7..6a26dc3d92c 100644
--- a/src/cloudflare/types/radar/entities/asn_ip_response.py
+++ b/src/cloudflare/types/radar/entities/asn_ip_response.py
@@ -58,9 +58,6 @@ class ASN(BaseModel):
aka: Optional[str] = None
- name_long: Optional[str] = FieldInfo(alias="nameLong", default=None)
- """Deprecated field. Please use 'aka'."""
-
class ASNIPResponse(BaseModel):
asn: ASN
diff --git a/src/cloudflare/types/radar/entities/asn_list_response.py b/src/cloudflare/types/radar/entities/asn_list_response.py
index 8ab3d93b80b..9a6d5b811ca 100644
--- a/src/cloudflare/types/radar/entities/asn_list_response.py
+++ b/src/cloudflare/types/radar/entities/asn_list_response.py
@@ -20,9 +20,6 @@ class ASN(BaseModel):
aka: Optional[str] = None
- name_long: Optional[str] = FieldInfo(alias="nameLong", default=None)
- """Deprecated field. Please use 'aka'."""
-
org_name: Optional[str] = FieldInfo(alias="orgName", default=None)
website: Optional[str] = None
diff --git a/src/cloudflare/types/radar/http/summary_bot_class_response.py b/src/cloudflare/types/radar/http/summary_bot_class_response.py
index 558d9f18035..a693a205958 100644
--- a/src/cloudflare/types/radar/http/summary_bot_class_response.py
+++ b/src/cloudflare/types/radar/http/summary_bot_class_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_device_type_response.py b/src/cloudflare/types/radar/http/summary_device_type_response.py
index 61310a25d7b..7a7fc1abbb7 100644
--- a/src/cloudflare/types/radar/http/summary_device_type_response.py
+++ b/src/cloudflare/types/radar/http/summary_device_type_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_http_protocol_response.py b/src/cloudflare/types/radar/http/summary_http_protocol_response.py
index 0e24e5c999d..13864ee1c85 100644
--- a/src/cloudflare/types/radar/http/summary_http_protocol_response.py
+++ b/src/cloudflare/types/radar/http/summary_http_protocol_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_http_version_response.py b/src/cloudflare/types/radar/http/summary_http_version_response.py
index 1a9b81e4d6c..457a6443071 100644
--- a/src/cloudflare/types/radar/http/summary_http_version_response.py
+++ b/src/cloudflare/types/radar/http/summary_http_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_ip_version_response.py b/src/cloudflare/types/radar/http/summary_ip_version_response.py
index 5ade97ddc23..a27d807be2a 100644
--- a/src/cloudflare/types/radar/http/summary_ip_version_response.py
+++ b/src/cloudflare/types/radar/http/summary_ip_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_os_response.py b/src/cloudflare/types/radar/http/summary_os_response.py
index e3a74c1cd32..3f4d5f7845d 100644
--- a/src/cloudflare/types/radar/http/summary_os_response.py
+++ b/src/cloudflare/types/radar/http/summary_os_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_response.py b/src/cloudflare/types/radar/http/summary_post_quantum_response.py
index f34f5dbae04..b6151411032 100644
--- a/src/cloudflare/types/radar/http/summary_post_quantum_response.py
+++ b/src/cloudflare/types/radar/http/summary_post_quantum_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/summary_tls_version_response.py b/src/cloudflare/types/radar/http/summary_tls_version_response.py
index 97e9f0b27cb..f253c47cf92 100644
--- a/src/cloudflare/types/radar/http/summary_tls_version_response.py
+++ b/src/cloudflare/types/radar/http/summary_tls_version_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py b/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py
index 6208810f399..42382ad6a68 100644
--- a/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py
+++ b/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_response.py b/src/cloudflare/types/radar/http/timeseries_group_browser_response.py
index e594533b685..2742df8a463 100644
--- a/src/cloudflare/types/radar/http/timeseries_group_browser_response.py
+++ b/src/cloudflare/types/radar/http/timeseries_group_browser_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/http/timeseries_group_os_response.py b/src/cloudflare/types/radar/http/timeseries_group_os_response.py
index a6aa9c38b9a..c8131e4bf37 100644
--- a/src/cloudflare/types/radar/http/timeseries_group_os_response.py
+++ b/src/cloudflare/types/radar/http/timeseries_group_os_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py
index a756b7bdeca..b0e939292ae 100644
--- a/src/cloudflare/types/radar/http_timeseries_response.py
+++ b/src/cloudflare/types/radar/http_timeseries_response.py
@@ -1,13 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List
+from typing import TYPE_CHECKING, Dict, List
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-from .http_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item
__all__ = [
"HTTPTimeseriesResponse",
@@ -16,6 +15,7 @@
"MetaConfidenceInfoAnnotation",
"MetaDateRange",
"MetaUnit",
+ "HTTPTimeseriesResponseItem",
]
@@ -94,12 +94,19 @@ class Meta(BaseModel):
"""Measurement units for the results."""
+class HTTPTimeseriesResponseItem(BaseModel):
+ timestamps: List[datetime]
+
+ values: List[str]
+
+
class HTTPTimeseriesResponse(BaseModel):
meta: Meta
"""Metadata for the results."""
+ __pydantic_extra__: Dict[str, HTTPTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
- def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ...
+ def __getattr__(self, attr: str) -> HTTPTimeseriesResponseItem: ...
diff --git a/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py b/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py
index 558d9f18035..a693a205958 100644
--- a/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py
+++ b/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py b/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py
index 6ff324a28d8..e940ff9c2c3 100644
--- a/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py
+++ b/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/netflow_summary_response.py b/src/cloudflare/types/radar/netflow_summary_response.py
index 0daf646347e..d17b5019482 100644
--- a/src/cloudflare/types/radar/netflow_summary_response.py
+++ b/src/cloudflare/types/radar/netflow_summary_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/quality/iqi_summary_response.py b/src/cloudflare/types/radar/quality/iqi_summary_response.py
index 05764affc48..3c6cbfbee30 100644
--- a/src/cloudflare/types/radar/quality/iqi_summary_response.py
+++ b/src/cloudflare/types/radar/quality/iqi_summary_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/quality/speed_histogram_response.py b/src/cloudflare/types/radar/quality/speed_histogram_response.py
index 620208648bc..421a328f4f8 100644
--- a/src/cloudflare/types/radar/quality/speed_histogram_response.py
+++ b/src/cloudflare/types/radar/quality/speed_histogram_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -69,7 +69,7 @@ class Meta(BaseModel):
bucket_size: int = FieldInfo(alias="bucketSize")
"""The width for every bucket in the histogram."""
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/quality/speed_summary_response.py b/src/cloudflare/types/radar/quality/speed_summary_response.py
index 51704e28746..72c8ca48882 100644
--- a/src/cloudflare/types/radar/quality/speed_summary_response.py
+++ b/src/cloudflare/types/radar/quality/speed_summary_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py b/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py
index c701e25c647..1ada971f603 100644
--- a/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py
+++ b/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List, Union
+from typing import TYPE_CHECKING, Dict, List, Union
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[Union[str, float]]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/ranking_timeseries_groups_response.py b/src/cloudflare/types/radar/ranking_timeseries_groups_response.py
index 109b0c8f1ee..801113ffbd6 100644
--- a/src/cloudflare/types/radar/ranking_timeseries_groups_response.py
+++ b/src/cloudflare/types/radar/ranking_timeseries_groups_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import TYPE_CHECKING, List, Union
+from typing import TYPE_CHECKING, Dict, List, Union
from datetime import datetime
from typing_extensions import Literal
@@ -97,6 +97,7 @@ class Meta(BaseModel):
class Serie0(BaseModel):
timestamps: List[datetime]
+ __pydantic_extra__: Dict[str, List[Union[str, float]]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
diff --git a/src/cloudflare/types/radar/search_global_params.py b/src/cloudflare/types/radar/search_global_params.py
index e0b1c49791a..2fb60289a14 100644
--- a/src/cloudflare/types/radar/search_global_params.py
+++ b/src/cloudflare/types/radar/search_global_params.py
@@ -12,15 +12,15 @@
class SearchGlobalParams(TypedDict, total=False):
query: Required[str]
- """Search for locations, autonomous systems and reports."""
+ """String used to perform the search operation."""
- exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]]
+ exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
"""Search types excluded from results."""
format: Literal["JSON", "CSV"]
"""Format in which results will be returned."""
- include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]]
+ include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]]
"""Search types included in results."""
limit: int
diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py
index a0fc24ac0a5..818c1fb5491 100644
--- a/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py
+++ b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from datetime import datetime
from typing_extensions import Literal
@@ -58,7 +58,7 @@ class MetaUnit(BaseModel):
class Meta(BaseModel):
- confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
+ confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo")
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
diff --git a/src/cloudflare/types/rate_limits/rate_limit.py b/src/cloudflare/types/rate_limits/rate_limit.py
index 24cc1540a32..301fed3c9e5 100644
--- a/src/cloudflare/types/rate_limits/rate_limit.py
+++ b/src/cloudflare/types/rate_limits/rate_limit.py
@@ -123,7 +123,7 @@ class RateLimit(BaseModel):
"""
description: Optional[str] = None
- """An informative summary of the rate limit.
+ """An informative summary of the rule.
This value is sanitized and any tags will be removed.
"""
diff --git a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py
index 077f6303106..c2901e3cb71 100644
--- a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py
+++ b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py
@@ -132,7 +132,7 @@ class RateLimitDeleteResponse(BaseModel):
"""
description: Optional[str] = None
- """An informative summary of the rate limit.
+ """An informative summary of the rule.
This value is sanitized and any tags will be removed.
"""
diff --git a/src/cloudflare/types/request_tracers/trace_create_response.py b/src/cloudflare/types/request_tracers/trace_create_response.py
index 3e72c080e9a..e0de5dc7c3f 100644
--- a/src/cloudflare/types/request_tracers/trace_create_response.py
+++ b/src/cloudflare/types/request_tracers/trace_create_response.py
@@ -4,7 +4,6 @@
from typing import Optional
-from ..._compat import PYDANTIC_V2
from ..._models import BaseModel
__all__ = ["TraceCreateResponse"]
@@ -18,8 +17,3 @@ class TraceCreateResponse(BaseModel):
from .trace import Trace
-
-if PYDANTIC_V2:
- TraceCreateResponse.model_rebuild()
-else:
- TraceCreateResponse.update_forward_refs() # type: ignore
diff --git a/src/cloudflare/types/request_tracers/trace_item.py b/src/cloudflare/types/request_tracers/trace_item.py
index 2830764115e..905e57991f8 100644
--- a/src/cloudflare/types/request_tracers/trace_item.py
+++ b/src/cloudflare/types/request_tracers/trace_item.py
@@ -4,7 +4,6 @@
from typing import Optional
-from ..._compat import PYDANTIC_V2
from ..._models import BaseModel
__all__ = ["TraceItem"]
@@ -42,8 +41,3 @@ class TraceItem(BaseModel):
from .trace import Trace
-
-if PYDANTIC_V2:
- TraceItem.model_rebuild()
-else:
- TraceItem.update_forward_refs() # type: ignore
diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py
index 690a2c33dfd..acf74d925f6 100644
--- a/src/cloudflare/types/rules/__init__.py
+++ b/src/cloudflare/types/rules/__init__.py
@@ -2,13 +2,11 @@
from __future__ import annotations
-from .hostname import Hostname as Hostname
-from .redirect import Redirect as Redirect
+from .lists_list import ListsList as ListsList
from .hostname_param import HostnameParam as HostnameParam
from .redirect_param import RedirectParam as RedirectParam
from .list_get_response import ListGetResponse as ListGetResponse
from .list_create_params import ListCreateParams as ListCreateParams
-from .list_list_response import ListListResponse as ListListResponse
from .list_update_params import ListUpdateParams as ListUpdateParams
from .list_create_response import ListCreateResponse as ListCreateResponse
from .list_delete_response import ListDeleteResponse as ListDeleteResponse
diff --git a/src/cloudflare/types/rules/hostname.py b/src/cloudflare/types/rules/hostname.py
deleted file mode 100644
index 32d7ce459a9..00000000000
--- a/src/cloudflare/types/rules/hostname.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ..._models import BaseModel
-
-__all__ = ["Hostname"]
-
-
-class Hostname(BaseModel):
- url_hostname: str
diff --git a/src/cloudflare/types/rules/hostname_param.py b/src/cloudflare/types/rules/hostname_param.py
index 280651700b2..8ce946d11f1 100644
--- a/src/cloudflare/types/rules/hostname_param.py
+++ b/src/cloudflare/types/rules/hostname_param.py
@@ -9,3 +9,10 @@
class HostnameParam(TypedDict, total=False):
url_hostname: Required[str]
+
+ exclude_exact_hostname: bool
+ """Only applies to wildcard hostnames (e.g., \\**.example.com).
+
+ When true (default), only subdomains are blocked. When false, both the root
+ domain and subdomains are blocked.
+ """
diff --git a/src/cloudflare/types/rules/list_create_params.py b/src/cloudflare/types/rules/list_create_params.py
index ce63cae4783..a0ecda97394 100644
--- a/src/cloudflare/types/rules/list_create_params.py
+++ b/src/cloudflare/types/rules/list_create_params.py
@@ -9,7 +9,7 @@
class ListCreateParams(TypedDict, total=False):
account_id: Required[str]
- """Defines an identifier."""
+ """The Account ID for this resource."""
kind: Required[Literal["ip", "redirect", "hostname", "asn"]]
"""The type of the list.
diff --git a/src/cloudflare/types/rules/list_create_response.py b/src/cloudflare/types/rules/list_create_response.py
index 7713629dcf5..de16c3a9099 100644
--- a/src/cloudflare/types/rules/list_create_response.py
+++ b/src/cloudflare/types/rules/list_create_response.py
@@ -1,71 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
+from typing import Optional
+from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["ListCreateResponse", "UnionMember0", "UnionMember1"]
+__all__ = ["ListCreateResponse"]
-class UnionMember0(BaseModel):
- id: Optional[str] = None
+class ListCreateResponse(BaseModel):
+ id: str
"""The unique ID of the list."""
- created_on: Optional[str] = None
+ created_on: str
"""The RFC 3339 timestamp of when the list was created."""
- description: Optional[str] = None
- """An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
+ kind: Literal["ip", "redirect", "hostname", "asn"]
"""The type of the list.
Each type supports specific list items (IP addresses, ASNs, hostnames or
redirects).
"""
- modified_on: Optional[str] = None
+ modified_on: str
"""The RFC 3339 timestamp of when the list was last modified."""
- name: Optional[str] = None
+ name: str
"""An informative name for the list. Use this name in filter and rule expressions."""
- num_items: Optional[float] = None
+ num_items: float
"""The number of items in the list."""
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-class UnionMember1(BaseModel):
- id: Optional[str] = None
- """The unique ID of the list."""
-
- created_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was created."""
+ num_referencing_filters: float
+ """The number of [filters](/api/resources/filters/) referencing the list."""
description: Optional[str] = None
"""An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
- """The type of the list.
-
- Each type supports specific list items (IP addresses, ASNs, hostnames or
- redirects).
- """
-
- modified_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was last modified."""
-
- name: Optional[str] = None
- """An informative name for the list. Use this name in filter and rule expressions."""
-
- num_items: Optional[float] = None
- """The number of items in the list."""
-
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-ListCreateResponse: TypeAlias = Union[UnionMember0, UnionMember1]
diff --git a/src/cloudflare/types/rules/list_delete_response.py b/src/cloudflare/types/rules/list_delete_response.py
index c07f0892236..eab287e168d 100644
--- a/src/cloudflare/types/rules/list_delete_response.py
+++ b/src/cloudflare/types/rules/list_delete_response.py
@@ -1,16 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
from ..._models import BaseModel
-__all__ = ["ListDeleteResponse", "ID"]
-
-
-class ID(BaseModel):
- id: Optional[str] = None
- """Defines the unique ID of the item in the List."""
+__all__ = ["ListDeleteResponse"]
-ListDeleteResponse: TypeAlias = Union[ID, ID]
+class ListDeleteResponse(BaseModel):
+ id: str
+ """The unique ID of the list."""
diff --git a/src/cloudflare/types/rules/list_get_response.py b/src/cloudflare/types/rules/list_get_response.py
index 413789f3e51..7ae2c6a849b 100644
--- a/src/cloudflare/types/rules/list_get_response.py
+++ b/src/cloudflare/types/rules/list_get_response.py
@@ -1,71 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
+from typing import Optional
+from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["ListGetResponse", "UnionMember0", "UnionMember1"]
+__all__ = ["ListGetResponse"]
-class UnionMember0(BaseModel):
- id: Optional[str] = None
+class ListGetResponse(BaseModel):
+ id: str
"""The unique ID of the list."""
- created_on: Optional[str] = None
+ created_on: str
"""The RFC 3339 timestamp of when the list was created."""
- description: Optional[str] = None
- """An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
+ kind: Literal["ip", "redirect", "hostname", "asn"]
"""The type of the list.
Each type supports specific list items (IP addresses, ASNs, hostnames or
redirects).
"""
- modified_on: Optional[str] = None
+ modified_on: str
"""The RFC 3339 timestamp of when the list was last modified."""
- name: Optional[str] = None
+ name: str
"""An informative name for the list. Use this name in filter and rule expressions."""
- num_items: Optional[float] = None
+ num_items: float
"""The number of items in the list."""
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-class UnionMember1(BaseModel):
- id: Optional[str] = None
- """The unique ID of the list."""
-
- created_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was created."""
+ num_referencing_filters: float
+ """The number of [filters](/api/resources/filters/) referencing the list."""
description: Optional[str] = None
"""An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
- """The type of the list.
-
- Each type supports specific list items (IP addresses, ASNs, hostnames or
- redirects).
- """
-
- modified_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was last modified."""
-
- name: Optional[str] = None
- """An informative name for the list. Use this name in filter and rule expressions."""
-
- num_items: Optional[float] = None
- """The number of items in the list."""
-
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-ListGetResponse: TypeAlias = Union[UnionMember0, UnionMember1]
diff --git a/src/cloudflare/types/rules/list_list_response.py b/src/cloudflare/types/rules/list_list_response.py
deleted file mode 100644
index 4f7368f9fae..00000000000
--- a/src/cloudflare/types/rules/list_list_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Union
-from typing_extensions import TypeAlias
-
-__all__ = ["ListListResponse"]
-
-ListListResponse: TypeAlias = Union[List[object], object]
diff --git a/src/cloudflare/types/rules/list_update_params.py b/src/cloudflare/types/rules/list_update_params.py
index e680941bec2..1b37842360b 100644
--- a/src/cloudflare/types/rules/list_update_params.py
+++ b/src/cloudflare/types/rules/list_update_params.py
@@ -9,7 +9,7 @@
class ListUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Defines an identifier."""
+ """The Account ID for this resource."""
description: str
"""An informative summary of the list."""
diff --git a/src/cloudflare/types/rules/list_update_response.py b/src/cloudflare/types/rules/list_update_response.py
index acec92410d8..5339175eb58 100644
--- a/src/cloudflare/types/rules/list_update_response.py
+++ b/src/cloudflare/types/rules/list_update_response.py
@@ -1,71 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
+from typing import Optional
+from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["ListUpdateResponse", "UnionMember0", "UnionMember1"]
+__all__ = ["ListUpdateResponse"]
-class UnionMember0(BaseModel):
- id: Optional[str] = None
+class ListUpdateResponse(BaseModel):
+ id: str
"""The unique ID of the list."""
- created_on: Optional[str] = None
+ created_on: str
"""The RFC 3339 timestamp of when the list was created."""
- description: Optional[str] = None
- """An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
+ kind: Literal["ip", "redirect", "hostname", "asn"]
"""The type of the list.
Each type supports specific list items (IP addresses, ASNs, hostnames or
redirects).
"""
- modified_on: Optional[str] = None
+ modified_on: str
"""The RFC 3339 timestamp of when the list was last modified."""
- name: Optional[str] = None
+ name: str
"""An informative name for the list. Use this name in filter and rule expressions."""
- num_items: Optional[float] = None
+ num_items: float
"""The number of items in the list."""
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-class UnionMember1(BaseModel):
- id: Optional[str] = None
- """The unique ID of the list."""
-
- created_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was created."""
+ num_referencing_filters: float
+ """The number of [filters](/api/resources/filters/) referencing the list."""
description: Optional[str] = None
"""An informative summary of the list."""
-
- kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None
- """The type of the list.
-
- Each type supports specific list items (IP addresses, ASNs, hostnames or
- redirects).
- """
-
- modified_on: Optional[str] = None
- """The RFC 3339 timestamp of when the list was last modified."""
-
- name: Optional[str] = None
- """An informative name for the list. Use this name in filter and rule expressions."""
-
- num_items: Optional[float] = None
- """The number of items in the list."""
-
- num_referencing_filters: Optional[float] = None
- """The number of [filters](/operations/filters-list-filters) referencing the list."""
-
-
-ListUpdateResponse: TypeAlias = Union[UnionMember0, UnionMember1]
diff --git a/src/cloudflare/types/rules/lists/__init__.py b/src/cloudflare/types/rules/lists/__init__.py
index dfaf9a6adcf..9dec9aa00cf 100644
--- a/src/cloudflare/types/rules/lists/__init__.py
+++ b/src/cloudflare/types/rules/lists/__init__.py
@@ -4,9 +4,8 @@
from .list_cursor import ListCursor as ListCursor
from .item_list_params import ItemListParams as ItemListParams
-from .item_get_response import ItemGetResponse as ItemGetResponse
from .item_create_params import ItemCreateParams as ItemCreateParams
-from .item_list_response import ItemListResponse as ItemListResponse
+from .item_delete_params import ItemDeleteParams as ItemDeleteParams
from .item_update_params import ItemUpdateParams as ItemUpdateParams
from .item_create_response import ItemCreateResponse as ItemCreateResponse
from .item_delete_response import ItemDeleteResponse as ItemDeleteResponse
diff --git a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py
index 18bb4058110..47b595ff560 100644
--- a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py
+++ b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py
@@ -1,39 +1,51 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
+from typing import Union
from typing_extensions import Literal, TypeAlias
from ...._models import BaseModel
-__all__ = ["BulkOperationGetResponse", "UnionMember0", "UnionMember1"]
+__all__ = [
+ "BulkOperationGetResponse",
+ "ListsBulkOperationPendingOrRunning",
+ "ListsBulkOperationCompleted",
+ "ListsBulkOperationFailed",
+]
-class UnionMember0(BaseModel):
- id: Optional[str] = None
+class ListsBulkOperationPendingOrRunning(BaseModel):
+ id: str
"""The unique operation ID of the asynchronous action."""
- completed: Optional[str] = None
- """The RFC 3339 timestamp of when the operation was completed."""
+ status: Literal["pending", "running"]
+ """The current status of the asynchronous operation."""
- error: Optional[str] = None
- """A message describing the error when the status is `failed`."""
- status: Optional[Literal["pending", "running", "completed", "failed"]] = None
+class ListsBulkOperationCompleted(BaseModel):
+ id: str
+ """The unique operation ID of the asynchronous action."""
+
+ completed: str
+ """The RFC 3339 timestamp of when the operation was completed."""
+
+ status: Literal["completed"]
"""The current status of the asynchronous operation."""
-class UnionMember1(BaseModel):
- id: Optional[str] = None
+class ListsBulkOperationFailed(BaseModel):
+ id: str
"""The unique operation ID of the asynchronous action."""
- completed: Optional[str] = None
+ completed: str
"""The RFC 3339 timestamp of when the operation was completed."""
- error: Optional[str] = None
+ error: str
"""A message describing the error when the status is `failed`."""
- status: Optional[Literal["pending", "running", "completed", "failed"]] = None
+ status: Literal["failed"]
"""The current status of the asynchronous operation."""
-BulkOperationGetResponse: TypeAlias = Union[UnionMember0, UnionMember1]
+BulkOperationGetResponse: TypeAlias = Union[
+ ListsBulkOperationPendingOrRunning, ListsBulkOperationCompleted, ListsBulkOperationFailed
+]
diff --git a/src/cloudflare/types/rules/lists/item_create_params.py b/src/cloudflare/types/rules/lists/item_create_params.py
index a78b22f5719..d8d4e8646eb 100644
--- a/src/cloudflare/types/rules/lists/item_create_params.py
+++ b/src/cloudflare/types/rules/lists/item_create_params.py
@@ -2,40 +2,67 @@
from __future__ import annotations
-from typing import Iterable
-from typing_extensions import Required, TypedDict
+from typing import Union, Iterable
+from typing_extensions import Required, TypeAlias, TypedDict
from ..hostname_param import HostnameParam
from ..redirect_param import RedirectParam
-__all__ = ["ItemCreateParams", "Body"]
+__all__ = [
+ "ItemCreateParams",
+ "Body",
+ "BodyListsListItemIPComment",
+ "BodyListsListItemRedirectComment",
+ "BodyListsListItemHostnameComment",
+ "BodyListsListItemASNComment",
+]
class ItemCreateParams(TypedDict, total=False):
account_id: Required[str]
- """Defines an identifier."""
+ """The Account ID for this resource."""
body: Required[Iterable[Body]]
-class Body(TypedDict, total=False):
- asn: int
- """Defines a non-negative 32 bit integer."""
+class BodyListsListItemIPComment(TypedDict, total=False):
+ ip: Required[str]
+ """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR."""
comment: str
"""Defines an informative summary of the list item."""
- hostname: HostnameParam
+
+class BodyListsListItemRedirectComment(TypedDict, total=False):
+ redirect: Required[RedirectParam]
+ """The definition of the redirect."""
+
+ comment: str
+ """Defines an informative summary of the list item."""
+
+
+class BodyListsListItemHostnameComment(TypedDict, total=False):
+ hostname: Required[HostnameParam]
"""
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
0 to 9, wildcards (\\**), and the hyphen (-).
"""
- ip: str
- """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR.
+ comment: str
+ """Defines an informative summary of the list item."""
+
- IPv6 CIDRs are limited to a maximum of /64.
- """
+class BodyListsListItemASNComment(TypedDict, total=False):
+ asn: Required[int]
+ """Defines a non-negative 32 bit integer."""
- redirect: RedirectParam
- """The definition of the redirect."""
+ comment: str
+ """Defines an informative summary of the list item."""
+
+
+Body: TypeAlias = Union[
+ BodyListsListItemIPComment,
+ BodyListsListItemRedirectComment,
+ BodyListsListItemHostnameComment,
+ BodyListsListItemASNComment,
+]
diff --git a/src/cloudflare/types/rules/lists/item_create_response.py b/src/cloudflare/types/rules/lists/item_create_response.py
index 9a8590056c4..6598e73dba3 100644
--- a/src/cloudflare/types/rules/lists/item_create_response.py
+++ b/src/cloudflare/types/rules/lists/item_create_response.py
@@ -1,16 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
from ...._models import BaseModel
-__all__ = ["ItemCreateResponse", "OperationID"]
+__all__ = ["ItemCreateResponse"]
-class OperationID(BaseModel):
- operation_id: Optional[str] = None
+class ItemCreateResponse(BaseModel):
+ operation_id: str
"""The unique operation ID of the asynchronous action."""
-
-
-ItemCreateResponse: TypeAlias = Union[OperationID, OperationID]
diff --git a/src/cloudflare/types/rules/lists/item_delete_params.py b/src/cloudflare/types/rules/lists/item_delete_params.py
new file mode 100644
index 00000000000..7557f63a868
--- /dev/null
+++ b/src/cloudflare/types/rules/lists/item_delete_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ItemDeleteParams", "Item"]
+
+
+class ItemDeleteParams(TypedDict, total=False):
+ account_id: Required[str]
+ """The Account ID for this resource."""
+
+ items: Iterable[Item]
+
+
+class Item(TypedDict, total=False):
+ pass
diff --git a/src/cloudflare/types/rules/lists/item_delete_response.py b/src/cloudflare/types/rules/lists/item_delete_response.py
index 79dfdc1ee85..dd46b738ce3 100644
--- a/src/cloudflare/types/rules/lists/item_delete_response.py
+++ b/src/cloudflare/types/rules/lists/item_delete_response.py
@@ -1,16 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
from ...._models import BaseModel
-__all__ = ["ItemDeleteResponse", "OperationID"]
+__all__ = ["ItemDeleteResponse"]
-class OperationID(BaseModel):
- operation_id: Optional[str] = None
+class ItemDeleteResponse(BaseModel):
+ operation_id: str
"""The unique operation ID of the asynchronous action."""
-
-
-ItemDeleteResponse: TypeAlias = Union[OperationID, OperationID]
diff --git a/src/cloudflare/types/rules/lists/item_get_response.py b/src/cloudflare/types/rules/lists/item_get_response.py
deleted file mode 100644
index 6916c32776d..00000000000
--- a/src/cloudflare/types/rules/lists/item_get_response.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
-from ..hostname import Hostname
-from ..redirect import Redirect
-from ...._models import BaseModel
-
-__all__ = ["ItemGetResponse", "UnionMember0", "UnionMember1"]
-
-
-class UnionMember0(BaseModel):
- id: Optional[str] = None
- """The unique ID of the list."""
-
- asn: Optional[int] = None
- """Defines a non-negative 32 bit integer."""
-
- comment: Optional[str] = None
- """Defines an informative summary of the list item."""
-
- created_on: Optional[str] = None
- """The RFC 3339 timestamp of when the item was created."""
-
- hostname: Optional[Hostname] = None
- """
- Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
- 0 to 9, wildcards (\\**), and the hyphen (-).
- """
-
- ip: Optional[str] = None
- """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR.
-
- IPv6 CIDRs are limited to a maximum of /64.
- """
-
- modified_on: Optional[str] = None
- """The RFC 3339 timestamp of when the item was last modified."""
-
- redirect: Optional[Redirect] = None
- """The definition of the redirect."""
-
-
-class UnionMember1(BaseModel):
- id: Optional[str] = None
- """The unique ID of the list."""
-
- asn: Optional[int] = None
- """Defines a non-negative 32 bit integer."""
-
- comment: Optional[str] = None
- """Defines an informative summary of the list item."""
-
- created_on: Optional[str] = None
- """The RFC 3339 timestamp of when the item was created."""
-
- hostname: Optional[Hostname] = None
- """
- Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
- 0 to 9, wildcards (\\**), and the hyphen (-).
- """
-
- ip: Optional[str] = None
- """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR.
-
- IPv6 CIDRs are limited to a maximum of /64.
- """
-
- modified_on: Optional[str] = None
- """The RFC 3339 timestamp of when the item was last modified."""
-
- redirect: Optional[Redirect] = None
- """The definition of the redirect."""
-
-
-ItemGetResponse: TypeAlias = Union[UnionMember0, UnionMember1]
diff --git a/src/cloudflare/types/rules/lists/item_list_params.py b/src/cloudflare/types/rules/lists/item_list_params.py
index 3f63317a5c6..55374a19c0b 100644
--- a/src/cloudflare/types/rules/lists/item_list_params.py
+++ b/src/cloudflare/types/rules/lists/item_list_params.py
@@ -9,7 +9,7 @@
class ItemListParams(TypedDict, total=False):
account_id: Required[str]
- """Defines an identifier."""
+ """The Account ID for this resource."""
cursor: str
"""The pagination cursor.
diff --git a/src/cloudflare/types/rules/lists/item_list_response.py b/src/cloudflare/types/rules/lists/item_list_response.py
deleted file mode 100644
index 7c8f0b665bb..00000000000
--- a/src/cloudflare/types/rules/lists/item_list_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Union
-from typing_extensions import TypeAlias
-
-__all__ = ["ItemListResponse"]
-
-ItemListResponse: TypeAlias = Union[List[object], object]
diff --git a/src/cloudflare/types/rules/lists/item_update_params.py b/src/cloudflare/types/rules/lists/item_update_params.py
index 7d6e79d4f35..f61262a02c8 100644
--- a/src/cloudflare/types/rules/lists/item_update_params.py
+++ b/src/cloudflare/types/rules/lists/item_update_params.py
@@ -2,40 +2,67 @@
from __future__ import annotations
-from typing import Iterable
-from typing_extensions import Required, TypedDict
+from typing import Union, Iterable
+from typing_extensions import Required, TypeAlias, TypedDict
from ..hostname_param import HostnameParam
from ..redirect_param import RedirectParam
-__all__ = ["ItemUpdateParams", "Body"]
+__all__ = [
+ "ItemUpdateParams",
+ "Body",
+ "BodyListsListItemIPComment",
+ "BodyListsListItemRedirectComment",
+ "BodyListsListItemHostnameComment",
+ "BodyListsListItemASNComment",
+]
class ItemUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Defines an identifier."""
+ """The Account ID for this resource."""
body: Required[Iterable[Body]]
-class Body(TypedDict, total=False):
- asn: int
- """Defines a non-negative 32 bit integer."""
+class BodyListsListItemIPComment(TypedDict, total=False):
+ ip: Required[str]
+ """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR."""
comment: str
"""Defines an informative summary of the list item."""
- hostname: HostnameParam
+
+class BodyListsListItemRedirectComment(TypedDict, total=False):
+ redirect: Required[RedirectParam]
+ """The definition of the redirect."""
+
+ comment: str
+ """Defines an informative summary of the list item."""
+
+
+class BodyListsListItemHostnameComment(TypedDict, total=False):
+ hostname: Required[HostnameParam]
"""
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
0 to 9, wildcards (\\**), and the hyphen (-).
"""
- ip: str
- """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR.
+ comment: str
+ """Defines an informative summary of the list item."""
+
- IPv6 CIDRs are limited to a maximum of /64.
- """
+class BodyListsListItemASNComment(TypedDict, total=False):
+ asn: Required[int]
+ """Defines a non-negative 32 bit integer."""
- redirect: RedirectParam
- """The definition of the redirect."""
+ comment: str
+ """Defines an informative summary of the list item."""
+
+
+Body: TypeAlias = Union[
+ BodyListsListItemIPComment,
+ BodyListsListItemRedirectComment,
+ BodyListsListItemHostnameComment,
+ BodyListsListItemASNComment,
+]
diff --git a/src/cloudflare/types/rules/lists/item_update_response.py b/src/cloudflare/types/rules/lists/item_update_response.py
index 54b6729e6cc..9cf29ab1c84 100644
--- a/src/cloudflare/types/rules/lists/item_update_response.py
+++ b/src/cloudflare/types/rules/lists/item_update_response.py
@@ -1,16 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
from ...._models import BaseModel
-__all__ = ["ItemUpdateResponse", "OperationID"]
+__all__ = ["ItemUpdateResponse"]
-class OperationID(BaseModel):
- operation_id: Optional[str] = None
+class ItemUpdateResponse(BaseModel):
+ operation_id: str
"""The unique operation ID of the asynchronous action."""
-
-
-ItemUpdateResponse: TypeAlias = Union[OperationID, OperationID]
diff --git a/src/cloudflare/types/rules/lists_list.py b/src/cloudflare/types/rules/lists_list.py
new file mode 100644
index 00000000000..9c2b7edb8e9
--- /dev/null
+++ b/src/cloudflare/types/rules/lists_list.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["ListsList"]
+
+
+class ListsList(BaseModel):
+ id: str
+ """The unique ID of the list."""
+
+ created_on: str
+ """The RFC 3339 timestamp of when the list was created."""
+
+ kind: Literal["ip", "redirect", "hostname", "asn"]
+ """The type of the list.
+
+ Each type supports specific list items (IP addresses, ASNs, hostnames or
+ redirects).
+ """
+
+ modified_on: str
+ """The RFC 3339 timestamp of when the list was last modified."""
+
+ name: str
+ """An informative name for the list. Use this name in filter and rule expressions."""
+
+ num_items: float
+ """The number of items in the list."""
+
+ num_referencing_filters: float
+ """The number of [filters](/api/resources/filters/) referencing the list."""
+
+ description: Optional[str] = None
+ """An informative summary of the list."""
diff --git a/src/cloudflare/types/rules/redirect.py b/src/cloudflare/types/rules/redirect.py
deleted file mode 100644
index e52def9115b..00000000000
--- a/src/cloudflare/types/rules/redirect.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["Redirect"]
-
-
-class Redirect(BaseModel):
- source_url: str
-
- target_url: str
-
- include_subdomains: Optional[bool] = None
-
- preserve_path_suffix: Optional[bool] = None
-
- preserve_query_string: Optional[bool] = None
-
- status_code: Optional[Literal[301, 302, 307, 308]] = None
-
- subpath_matching: Optional[bool] = None
diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py
index 34df410f1f4..16e6014e17d 100644
--- a/src/cloudflare/types/rulesets/rule_create_params.py
+++ b/src/cloudflare/types/rulesets/rule_create_params.py
@@ -2102,6 +2102,12 @@ class SkipRule(TypedDict, total=False):
class SkipRuleActionParameters(TypedDict, total=False):
+ phase: Literal["current"]
+ """A phase to skip the execution of.
+
+ This property is only compatible with products.
+ """
+
phases: List[Phase]
"""A list of phases to skip the execution of.
@@ -2250,7 +2256,7 @@ class SetCacheSettingsRule(TypedDict, total=False):
class SetCacheSettingsRuleActionParametersBrowserTTL(TypedDict, total=False):
- mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]]
+ mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]]
"""Determines which browser ttl mode to use."""
default: int
diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py
index 31aa6f96dbd..fda9b7dee6b 100644
--- a/src/cloudflare/types/rulesets/rule_edit_params.py
+++ b/src/cloudflare/types/rulesets/rule_edit_params.py
@@ -2144,6 +2144,12 @@ class SkipRule(TypedDict, total=False):
class SkipRuleActionParameters(TypedDict, total=False):
+ phase: Literal["current"]
+ """A phase to skip the execution of.
+
+ This property is only compatible with products.
+ """
+
phases: List[Phase]
"""A list of phases to skip the execution of.
@@ -2295,7 +2301,7 @@ class SetCacheSettingsRule(TypedDict, total=False):
class SetCacheSettingsRuleActionParametersBrowserTTL(TypedDict, total=False):
- mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]]
+ mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]]
"""Determines which browser ttl mode to use."""
default: int
diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule.py b/src/cloudflare/types/rulesets/set_cache_settings_rule.py
index 9f62db2a262..f3db4b5f78b 100644
--- a/src/cloudflare/types/rulesets/set_cache_settings_rule.py
+++ b/src/cloudflare/types/rulesets/set_cache_settings_rule.py
@@ -39,7 +39,7 @@
class ActionParametersBrowserTTL(BaseModel):
- mode: Literal["respect_origin", "bypass_by_default", "override_origin"]
+ mode: Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]
"""Determines which browser ttl mode to use."""
default: Optional[int] = None
diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
index 5bc1c8ef884..d6e3e13afcd 100644
--- a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
+++ b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
@@ -37,7 +37,7 @@
class ActionParametersBrowserTTL(TypedDict, total=False):
- mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]]
+ mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]]
"""Determines which browser ttl mode to use."""
default: int
diff --git a/src/cloudflare/types/rulesets/skip_rule.py b/src/cloudflare/types/rulesets/skip_rule.py
index 0bb2576e6c5..896e1c59b50 100644
--- a/src/cloudflare/types/rulesets/skip_rule.py
+++ b/src/cloudflare/types/rulesets/skip_rule.py
@@ -12,6 +12,12 @@
class ActionParameters(BaseModel):
+ phase: Optional[Literal["current"]] = None
+ """A phase to skip the execution of.
+
+ This property is only compatible with products.
+ """
+
phases: Optional[List[Phase]] = None
"""A list of phases to skip the execution of.
diff --git a/src/cloudflare/types/rulesets/skip_rule_param.py b/src/cloudflare/types/rulesets/skip_rule_param.py
index 95d7e97f80f..589cbf7b70f 100644
--- a/src/cloudflare/types/rulesets/skip_rule_param.py
+++ b/src/cloudflare/types/rulesets/skip_rule_param.py
@@ -12,6 +12,12 @@
class ActionParameters(TypedDict, total=False):
+ phase: Literal["current"]
+ """A phase to skip the execution of.
+
+ This property is only compatible with products.
+ """
+
phases: List[Phase]
"""A list of phases to skip the execution of.
diff --git a/src/cloudflare/types/secrets_store/stores/secret_create_params.py b/src/cloudflare/types/secrets_store/stores/secret_create_params.py
index be779b3e978..78bb82b0a97 100644
--- a/src/cloudflare/types/secrets_store/stores/secret_create_params.py
+++ b/src/cloudflare/types/secrets_store/stores/secret_create_params.py
@@ -28,3 +28,6 @@ class Body(TypedDict, total=False):
Note that this is 'write only' - no API reponse will provide this value, it is
only used to create/modify secrets.
"""
+
+ comment: str
+ """Freeform text describing the secret"""
diff --git a/src/cloudflare/types/secrets_store/stores/secret_duplicate_params.py b/src/cloudflare/types/secrets_store/stores/secret_duplicate_params.py
index c2d7427243f..54520850146 100644
--- a/src/cloudflare/types/secrets_store/stores/secret_duplicate_params.py
+++ b/src/cloudflare/types/secrets_store/stores/secret_duplicate_params.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import List
from typing_extensions import Required, TypedDict
__all__ = ["SecretDuplicateParams"]
@@ -16,3 +17,9 @@ class SecretDuplicateParams(TypedDict, total=False):
name: Required[str]
"""The name of the secret"""
+
+ scopes: Required[List[str]]
+ """The list of services that can use this secret."""
+
+ comment: str
+ """Freeform text describing the secret"""
diff --git a/src/cloudflare/types/secrets_store/stores/secret_edit_params.py b/src/cloudflare/types/secrets_store/stores/secret_edit_params.py
index eb611fc5917..996cfb82e51 100644
--- a/src/cloudflare/types/secrets_store/stores/secret_edit_params.py
+++ b/src/cloudflare/types/secrets_store/stores/secret_edit_params.py
@@ -15,15 +15,8 @@ class SecretEditParams(TypedDict, total=False):
store_id: Required[str]
"""Store Identifier"""
- name: Required[str]
- """The name of the secret"""
+ comment: str
+ """Freeform text describing the secret"""
scopes: List[str]
"""The list of services that can use this secret."""
-
- value: str
- """The value of the secret.
-
- Note that this is 'write only' - no API reponse will provide this value, it is
- only used to create/modify secrets.
- """
diff --git a/src/cloudflare/types/secrets_store/stores/secret_list_params.py b/src/cloudflare/types/secrets_store/stores/secret_list_params.py
index 5a98b11fbd7..0ec20737e4a 100644
--- a/src/cloudflare/types/secrets_store/stores/secret_list_params.py
+++ b/src/cloudflare/types/secrets_store/stores/secret_list_params.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import List, Iterable
from typing_extensions import Literal, Required, TypedDict
__all__ = ["SecretListParams"]
@@ -23,5 +24,8 @@ class SecretListParams(TypedDict, total=False):
per_page: int
"""Number of objects to return per page"""
+ scopes: Iterable[List[str]]
+ """Only secrets with the given scopes will be returned"""
+
search: str
"""Search secrets using a filter string, filtering across name and comment"""
diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py
index 778cb891f5d..c20e4daffd2 100644
--- a/src/cloudflare/types/shared/token_policy.py
+++ b/src/cloudflare/types/shared/token_policy.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Dict, List, Union, Optional
from typing_extensions import Literal
from ..._models import BaseModel
@@ -35,5 +35,5 @@ class TokenPolicy(BaseModel):
permission_groups: List[PermissionGroup]
"""A set of permission groups that are specified to the policy."""
- resources: Dict[str, str]
+ resources: Union[Dict[str, str], Dict[str, Dict[str, str]]]
"""A list of resource names that the policy applies to."""
diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py
index e2a11eec39a..7a6cfd2e9b5 100644
--- a/src/cloudflare/types/shared_params/token_policy.py
+++ b/src/cloudflare/types/shared_params/token_policy.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Iterable
+from typing import Dict, Union, Iterable
from typing_extensions import Literal, Required, TypedDict
__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"]
@@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False):
permission_groups: Required[Iterable[PermissionGroup]]
"""A set of permission groups that are specified to the policy."""
- resources: Required[Dict[str, str]]
+ resources: Required[Union[Dict[str, str], Dict[str, Dict[str, str]]]]
"""A list of resource names that the policy applies to."""
diff --git a/src/cloudflare/types/snippets/__init__.py b/src/cloudflare/types/snippets/__init__.py
index a166150902d..380f54adfbb 100644
--- a/src/cloudflare/types/snippets/__init__.py
+++ b/src/cloudflare/types/snippets/__init__.py
@@ -2,10 +2,13 @@
from __future__ import annotations
-from .snippet import Snippet as Snippet
from .rule_list_response import RuleListResponse as RuleListResponse
from .rule_update_params import RuleUpdateParams as RuleUpdateParams
+from .snippet_list_params import SnippetListParams as SnippetListParams
from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse
from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse
+from .snippet_get_response import SnippetGetResponse as SnippetGetResponse
+from .snippet_list_response import SnippetListResponse as SnippetListResponse
from .snippet_update_params import SnippetUpdateParams as SnippetUpdateParams
from .snippet_delete_response import SnippetDeleteResponse as SnippetDeleteResponse
+from .snippet_update_response import SnippetUpdateResponse as SnippetUpdateResponse
diff --git a/src/cloudflare/types/snippets/rule_delete_response.py b/src/cloudflare/types/snippets/rule_delete_response.py
index 4e1765a3121..c950a953427 100644
--- a/src/cloudflare/types/snippets/rule_delete_response.py
+++ b/src/cloudflare/types/snippets/rule_delete_response.py
@@ -1,18 +1,28 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
-from typing_extensions import Literal
+from typing import Optional
+from datetime import datetime
from ..._models import BaseModel
-from ..shared.response_info import ResponseInfo
__all__ = ["RuleDeleteResponse"]
class RuleDeleteResponse(BaseModel):
- errors: List[ResponseInfo]
+ id: str
+ """The unique ID of the rule."""
- messages: List[ResponseInfo]
+ expression: str
+ """The expression defining which traffic will match the rule."""
- success: Literal[True]
- """Whether the API call was successful"""
+ last_updated: datetime
+ """The timestamp of when the rule was last modified."""
+
+ snippet_name: str
+ """The identifying name of the snippet."""
+
+ description: Optional[str] = None
+ """An informative description of the rule."""
+
+ enabled: Optional[bool] = None
+ """Whether the rule should be executed."""
diff --git a/src/cloudflare/types/snippets/rule_list_response.py b/src/cloudflare/types/snippets/rule_list_response.py
index 63c540e55c7..24b994c9da8 100644
--- a/src/cloudflare/types/snippets/rule_list_response.py
+++ b/src/cloudflare/types/snippets/rule_list_response.py
@@ -1,6 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
+from datetime import datetime
from ..._models import BaseModel
@@ -8,11 +9,20 @@
class RuleListResponse(BaseModel):
- description: Optional[str] = None
+ id: str
+ """The unique ID of the rule."""
- enabled: Optional[bool] = None
+ expression: str
+ """The expression defining which traffic will match the rule."""
+
+ last_updated: datetime
+ """The timestamp of when the rule was last modified."""
- expression: Optional[str] = None
+ snippet_name: str
+ """The identifying name of the snippet."""
- snippet_name: Optional[str] = None
- """Snippet identifying name"""
+ description: Optional[str] = None
+ """An informative description of the rule."""
+
+ enabled: Optional[bool] = None
+ """Whether the rule should be executed."""
diff --git a/src/cloudflare/types/snippets/rule_update_params.py b/src/cloudflare/types/snippets/rule_update_params.py
index a539ccf8213..56171938afa 100644
--- a/src/cloudflare/types/snippets/rule_update_params.py
+++ b/src/cloudflare/types/snippets/rule_update_params.py
@@ -10,18 +10,21 @@
class RuleUpdateParams(TypedDict, total=False):
zone_id: Required[str]
- """Identifier"""
+ """The unique ID of the zone."""
- rules: Iterable[Rule]
- """List of snippet rules"""
+ rules: Required[Iterable[Rule]]
+ """A list of snippet rules."""
class Rule(TypedDict, total=False):
- description: str
+ expression: Required[str]
+ """The expression defining which traffic will match the rule."""
- enabled: bool
+ snippet_name: Required[str]
+ """The identifying name of the snippet."""
- expression: str
+ description: str
+ """An informative description of the rule."""
- snippet_name: str
- """Snippet identifying name"""
+ enabled: bool
+ """Whether the rule should be executed."""
diff --git a/src/cloudflare/types/snippets/rule_update_response.py b/src/cloudflare/types/snippets/rule_update_response.py
index 29121fa03ab..e27e8b9e0b2 100644
--- a/src/cloudflare/types/snippets/rule_update_response.py
+++ b/src/cloudflare/types/snippets/rule_update_response.py
@@ -1,6 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
+from datetime import datetime
from ..._models import BaseModel
@@ -8,11 +9,20 @@
class RuleUpdateResponse(BaseModel):
- description: Optional[str] = None
+ id: str
+ """The unique ID of the rule."""
- enabled: Optional[bool] = None
+ expression: str
+ """The expression defining which traffic will match the rule."""
+
+ last_updated: datetime
+ """The timestamp of when the rule was last modified."""
- expression: Optional[str] = None
+ snippet_name: str
+ """The identifying name of the snippet."""
- snippet_name: Optional[str] = None
- """Snippet identifying name"""
+ description: Optional[str] = None
+ """An informative description of the rule."""
+
+ enabled: Optional[bool] = None
+ """Whether the rule should be executed."""
diff --git a/src/cloudflare/types/snippets/snippet.py b/src/cloudflare/types/snippets/snippet.py
deleted file mode 100644
index 69dc660896e..00000000000
--- a/src/cloudflare/types/snippets/snippet.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ..._models import BaseModel
-
-__all__ = ["Snippet"]
-
-
-class Snippet(BaseModel):
- created_on: Optional[str] = None
- """Creation time of the snippet"""
-
- modified_on: Optional[str] = None
- """Modification time of the snippet"""
-
- snippet_name: Optional[str] = None
- """Snippet identifying name"""
diff --git a/src/cloudflare/types/snippets/snippet_delete_response.py b/src/cloudflare/types/snippets/snippet_delete_response.py
index 6a1b4806d1b..df12b7993ea 100644
--- a/src/cloudflare/types/snippets/snippet_delete_response.py
+++ b/src/cloudflare/types/snippets/snippet_delete_response.py
@@ -1,18 +1,8 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-from ..shared.response_info import ResponseInfo
+from typing import Optional
+from typing_extensions import TypeAlias
__all__ = ["SnippetDeleteResponse"]
-
-class SnippetDeleteResponse(BaseModel):
- errors: List[ResponseInfo]
-
- messages: List[ResponseInfo]
-
- success: Literal[True]
- """Whether the API call was successful"""
+SnippetDeleteResponse: TypeAlias = Optional[str]
diff --git a/src/cloudflare/types/snippets/snippet_get_response.py b/src/cloudflare/types/snippets/snippet_get_response.py
new file mode 100644
index 00000000000..905fc50d1cb
--- /dev/null
+++ b/src/cloudflare/types/snippets/snippet_get_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["SnippetGetResponse"]
+
+
+class SnippetGetResponse(BaseModel):
+ created_on: datetime
+ """The timestamp of when the snippet was created."""
+
+ snippet_name: str
+ """The identifying name of the snippet."""
+
+ modified_on: Optional[datetime] = None
+ """The timestamp of when the snippet was last modified."""
diff --git a/src/cloudflare/types/snippets/snippet_list_params.py b/src/cloudflare/types/snippets/snippet_list_params.py
new file mode 100644
index 00000000000..2415136e4e5
--- /dev/null
+++ b/src/cloudflare/types/snippets/snippet_list_params.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["SnippetListParams"]
+
+
+class SnippetListParams(TypedDict, total=False):
+ zone_id: Required[str]
+ """The unique ID of the zone."""
+
+ page: int
+ """The current page number."""
+
+ per_page: int
+ """The number of results to return per page."""
diff --git a/src/cloudflare/types/snippets/snippet_list_response.py b/src/cloudflare/types/snippets/snippet_list_response.py
new file mode 100644
index 00000000000..9f12aa6bc21
--- /dev/null
+++ b/src/cloudflare/types/snippets/snippet_list_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["SnippetListResponse"]
+
+
+class SnippetListResponse(BaseModel):
+ created_on: datetime
+ """The timestamp of when the snippet was created."""
+
+ snippet_name: str
+ """The identifying name of the snippet."""
+
+ modified_on: Optional[datetime] = None
+ """The timestamp of when the snippet was last modified."""
diff --git a/src/cloudflare/types/snippets/snippet_update_params.py b/src/cloudflare/types/snippets/snippet_update_params.py
index 7f1e3894a00..5145f0db834 100644
--- a/src/cloudflare/types/snippets/snippet_update_params.py
+++ b/src/cloudflare/types/snippets/snippet_update_params.py
@@ -2,21 +2,25 @@
from __future__ import annotations
+from typing import List
from typing_extensions import Required, TypedDict
+from ..._types import FileTypes
+
__all__ = ["SnippetUpdateParams", "Metadata"]
class SnippetUpdateParams(TypedDict, total=False):
zone_id: Required[str]
- """Identifier"""
+ """The unique ID of the zone."""
- files: str
- """Content files of uploaded snippet"""
+ files: Required[List[FileTypes]]
+ """The list of files belonging to the snippet."""
- metadata: Metadata
+ metadata: Required[Metadata]
+ """Metadata about the snippet."""
class Metadata(TypedDict, total=False):
- main_module: str
- """Main module name of uploaded snippet"""
+ main_module: Required[str]
+ """Name of the file that contains the main module of the snippet."""
diff --git a/src/cloudflare/types/snippets/snippet_update_response.py b/src/cloudflare/types/snippets/snippet_update_response.py
new file mode 100644
index 00000000000..664c8fccbe0
--- /dev/null
+++ b/src/cloudflare/types/snippets/snippet_update_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["SnippetUpdateResponse"]
+
+
+class SnippetUpdateResponse(BaseModel):
+ created_on: datetime
+ """The timestamp of when the snippet was created."""
+
+ snippet_name: str
+ """The identifying name of the snippet."""
+
+ modified_on: Optional[datetime] = None
+ """The timestamp of when the snippet was last modified."""
diff --git a/src/cloudflare/types/ssl/recommendation_get_response.py b/src/cloudflare/types/ssl/recommendation_get_response.py
index bf29f2b7368..9a9d74b7e27 100644
--- a/src/cloudflare/types/ssl/recommendation_get_response.py
+++ b/src/cloudflare/types/ssl/recommendation_get_response.py
@@ -10,9 +10,16 @@
class RecommendationGetResponse(BaseModel):
- id: Optional[str] = None
- """Identifier of a recommendation result."""
+ id: str
- modified_on: Optional[datetime] = None
+ editable: bool
+ """Whether this setting can be updated or not."""
- value: Optional[Literal["flexible", "full", "strict"]] = None
+ modified_on: datetime
+ """Last time this setting was modified."""
+
+ value: Literal["auto", "custom"]
+ """Current setting of the automatic SSL/TLS."""
+
+ next_scheduled_scan: Optional[datetime] = None
+ """Next time this zone will be scanned by the Automatic SSL/TLS."""
diff --git a/src/cloudflare/types/stream/clip.py b/src/cloudflare/types/stream/clip.py
index 9c6197aec52..4f3ef0f4fd0 100644
--- a/src/cloudflare/types/stream/clip.py
+++ b/src/cloudflare/types/stream/clip.py
@@ -77,7 +77,9 @@ class Clip(BaseModel):
start_time_seconds: Optional[int] = FieldInfo(alias="startTimeSeconds", default=None)
"""Specifies the start time for the video clip in seconds."""
- status: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None
+ status: Optional[
+ Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"]
+ ] = None
"""Specifies the processing status for all quality levels for a video."""
thumbnail_timestamp_pct: Optional[float] = FieldInfo(alias="thumbnailTimestampPct", default=None)
diff --git a/src/cloudflare/types/stream/stream_list_params.py b/src/cloudflare/types/stream/stream_list_params.py
index 5d9ed520774..9de295acba8 100644
--- a/src/cloudflare/types/stream/stream_list_params.py
+++ b/src/cloudflare/types/stream/stream_list_params.py
@@ -39,7 +39,7 @@ class StreamListParams(TypedDict, total=False):
start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Lists videos created after the specified date."""
- status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]
+ status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"]
"""Specifies the processing status for all quality levels for a video."""
type: str
diff --git a/src/cloudflare/types/stream/video.py b/src/cloudflare/types/stream/video.py
index d53fad7387f..e57d26fc09c 100644
--- a/src/cloudflare/types/stream/video.py
+++ b/src/cloudflare/types/stream/video.py
@@ -57,7 +57,9 @@ class Status(BaseModel):
The value must be a non-negative integer.
"""
- state: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None
+ state: Optional[
+ Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"]
+ ] = None
"""Specifies the processing status for all quality levels for a video."""
diff --git a/src/cloudflare/types/user/token_update_params.py b/src/cloudflare/types/user/token_update_params.py
index 6df123fcec8..3f0f4df84b3 100644
--- a/src/cloudflare/types/user/token_update_params.py
+++ b/src/cloudflare/types/user/token_update_params.py
@@ -20,9 +20,6 @@ class TokenUpdateParams(TypedDict, total=False):
policies: Required[Iterable[TokenPolicy]]
"""List of access policies assigned to the token."""
- status: Required[Literal["active", "disabled", "expired"]]
- """Status of the token."""
-
condition: Condition
expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
@@ -34,6 +31,9 @@ class TokenUpdateParams(TypedDict, total=False):
not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""The time before which the token MUST NOT be accepted for processing."""
+ status: Literal["active", "disabled", "expired"]
+ """Status of the token."""
+
_ConditionRequestIPReservedKeywords = TypedDict(
"_ConditionRequestIPReservedKeywords",
diff --git a/src/cloudflare/types/user/tokens/__init__.py b/src/cloudflare/types/user/tokens/__init__.py
index 9d03684a586..1f7905cdafa 100644
--- a/src/cloudflare/types/user/tokens/__init__.py
+++ b/src/cloudflare/types/user/tokens/__init__.py
@@ -3,4 +3,5 @@
from __future__ import annotations
from .value_update_params import ValueUpdateParams as ValueUpdateParams
+from .permission_group_list_params import PermissionGroupListParams as PermissionGroupListParams
from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse
diff --git a/src/cloudflare/types/user/tokens/permission_group_list_params.py b/src/cloudflare/types/user/tokens/permission_group_list_params.py
new file mode 100644
index 00000000000..da8fb1f0cf7
--- /dev/null
+++ b/src/cloudflare/types/user/tokens/permission_group_list_params.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["PermissionGroupListParams"]
+
+
+class PermissionGroupListParams(TypedDict, total=False):
+ name: str
+ """Filter by the name of the permission group. The value must be URL-encoded."""
+
+ scope: str
+ """Filter by the scope of the permission group. The value must be URL-encoded."""
diff --git a/src/cloudflare/types/workers/migration_step.py b/src/cloudflare/types/workers/migration_step.py
index 88a0e94a3f4..c2c0bbdc905 100644
--- a/src/cloudflare/types/workers/migration_step.py
+++ b/src/cloudflare/types/workers/migration_step.py
@@ -1,43 +1,17 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-
-from pydantic import Field as FieldInfo
-
from ..._models import BaseModel
__all__ = ["MigrationStep", "RenamedClass", "TransferredClass"]
class RenamedClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- to: Optional[str] = None
+ pass
class TransferredClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- from_script: Optional[str] = None
-
- to: Optional[str] = None
+ pass
class MigrationStep(BaseModel):
- deleted_classes: Optional[List[str]] = None
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces from."""
-
- new_sqlite_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
- renamed_classes: Optional[List[RenamedClass]] = None
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Optional[List[TransferredClass]] = None
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
+ pass
diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py
index b34cacf091f..938bc759b8b 100644
--- a/src/cloudflare/types/workers/script_update_params.py
+++ b/src/cloudflare/types/workers/script_update_params.py
@@ -5,6 +5,7 @@
from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
+from ..._types import FileTypes
from .migration_step_param import MigrationStepParam
from .single_step_migration_param import SingleStepMigrationParam
from .scripts.consumer_script_param import ConsumerScriptParam
@@ -55,6 +56,17 @@ class ScriptUpdateParams(TypedDict, total=False):
metadata: Required[Metadata]
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
+ files: List[FileTypes]
+ """An array of modules (often JavaScript files) comprising a Worker script.
+
+ At least one module must be present and referenced in the metadata as
+ `main_module` or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+ """
+
class MetadataAssetsConfig(TypedDict, total=False):
_headers: str
@@ -78,7 +90,7 @@ class MetadataAssetsConfig(TypedDict, total=False):
is no Worker script.
"""
- run_worker_first: List[str]
+ run_worker_first: Union[List[str], bool]
"""Contains a list path rules to control routing to either the Worker or assets.
Glob (\\**) and negative (!) rules are supported. Rules must start with either '/'
@@ -86,6 +98,13 @@ class MetadataAssetsConfig(TypedDict, total=False):
have higher precedence than non-negative rules.
"""
+ serve_directly: bool
+ """
+ When true and the incoming request matches an asset, that will be served instead
+ of invoking the Worker script. When false, requests will always invoke the
+ Worker script.
+ """
+
class MetadataAssets(TypedDict, total=False):
config: MetadataAssetsConfig
diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py
index f72748894c8..d12d7edd39e 100644
--- a/src/cloudflare/types/workers/scripts/__init__.py
+++ b/src/cloudflare/types/workers/scripts/__init__.py
@@ -2,9 +2,7 @@
from __future__ import annotations
-from .deployment import Deployment as Deployment
from .consumer_script import ConsumerScript as ConsumerScript
-from .deployment_param import DeploymentParam as DeploymentParam
from .tail_get_response import TailGetResponse as TailGetResponse
from .tail_create_params import TailCreateParams as TailCreateParams
from .secret_get_response import SecretGetResponse as SecretGetResponse
@@ -27,10 +25,12 @@
from .subdomain_create_params import SubdomainCreateParams as SubdomainCreateParams
from .version_create_response import VersionCreateResponse as VersionCreateResponse
from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams
+from .deployment_list_response import DeploymentListResponse as DeploymentListResponse
from .schedule_update_response import ScheduleUpdateResponse as ScheduleUpdateResponse
from .subdomain_create_response import SubdomainCreateResponse as SubdomainCreateResponse
from .subdomain_delete_response import SubdomainDeleteResponse as SubdomainDeleteResponse
from .deployment_create_response import DeploymentCreateResponse as DeploymentCreateResponse
+from .deployment_delete_response import DeploymentDeleteResponse as DeploymentDeleteResponse
from .script_and_version_setting_edit_params import (
ScriptAndVersionSettingEditParams as ScriptAndVersionSettingEditParams,
)
diff --git a/src/cloudflare/types/workers/scripts/content_update_params.py b/src/cloudflare/types/workers/scripts/content_update_params.py
index 52465360ec6..64f2facb8a9 100644
--- a/src/cloudflare/types/workers/scripts/content_update_params.py
+++ b/src/cloudflare/types/workers/scripts/content_update_params.py
@@ -2,21 +2,48 @@
from __future__ import annotations
+from typing import List
from typing_extensions import Required, Annotated, TypedDict
+from ...._types import FileTypes
from ...._utils import PropertyInfo
-from ..worker_metadata_param import WorkerMetadataParam
-__all__ = ["ContentUpdateParams"]
+__all__ = ["ContentUpdateParams", "Metadata"]
class ContentUpdateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier."""
- metadata: Required[WorkerMetadataParam]
+ metadata: Required[Metadata]
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
+ files: List[FileTypes]
+ """An array of modules (often JavaScript files) comprising a Worker script.
+
+ At least one module must be present and referenced in the metadata as
+ `main_module` or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+ """
+
cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")]
cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")]
+
+
+class Metadata(TypedDict, total=False):
+ body_part: str
+ """Name of the uploaded file that contains the Worker script (e.g.
+
+ the file adding a listener to the `fetch` event). Indicates a
+ `service worker syntax` Worker.
+ """
+
+ main_module: str
+ """Name of the uploaded file that contains the main module (e.g.
+
+ the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
+ """
diff --git a/src/cloudflare/types/workers/scripts/deployment.py b/src/cloudflare/types/workers/scripts/deployment.py
deleted file mode 100644
index 5de4c8e53c5..00000000000
--- a/src/cloudflare/types/workers/scripts/deployment.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from pydantic import Field as FieldInfo
-
-from ...._models import BaseModel
-
-__all__ = ["Deployment"]
-
-
-class Deployment(BaseModel):
- workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None)
- """Human-readable message about the deployment. Truncated to 100 bytes."""
diff --git a/src/cloudflare/types/workers/scripts/deployment_create_params.py b/src/cloudflare/types/workers/scripts/deployment_create_params.py
index a9f7bb5d763..24b8431b0b9 100644
--- a/src/cloudflare/types/workers/scripts/deployment_create_params.py
+++ b/src/cloudflare/types/workers/scripts/deployment_create_params.py
@@ -3,11 +3,11 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, Annotated, TypedDict
-from .deployment_param import DeploymentParam
+from ...._utils import PropertyInfo
-__all__ = ["DeploymentCreateParams", "Version"]
+__all__ = ["DeploymentCreateParams", "Version", "Annotations"]
class DeploymentCreateParams(TypedDict, total=False):
@@ -24,10 +24,15 @@ class DeploymentCreateParams(TypedDict, total=False):
something such rolling back to an older version when a secret has changed.
"""
- annotations: DeploymentParam
+ annotations: Annotations
class Version(TypedDict, total=False):
percentage: Required[float]
version_id: Required[str]
+
+
+class Annotations(TypedDict, total=False):
+ workers_message: Annotated[str, PropertyInfo(alias="workers/message")]
+ """Human-readable message about the deployment. Truncated to 100 bytes."""
diff --git a/src/cloudflare/types/workers/scripts/deployment_create_response.py b/src/cloudflare/types/workers/scripts/deployment_create_response.py
index 89f71d76378..21f2fef0b61 100644
--- a/src/cloudflare/types/workers/scripts/deployment_create_response.py
+++ b/src/cloudflare/types/workers/scripts/deployment_create_response.py
@@ -1,12 +1,14 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
+from datetime import datetime
from typing_extensions import Literal
+from pydantic import Field as FieldInfo
+
from ...._models import BaseModel
-from .deployment import Deployment
-__all__ = ["DeploymentCreateResponse", "Version"]
+__all__ = ["DeploymentCreateResponse", "Version", "Annotations"]
class Version(BaseModel):
@@ -15,17 +17,25 @@ class Version(BaseModel):
version_id: str
+class Annotations(BaseModel):
+ workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None)
+ """Human-readable message about the deployment. Truncated to 100 bytes."""
+
+ workers_triggered_by: Optional[str] = FieldInfo(alias="workers/triggered_by", default=None)
+ """Operation that triggered the creation of the deployment."""
+
+
class DeploymentCreateResponse(BaseModel):
- strategy: Literal["percentage"]
+ id: str
- versions: List[Version]
+ created_on: datetime
- id: Optional[str] = None
+ source: str
- annotations: Optional[Deployment] = None
+ strategy: Literal["percentage"]
- author_email: Optional[str] = None
+ versions: List[Version]
- created_on: Optional[str] = None
+ annotations: Optional[Annotations] = None
- source: Optional[str] = None
+ author_email: Optional[str] = None
diff --git a/src/cloudflare/types/workers/scripts/deployment_delete_response.py b/src/cloudflare/types/workers/scripts/deployment_delete_response.py
new file mode 100644
index 00000000000..f1eec442f82
--- /dev/null
+++ b/src/cloudflare/types/workers/scripts/deployment_delete_response.py
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+
+__all__ = ["DeploymentDeleteResponse", "Error", "ErrorSource", "Message", "MessageSource"]
+
+
+class ErrorSource(BaseModel):
+ pointer: Optional[str] = None
+
+
+class Error(BaseModel):
+ code: int
+
+ message: str
+
+ documentation_url: Optional[str] = None
+
+ source: Optional[ErrorSource] = None
+
+
+class MessageSource(BaseModel):
+ pointer: Optional[str] = None
+
+
+class Message(BaseModel):
+ code: int
+
+ message: str
+
+ documentation_url: Optional[str] = None
+
+ source: Optional[MessageSource] = None
+
+
+class DeploymentDeleteResponse(BaseModel):
+ errors: List[Error]
+
+ messages: List[Message]
+
+ success: Literal[True]
+ """Whether the API call was successful."""
diff --git a/src/cloudflare/types/workers/scripts/deployment_get_response.py b/src/cloudflare/types/workers/scripts/deployment_get_response.py
index ac49947bfe5..e0682e31adf 100644
--- a/src/cloudflare/types/workers/scripts/deployment_get_response.py
+++ b/src/cloudflare/types/workers/scripts/deployment_get_response.py
@@ -1,35 +1,41 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
+from datetime import datetime
from typing_extensions import Literal
-from . import deployment
+from pydantic import Field as FieldInfo
+
from ...._models import BaseModel
-__all__ = ["DeploymentGetResponse", "Deployment", "DeploymentVersion"]
+__all__ = ["DeploymentGetResponse", "Version", "Annotations"]
-class DeploymentVersion(BaseModel):
+class Version(BaseModel):
percentage: float
version_id: str
-class Deployment(BaseModel):
- strategy: Literal["percentage"]
+class Annotations(BaseModel):
+ workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None)
+ """Human-readable message about the deployment. Truncated to 100 bytes."""
- versions: List[DeploymentVersion]
+ workers_triggered_by: Optional[str] = FieldInfo(alias="workers/triggered_by", default=None)
+ """Operation that triggered the creation of the deployment."""
- id: Optional[str] = None
- annotations: Optional[deployment.Deployment] = None
+class DeploymentGetResponse(BaseModel):
+ id: str
- author_email: Optional[str] = None
+ created_on: datetime
- created_on: Optional[str] = None
+ source: str
- source: Optional[str] = None
+ strategy: Literal["percentage"]
+ versions: List[Version]
-class DeploymentGetResponse(BaseModel):
- deployments: Optional[List[Deployment]] = None
+ annotations: Optional[Annotations] = None
+
+ author_email: Optional[str] = None
diff --git a/src/cloudflare/types/workers/scripts/deployment_list_response.py b/src/cloudflare/types/workers/scripts/deployment_list_response.py
new file mode 100644
index 00000000000..eb6abd0c01a
--- /dev/null
+++ b/src/cloudflare/types/workers/scripts/deployment_list_response.py
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = ["DeploymentListResponse", "Deployment", "DeploymentVersion", "DeploymentAnnotations"]
+
+
+class DeploymentVersion(BaseModel):
+ percentage: float
+
+ version_id: str
+
+
+class DeploymentAnnotations(BaseModel):
+ workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None)
+ """Human-readable message about the deployment. Truncated to 100 bytes."""
+
+ workers_triggered_by: Optional[str] = FieldInfo(alias="workers/triggered_by", default=None)
+ """Operation that triggered the creation of the deployment."""
+
+
+class Deployment(BaseModel):
+ id: str
+
+ created_on: datetime
+
+ source: str
+
+ strategy: Literal["percentage"]
+
+ versions: List[DeploymentVersion]
+
+ annotations: Optional[DeploymentAnnotations] = None
+
+ author_email: Optional[str] = None
+
+
+class DeploymentListResponse(BaseModel):
+ deployments: List[Deployment]
diff --git a/src/cloudflare/types/workers/scripts/deployment_param.py b/src/cloudflare/types/workers/scripts/deployment_param.py
deleted file mode 100644
index caee9701c51..00000000000
--- a/src/cloudflare/types/workers/scripts/deployment_param.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Annotated, TypedDict
-
-from ...._utils import PropertyInfo
-
-__all__ = ["DeploymentParam"]
-
-
-class DeploymentParam(TypedDict, total=False):
- workers_message: Annotated[str, PropertyInfo(alias="workers/message")]
- """Human-readable message about the deployment. Truncated to 100 bytes."""
diff --git a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py
index e1ae8d3a0aa..b10b147b409 100644
--- a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py
+++ b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py
@@ -7,7 +7,6 @@
from ...._utils import PropertyInfo
from ...._models import BaseModel
-from ..migration_step import MigrationStep
from .consumer_script import ConsumerScript
from ..single_step_migration import SingleStepMigration
@@ -389,17 +388,7 @@ class Limits(BaseModel):
class MigrationsWorkersMultipleStepMigrations(BaseModel):
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Optional[List[MigrationStep]] = None
- """Migrations to apply in order."""
+ pass
Migrations: TypeAlias = Union[SingleStepMigration, MigrationsWorkersMultipleStepMigrations]
@@ -470,9 +459,6 @@ class ScriptAndVersionSettingEditResponse(BaseModel):
logpush: Optional[bool] = None
"""Whether Logpush is turned on for the Worker."""
- migrations: Optional[Migrations] = None
- """Migrations to apply for Durable Objects associated with this Worker."""
-
observability: Optional[Observability] = None
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py b/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py
index faa3d1d72c2..681e35338a9 100644
--- a/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py
+++ b/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py
@@ -7,7 +7,6 @@
from ...._utils import PropertyInfo
from ...._models import BaseModel
-from ..migration_step import MigrationStep
from .consumer_script import ConsumerScript
from ..single_step_migration import SingleStepMigration
@@ -389,17 +388,7 @@ class Limits(BaseModel):
class MigrationsWorkersMultipleStepMigrations(BaseModel):
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Optional[List[MigrationStep]] = None
- """Migrations to apply in order."""
+ pass
Migrations: TypeAlias = Union[SingleStepMigration, MigrationsWorkersMultipleStepMigrations]
@@ -470,9 +459,6 @@ class ScriptAndVersionSettingGetResponse(BaseModel):
logpush: Optional[bool] = None
"""Whether Logpush is turned on for the Worker."""
- migrations: Optional[Migrations] = None
- """Migrations to apply for Durable Objects associated with this Worker."""
-
observability: Optional[Observability] = None
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/scripts/version_create_params.py b/src/cloudflare/types/workers/scripts/version_create_params.py
index 7f81427661f..71ddba7c9d4 100644
--- a/src/cloudflare/types/workers/scripts/version_create_params.py
+++ b/src/cloudflare/types/workers/scripts/version_create_params.py
@@ -5,6 +5,7 @@
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+from ...._types import FileTypes
from ...._utils import PropertyInfo
__all__ = [
@@ -47,6 +48,17 @@ class VersionCreateParams(TypedDict, total=False):
metadata: Required[Metadata]
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
+ files: List[FileTypes]
+ """An array of modules (often JavaScript files) comprising a Worker script.
+
+ At least one module must be present and referenced in the metadata as
+ `main_module` or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+ """
+
class MetadataAnnotations(TypedDict, total=False):
workers_message: Annotated[str, PropertyInfo(alias="workers/message")]
@@ -405,7 +417,7 @@ class MetadataBindingWorkersBindingKindWorkflow(TypedDict, total=False):
class Metadata(TypedDict, total=False):
main_module: Required[str]
- """Name of the part in the multipart request that contains the main module (e.g.
+ """Name of the uploaded file that contains the main module (e.g.
the file exporting a `fetch` handler). Indicates a `module syntax` Worker, which
is required for Version Upload.
diff --git a/src/cloudflare/types/workers/scripts/version_create_response.py b/src/cloudflare/types/workers/scripts/version_create_response.py
index 117ad7b82ab..e7f3e869d2d 100644
--- a/src/cloudflare/types/workers/scripts/version_create_response.py
+++ b/src/cloudflare/types/workers/scripts/version_create_response.py
@@ -11,33 +11,32 @@
__all__ = [
"VersionCreateResponse",
"Resources",
- "ResourcesBindings",
- "ResourcesBindingsResult",
- "ResourcesBindingsResultWorkersBindingKindAI",
- "ResourcesBindingsResultWorkersBindingKindAnalyticsEngine",
- "ResourcesBindingsResultWorkersBindingKindAssets",
- "ResourcesBindingsResultWorkersBindingKindBrowser",
- "ResourcesBindingsResultWorkersBindingKindD1",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespace",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker",
- "ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace",
- "ResourcesBindingsResultWorkersBindingKindHyperdrive",
- "ResourcesBindingsResultWorkersBindingKindJson",
- "ResourcesBindingsResultWorkersBindingKindKVNamespace",
- "ResourcesBindingsResultWorkersBindingKindMTLSCertificate",
- "ResourcesBindingsResultWorkersBindingKindPlainText",
- "ResourcesBindingsResultWorkersBindingKindPipelines",
- "ResourcesBindingsResultWorkersBindingKindQueue",
- "ResourcesBindingsResultWorkersBindingKindR2Bucket",
- "ResourcesBindingsResultWorkersBindingKindSecretText",
- "ResourcesBindingsResultWorkersBindingKindService",
- "ResourcesBindingsResultWorkersBindingKindTailConsumer",
- "ResourcesBindingsResultWorkersBindingKindVectorize",
- "ResourcesBindingsResultWorkersBindingKindVersionMetadata",
- "ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret",
- "ResourcesBindingsResultWorkersBindingKindSecretKey",
- "ResourcesBindingsResultWorkersBindingKindWorkflow",
+ "ResourcesBinding",
+ "ResourcesBindingWorkersBindingKindAI",
+ "ResourcesBindingWorkersBindingKindAnalyticsEngine",
+ "ResourcesBindingWorkersBindingKindAssets",
+ "ResourcesBindingWorkersBindingKindBrowser",
+ "ResourcesBindingWorkersBindingKindD1",
+ "ResourcesBindingWorkersBindingKindDispatchNamespace",
+ "ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound",
+ "ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker",
+ "ResourcesBindingWorkersBindingKindDurableObjectNamespace",
+ "ResourcesBindingWorkersBindingKindHyperdrive",
+ "ResourcesBindingWorkersBindingKindJson",
+ "ResourcesBindingWorkersBindingKindKVNamespace",
+ "ResourcesBindingWorkersBindingKindMTLSCertificate",
+ "ResourcesBindingWorkersBindingKindPlainText",
+ "ResourcesBindingWorkersBindingKindPipelines",
+ "ResourcesBindingWorkersBindingKindQueue",
+ "ResourcesBindingWorkersBindingKindR2Bucket",
+ "ResourcesBindingWorkersBindingKindSecretText",
+ "ResourcesBindingWorkersBindingKindService",
+ "ResourcesBindingWorkersBindingKindTailConsumer",
+ "ResourcesBindingWorkersBindingKindVectorize",
+ "ResourcesBindingWorkersBindingKindVersionMetadata",
+ "ResourcesBindingWorkersBindingKindSecretsStoreSecret",
+ "ResourcesBindingWorkersBindingKindSecretKey",
+ "ResourcesBindingWorkersBindingKindWorkflow",
"ResourcesScript",
"ResourcesScriptNamedHandler",
"ResourcesScriptRuntime",
@@ -46,7 +45,7 @@
]
-class ResourcesBindingsResultWorkersBindingKindAI(BaseModel):
+class ResourcesBindingWorkersBindingKindAI(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -54,7 +53,7 @@ class ResourcesBindingsResultWorkersBindingKindAI(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel):
+class ResourcesBindingWorkersBindingKindAnalyticsEngine(BaseModel):
dataset: str
"""The name of the dataset to bind to."""
@@ -65,7 +64,7 @@ class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel):
+class ResourcesBindingWorkersBindingKindAssets(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -73,7 +72,7 @@ class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel):
+class ResourcesBindingWorkersBindingKindBrowser(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -81,7 +80,7 @@ class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindD1(BaseModel):
+class ResourcesBindingWorkersBindingKindD1(BaseModel):
id: str
"""Identifier of the D1 database to bind to."""
@@ -92,7 +91,7 @@ class ResourcesBindingsResultWorkersBindingKindD1(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel):
environment: Optional[str] = None
"""Environment of the outbound worker."""
@@ -100,18 +99,18 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(B
"""Name of the outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound(BaseModel):
params: Optional[List[str]] = None
"""
Pass information from the Dispatch Worker to the Outbound Worker through the
parameters.
"""
- worker: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker] = None
+ worker: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker] = None
"""Outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -121,11 +120,11 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel):
type: Literal["dispatch_namespace"]
"""The kind of resource that the binding provides."""
- outbound: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound] = None
+ outbound: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound] = None
"""Outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindDurableObjectNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -148,7 +147,7 @@ class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel)
"""
-class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel):
+class ResourcesBindingWorkersBindingKindHyperdrive(BaseModel):
id: str
"""Identifier of the Hyperdrive connection to bind to."""
@@ -159,7 +158,7 @@ class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindJson(BaseModel):
+class ResourcesBindingWorkersBindingKindJson(BaseModel):
json_: str = FieldInfo(alias="json")
"""JSON data to use."""
@@ -170,7 +169,7 @@ class ResourcesBindingsResultWorkersBindingKindJson(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindKVNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -181,7 +180,7 @@ class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel):
+class ResourcesBindingWorkersBindingKindMTLSCertificate(BaseModel):
certificate_id: str
"""Identifier of the certificate to bind to."""
@@ -192,7 +191,7 @@ class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel):
+class ResourcesBindingWorkersBindingKindPlainText(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -203,7 +202,7 @@ class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel):
+class ResourcesBindingWorkersBindingKindPipelines(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -214,7 +213,7 @@ class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel):
+class ResourcesBindingWorkersBindingKindQueue(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -225,7 +224,7 @@ class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel):
+class ResourcesBindingWorkersBindingKindR2Bucket(BaseModel):
bucket_name: str
"""R2 bucket to bind to."""
@@ -236,7 +235,7 @@ class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretText(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -244,7 +243,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindService(BaseModel):
+class ResourcesBindingWorkersBindingKindService(BaseModel):
environment: str
"""Optional environment if the Worker utilizes one."""
@@ -258,7 +257,7 @@ class ResourcesBindingsResultWorkersBindingKindService(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel):
+class ResourcesBindingWorkersBindingKindTailConsumer(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -269,7 +268,7 @@ class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel):
+class ResourcesBindingWorkersBindingKindVectorize(BaseModel):
index_name: str
"""Name of the Vectorize index to bind to."""
@@ -280,7 +279,7 @@ class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel):
+class ResourcesBindingWorkersBindingKindVersionMetadata(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -288,7 +287,7 @@ class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretsStoreSecret(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -302,7 +301,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretKey(BaseModel):
algorithm: object
"""Algorithm-specific key parameters.
@@ -328,7 +327,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel):
"""
-class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
+class ResourcesBindingWorkersBindingKindWorkflow(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -351,45 +350,36 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
"""
-ResourcesBindingsResult: TypeAlias = Annotated[
+ResourcesBinding: TypeAlias = Annotated[
Union[
- ResourcesBindingsResultWorkersBindingKindAI,
- ResourcesBindingsResultWorkersBindingKindAnalyticsEngine,
- ResourcesBindingsResultWorkersBindingKindAssets,
- ResourcesBindingsResultWorkersBindingKindBrowser,
- ResourcesBindingsResultWorkersBindingKindD1,
- ResourcesBindingsResultWorkersBindingKindDispatchNamespace,
- ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace,
- ResourcesBindingsResultWorkersBindingKindHyperdrive,
- ResourcesBindingsResultWorkersBindingKindJson,
- ResourcesBindingsResultWorkersBindingKindKVNamespace,
- ResourcesBindingsResultWorkersBindingKindMTLSCertificate,
- ResourcesBindingsResultWorkersBindingKindPlainText,
- ResourcesBindingsResultWorkersBindingKindPipelines,
- ResourcesBindingsResultWorkersBindingKindQueue,
- ResourcesBindingsResultWorkersBindingKindR2Bucket,
- ResourcesBindingsResultWorkersBindingKindSecretText,
- ResourcesBindingsResultWorkersBindingKindService,
- ResourcesBindingsResultWorkersBindingKindTailConsumer,
- ResourcesBindingsResultWorkersBindingKindVectorize,
- ResourcesBindingsResultWorkersBindingKindVersionMetadata,
- ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret,
- ResourcesBindingsResultWorkersBindingKindSecretKey,
- ResourcesBindingsResultWorkersBindingKindWorkflow,
+ ResourcesBindingWorkersBindingKindAI,
+ ResourcesBindingWorkersBindingKindAnalyticsEngine,
+ ResourcesBindingWorkersBindingKindAssets,
+ ResourcesBindingWorkersBindingKindBrowser,
+ ResourcesBindingWorkersBindingKindD1,
+ ResourcesBindingWorkersBindingKindDispatchNamespace,
+ ResourcesBindingWorkersBindingKindDurableObjectNamespace,
+ ResourcesBindingWorkersBindingKindHyperdrive,
+ ResourcesBindingWorkersBindingKindJson,
+ ResourcesBindingWorkersBindingKindKVNamespace,
+ ResourcesBindingWorkersBindingKindMTLSCertificate,
+ ResourcesBindingWorkersBindingKindPlainText,
+ ResourcesBindingWorkersBindingKindPipelines,
+ ResourcesBindingWorkersBindingKindQueue,
+ ResourcesBindingWorkersBindingKindR2Bucket,
+ ResourcesBindingWorkersBindingKindSecretText,
+ ResourcesBindingWorkersBindingKindService,
+ ResourcesBindingWorkersBindingKindTailConsumer,
+ ResourcesBindingWorkersBindingKindVectorize,
+ ResourcesBindingWorkersBindingKindVersionMetadata,
+ ResourcesBindingWorkersBindingKindSecretsStoreSecret,
+ ResourcesBindingWorkersBindingKindSecretKey,
+ ResourcesBindingWorkersBindingKindWorkflow,
],
PropertyInfo(discriminator="type"),
]
-class ResourcesBindings(BaseModel):
- result: Optional[List[ResourcesBindingsResult]] = None
- """List of bindings attached to a Worker.
-
- You can find more about bindings on our docs:
- https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
- """
-
-
class ResourcesScriptNamedHandler(BaseModel):
handlers: Optional[List[str]] = None
@@ -423,7 +413,12 @@ class ResourcesScriptRuntime(BaseModel):
class Resources(BaseModel):
- bindings: Optional[ResourcesBindings] = None
+ bindings: Optional[List[ResourcesBinding]] = None
+ """List of bindings attached to a Worker.
+
+ You can find more about bindings on our docs:
+ https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
+ """
script: Optional[ResourcesScript] = None
diff --git a/src/cloudflare/types/workers/scripts/version_get_response.py b/src/cloudflare/types/workers/scripts/version_get_response.py
index 739189bd1ac..25aea4aa771 100644
--- a/src/cloudflare/types/workers/scripts/version_get_response.py
+++ b/src/cloudflare/types/workers/scripts/version_get_response.py
@@ -11,33 +11,32 @@
__all__ = [
"VersionGetResponse",
"Resources",
- "ResourcesBindings",
- "ResourcesBindingsResult",
- "ResourcesBindingsResultWorkersBindingKindAI",
- "ResourcesBindingsResultWorkersBindingKindAnalyticsEngine",
- "ResourcesBindingsResultWorkersBindingKindAssets",
- "ResourcesBindingsResultWorkersBindingKindBrowser",
- "ResourcesBindingsResultWorkersBindingKindD1",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespace",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound",
- "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker",
- "ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace",
- "ResourcesBindingsResultWorkersBindingKindHyperdrive",
- "ResourcesBindingsResultWorkersBindingKindJson",
- "ResourcesBindingsResultWorkersBindingKindKVNamespace",
- "ResourcesBindingsResultWorkersBindingKindMTLSCertificate",
- "ResourcesBindingsResultWorkersBindingKindPlainText",
- "ResourcesBindingsResultWorkersBindingKindPipelines",
- "ResourcesBindingsResultWorkersBindingKindQueue",
- "ResourcesBindingsResultWorkersBindingKindR2Bucket",
- "ResourcesBindingsResultWorkersBindingKindSecretText",
- "ResourcesBindingsResultWorkersBindingKindService",
- "ResourcesBindingsResultWorkersBindingKindTailConsumer",
- "ResourcesBindingsResultWorkersBindingKindVectorize",
- "ResourcesBindingsResultWorkersBindingKindVersionMetadata",
- "ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret",
- "ResourcesBindingsResultWorkersBindingKindSecretKey",
- "ResourcesBindingsResultWorkersBindingKindWorkflow",
+ "ResourcesBinding",
+ "ResourcesBindingWorkersBindingKindAI",
+ "ResourcesBindingWorkersBindingKindAnalyticsEngine",
+ "ResourcesBindingWorkersBindingKindAssets",
+ "ResourcesBindingWorkersBindingKindBrowser",
+ "ResourcesBindingWorkersBindingKindD1",
+ "ResourcesBindingWorkersBindingKindDispatchNamespace",
+ "ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound",
+ "ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker",
+ "ResourcesBindingWorkersBindingKindDurableObjectNamespace",
+ "ResourcesBindingWorkersBindingKindHyperdrive",
+ "ResourcesBindingWorkersBindingKindJson",
+ "ResourcesBindingWorkersBindingKindKVNamespace",
+ "ResourcesBindingWorkersBindingKindMTLSCertificate",
+ "ResourcesBindingWorkersBindingKindPlainText",
+ "ResourcesBindingWorkersBindingKindPipelines",
+ "ResourcesBindingWorkersBindingKindQueue",
+ "ResourcesBindingWorkersBindingKindR2Bucket",
+ "ResourcesBindingWorkersBindingKindSecretText",
+ "ResourcesBindingWorkersBindingKindService",
+ "ResourcesBindingWorkersBindingKindTailConsumer",
+ "ResourcesBindingWorkersBindingKindVectorize",
+ "ResourcesBindingWorkersBindingKindVersionMetadata",
+ "ResourcesBindingWorkersBindingKindSecretsStoreSecret",
+ "ResourcesBindingWorkersBindingKindSecretKey",
+ "ResourcesBindingWorkersBindingKindWorkflow",
"ResourcesScript",
"ResourcesScriptNamedHandler",
"ResourcesScriptRuntime",
@@ -46,7 +45,7 @@
]
-class ResourcesBindingsResultWorkersBindingKindAI(BaseModel):
+class ResourcesBindingWorkersBindingKindAI(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -54,7 +53,7 @@ class ResourcesBindingsResultWorkersBindingKindAI(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel):
+class ResourcesBindingWorkersBindingKindAnalyticsEngine(BaseModel):
dataset: str
"""The name of the dataset to bind to."""
@@ -65,7 +64,7 @@ class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel):
+class ResourcesBindingWorkersBindingKindAssets(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -73,7 +72,7 @@ class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel):
+class ResourcesBindingWorkersBindingKindBrowser(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -81,7 +80,7 @@ class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindD1(BaseModel):
+class ResourcesBindingWorkersBindingKindD1(BaseModel):
id: str
"""Identifier of the D1 database to bind to."""
@@ -92,7 +91,7 @@ class ResourcesBindingsResultWorkersBindingKindD1(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel):
environment: Optional[str] = None
"""Environment of the outbound worker."""
@@ -100,18 +99,18 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(B
"""Name of the outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound(BaseModel):
params: Optional[List[str]] = None
"""
Pass information from the Dispatch Worker to the Outbound Worker through the
parameters.
"""
- worker: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker] = None
+ worker: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker] = None
"""Outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindDispatchNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -121,11 +120,11 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel):
type: Literal["dispatch_namespace"]
"""The kind of resource that the binding provides."""
- outbound: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound] = None
+ outbound: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound] = None
"""Outbound worker."""
-class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindDurableObjectNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -148,7 +147,7 @@ class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel)
"""
-class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel):
+class ResourcesBindingWorkersBindingKindHyperdrive(BaseModel):
id: str
"""Identifier of the Hyperdrive connection to bind to."""
@@ -159,7 +158,7 @@ class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindJson(BaseModel):
+class ResourcesBindingWorkersBindingKindJson(BaseModel):
json_: str = FieldInfo(alias="json")
"""JSON data to use."""
@@ -170,7 +169,7 @@ class ResourcesBindingsResultWorkersBindingKindJson(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel):
+class ResourcesBindingWorkersBindingKindKVNamespace(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -181,7 +180,7 @@ class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel):
+class ResourcesBindingWorkersBindingKindMTLSCertificate(BaseModel):
certificate_id: str
"""Identifier of the certificate to bind to."""
@@ -192,7 +191,7 @@ class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel):
+class ResourcesBindingWorkersBindingKindPlainText(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -203,7 +202,7 @@ class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel):
+class ResourcesBindingWorkersBindingKindPipelines(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -214,7 +213,7 @@ class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel):
+class ResourcesBindingWorkersBindingKindQueue(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -225,7 +224,7 @@ class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel):
+class ResourcesBindingWorkersBindingKindR2Bucket(BaseModel):
bucket_name: str
"""R2 bucket to bind to."""
@@ -236,7 +235,7 @@ class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretText(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -244,7 +243,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindService(BaseModel):
+class ResourcesBindingWorkersBindingKindService(BaseModel):
environment: str
"""Optional environment if the Worker utilizes one."""
@@ -258,7 +257,7 @@ class ResourcesBindingsResultWorkersBindingKindService(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel):
+class ResourcesBindingWorkersBindingKindTailConsumer(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -269,7 +268,7 @@ class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel):
+class ResourcesBindingWorkersBindingKindVectorize(BaseModel):
index_name: str
"""Name of the Vectorize index to bind to."""
@@ -280,7 +279,7 @@ class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel):
+class ResourcesBindingWorkersBindingKindVersionMetadata(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -288,7 +287,7 @@ class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretsStoreSecret(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -302,7 +301,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel):
"""The kind of resource that the binding provides."""
-class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel):
+class ResourcesBindingWorkersBindingKindSecretKey(BaseModel):
algorithm: object
"""Algorithm-specific key parameters.
@@ -328,7 +327,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel):
"""
-class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
+class ResourcesBindingWorkersBindingKindWorkflow(BaseModel):
name: str
"""A JavaScript variable name for the binding."""
@@ -351,45 +350,36 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
"""
-ResourcesBindingsResult: TypeAlias = Annotated[
+ResourcesBinding: TypeAlias = Annotated[
Union[
- ResourcesBindingsResultWorkersBindingKindAI,
- ResourcesBindingsResultWorkersBindingKindAnalyticsEngine,
- ResourcesBindingsResultWorkersBindingKindAssets,
- ResourcesBindingsResultWorkersBindingKindBrowser,
- ResourcesBindingsResultWorkersBindingKindD1,
- ResourcesBindingsResultWorkersBindingKindDispatchNamespace,
- ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace,
- ResourcesBindingsResultWorkersBindingKindHyperdrive,
- ResourcesBindingsResultWorkersBindingKindJson,
- ResourcesBindingsResultWorkersBindingKindKVNamespace,
- ResourcesBindingsResultWorkersBindingKindMTLSCertificate,
- ResourcesBindingsResultWorkersBindingKindPlainText,
- ResourcesBindingsResultWorkersBindingKindPipelines,
- ResourcesBindingsResultWorkersBindingKindQueue,
- ResourcesBindingsResultWorkersBindingKindR2Bucket,
- ResourcesBindingsResultWorkersBindingKindSecretText,
- ResourcesBindingsResultWorkersBindingKindService,
- ResourcesBindingsResultWorkersBindingKindTailConsumer,
- ResourcesBindingsResultWorkersBindingKindVectorize,
- ResourcesBindingsResultWorkersBindingKindVersionMetadata,
- ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret,
- ResourcesBindingsResultWorkersBindingKindSecretKey,
- ResourcesBindingsResultWorkersBindingKindWorkflow,
+ ResourcesBindingWorkersBindingKindAI,
+ ResourcesBindingWorkersBindingKindAnalyticsEngine,
+ ResourcesBindingWorkersBindingKindAssets,
+ ResourcesBindingWorkersBindingKindBrowser,
+ ResourcesBindingWorkersBindingKindD1,
+ ResourcesBindingWorkersBindingKindDispatchNamespace,
+ ResourcesBindingWorkersBindingKindDurableObjectNamespace,
+ ResourcesBindingWorkersBindingKindHyperdrive,
+ ResourcesBindingWorkersBindingKindJson,
+ ResourcesBindingWorkersBindingKindKVNamespace,
+ ResourcesBindingWorkersBindingKindMTLSCertificate,
+ ResourcesBindingWorkersBindingKindPlainText,
+ ResourcesBindingWorkersBindingKindPipelines,
+ ResourcesBindingWorkersBindingKindQueue,
+ ResourcesBindingWorkersBindingKindR2Bucket,
+ ResourcesBindingWorkersBindingKindSecretText,
+ ResourcesBindingWorkersBindingKindService,
+ ResourcesBindingWorkersBindingKindTailConsumer,
+ ResourcesBindingWorkersBindingKindVectorize,
+ ResourcesBindingWorkersBindingKindVersionMetadata,
+ ResourcesBindingWorkersBindingKindSecretsStoreSecret,
+ ResourcesBindingWorkersBindingKindSecretKey,
+ ResourcesBindingWorkersBindingKindWorkflow,
],
PropertyInfo(discriminator="type"),
]
-class ResourcesBindings(BaseModel):
- result: Optional[List[ResourcesBindingsResult]] = None
- """List of bindings attached to a Worker.
-
- You can find more about bindings on our docs:
- https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
- """
-
-
class ResourcesScriptNamedHandler(BaseModel):
handlers: Optional[List[str]] = None
@@ -423,7 +413,12 @@ class ResourcesScriptRuntime(BaseModel):
class Resources(BaseModel):
- bindings: Optional[ResourcesBindings] = None
+ bindings: Optional[List[ResourcesBinding]] = None
+ """List of bindings attached to a Worker.
+
+ You can find more about bindings on our docs:
+ https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
+ """
script: Optional[ResourcesScript] = None
diff --git a/src/cloudflare/types/workers/single_step_migration.py b/src/cloudflare/types/workers/single_step_migration.py
index edaf5715324..1ee496a3a0d 100644
--- a/src/cloudflare/types/workers/single_step_migration.py
+++ b/src/cloudflare/types/workers/single_step_migration.py
@@ -1,52 +1,17 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-
-from pydantic import Field as FieldInfo
-
from ..._models import BaseModel
__all__ = ["SingleStepMigration", "RenamedClass", "TransferredClass"]
class RenamedClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- to: Optional[str] = None
+ pass
class TransferredClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- from_script: Optional[str] = None
-
- to: Optional[str] = None
+ pass
class SingleStepMigration(BaseModel):
- deleted_classes: Optional[List[str]] = None
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces from."""
-
- new_sqlite_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- renamed_classes: Optional[List[RenamedClass]] = None
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Optional[List[TransferredClass]] = None
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
+ pass
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
index 64b5d00a594..94730fa2c81 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
@@ -5,6 +5,7 @@
from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
+from ....._types import FileTypes
from ....workers.migration_step_param import MigrationStepParam
from ....workers.single_step_migration_param import SingleStepMigrationParam
from ....workers.scripts.consumer_script_param import ConsumerScriptParam
@@ -58,6 +59,17 @@ class ScriptUpdateParams(TypedDict, total=False):
metadata: Required[Metadata]
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
+ files: List[FileTypes]
+ """An array of modules (often JavaScript files) comprising a Worker script.
+
+ At least one module must be present and referenced in the metadata as
+ `main_module` or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+ """
+
class MetadataAssetsConfig(TypedDict, total=False):
_headers: str
@@ -81,7 +93,7 @@ class MetadataAssetsConfig(TypedDict, total=False):
is no Worker script.
"""
- run_worker_first: List[str]
+ run_worker_first: Union[List[str], bool]
"""Contains a list path rules to control routing to either the Worker or assets.
Glob (\\**) and negative (!) rules are supported. Rules must start with either '/'
@@ -89,6 +101,13 @@ class MetadataAssetsConfig(TypedDict, total=False):
have higher precedence than non-negative rules.
"""
+ serve_directly: bool
+ """
+ When true and the incoming request matches an asset, that will be served instead
+ of invoking the Worker script. When false, requests will always invoke the
+ Worker script.
+ """
+
class MetadataAssets(TypedDict, total=False):
config: MetadataAssetsConfig
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
index d78c5640b49..f2d368d02ca 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
@@ -2,8 +2,10 @@
from __future__ import annotations
+from typing import List
from typing_extensions import Required, Annotated, TypedDict
+from ......_types import FileTypes
from ......_utils import PropertyInfo
from .....workers.worker_metadata_param import WorkerMetadataParam
@@ -20,6 +22,17 @@ class ContentUpdateParams(TypedDict, total=False):
metadata: Required[WorkerMetadataParam]
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
+ files: List[FileTypes]
+ """An array of modules (often JavaScript files) comprising a Worker script.
+
+ At least one module must be present and referenced in the metadata as
+ `main_module` or `body_part` by filename.
Possible Content-Type(s) are:
+ `application/javascript+module`, `text/javascript+module`,
+ `application/javascript`, `text/javascript`, `text/x-python`,
+ `text/x-python-requirement`, `application/wasm`, `text/plain`,
+ `application/octet-stream`, `application/source-map`.
+ """
+
cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")]
cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")]
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
index ef0ea53dbf9..0a308c7c632 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
@@ -7,7 +7,6 @@
from ......_utils import PropertyInfo
from ......_models import BaseModel
-from .....workers.migration_step import MigrationStep
from .....workers.single_step_migration import SingleStepMigration
from .....workers.scripts.consumer_script import ConsumerScript
@@ -389,17 +388,7 @@ class Limits(BaseModel):
class MigrationsWorkersMultipleStepMigrations(BaseModel):
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Optional[List[MigrationStep]] = None
- """Migrations to apply in order."""
+ pass
Migrations: TypeAlias = Union[SingleStepMigration, MigrationsWorkersMultipleStepMigrations]
@@ -470,9 +459,6 @@ class SettingEditResponse(BaseModel):
logpush: Optional[bool] = None
"""Whether Logpush is turned on for the Worker."""
- migrations: Optional[Migrations] = None
- """Migrations to apply for Durable Objects associated with this Worker."""
-
observability: Optional[Observability] = None
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
index f82f3b0ae97..973af7d2193 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
@@ -7,7 +7,6 @@
from ......_utils import PropertyInfo
from ......_models import BaseModel
-from .....workers.migration_step import MigrationStep
from .....workers.single_step_migration import SingleStepMigration
from .....workers.scripts.consumer_script import ConsumerScript
@@ -389,17 +388,7 @@ class Limits(BaseModel):
class MigrationsWorkersMultipleStepMigrations(BaseModel):
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Optional[List[MigrationStep]] = None
- """Migrations to apply in order."""
+ pass
Migrations: TypeAlias = Union[SingleStepMigration, MigrationsWorkersMultipleStepMigrations]
@@ -470,9 +459,6 @@ class SettingGetResponse(BaseModel):
logpush: Optional[bool] = None
"""Whether Logpush is turned on for the Worker."""
- migrations: Optional[Migrations] = None
- """Migrations to apply for Durable Objects associated with this Worker."""
-
observability: Optional[Observability] = None
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workflows/instance_bulk_params.py b/src/cloudflare/types/workflows/instance_bulk_params.py
index 5aeb318c935..edc05c332f3 100644
--- a/src/cloudflare/types/workflows/instance_bulk_params.py
+++ b/src/cloudflare/types/workflows/instance_bulk_params.py
@@ -17,4 +17,6 @@ class InstanceBulkParams(TypedDict, total=False):
class Body(TypedDict, total=False):
instance_id: str
+ instance_retention: object
+
params: object
diff --git a/src/cloudflare/types/workflows/instance_create_params.py b/src/cloudflare/types/workflows/instance_create_params.py
index 6ae239fdc8f..2aa80a07347 100644
--- a/src/cloudflare/types/workflows/instance_create_params.py
+++ b/src/cloudflare/types/workflows/instance_create_params.py
@@ -12,4 +12,6 @@ class InstanceCreateParams(TypedDict, total=False):
instance_id: str
+ instance_retention: object
+
params: object
diff --git a/src/cloudflare/types/workflows/instance_list_params.py b/src/cloudflare/types/workflows/instance_list_params.py
index 0dd242878d8..a17cad6fd21 100644
--- a/src/cloudflare/types/workflows/instance_list_params.py
+++ b/src/cloudflare/types/workflows/instance_list_params.py
@@ -14,6 +14,9 @@
class InstanceListParams(TypedDict, total=False):
account_id: Required[str]
+ cursor: str
+ """`page` and `cursor` are mutually exclusive, use one or the other."""
+
date_end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Accepts ISO 8601 with no timezone offsets and in UTC."""
@@ -21,6 +24,7 @@ class InstanceListParams(TypedDict, total=False):
"""Accepts ISO 8601 with no timezone offsets and in UTC."""
page: float
+ """`page` and `cursor` are mutually exclusive, use one or the other."""
per_page: float
diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py
index a77d4a12744..6450098a8f7 100644
--- a/src/cloudflare/types/zero_trust/access/application_create_params.py
+++ b/src/cloudflare/types/zero_trust/access/application_create_params.py
@@ -2486,7 +2486,7 @@ class BrowserRdpApplicationTargetCriterion(TypedDict, total=False):
A port cannot be assigned to multiple protocols.
"""
- protocol: Required[Literal["SSH"]]
+ protocol: Required[Literal["RDP"]]
"""The communication protocol your application secures."""
target_attributes: Required[Dict[str, List[str]]]
diff --git a/src/cloudflare/types/zero_trust/access/application_create_response.py b/src/cloudflare/types/zero_trust/access/application_create_response.py
index 61463c42b09..e91924f4726 100644
--- a/src/cloudflare/types/zero_trust/access/application_create_response.py
+++ b/src/cloudflare/types/zero_trust/access/application_create_response.py
@@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel):
A port cannot be assigned to multiple protocols.
"""
- protocol: Literal["SSH"]
+ protocol: Literal["RDP"]
"""The communication protocol your application secures."""
target_attributes: Dict[str, List[str]]
diff --git a/src/cloudflare/types/zero_trust/access/application_get_response.py b/src/cloudflare/types/zero_trust/access/application_get_response.py
index 5daecc65e9e..68fe5308dae 100644
--- a/src/cloudflare/types/zero_trust/access/application_get_response.py
+++ b/src/cloudflare/types/zero_trust/access/application_get_response.py
@@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel):
A port cannot be assigned to multiple protocols.
"""
- protocol: Literal["SSH"]
+ protocol: Literal["RDP"]
"""The communication protocol your application secures."""
target_attributes: Dict[str, List[str]]
diff --git a/src/cloudflare/types/zero_trust/access/application_list_params.py b/src/cloudflare/types/zero_trust/access/application_list_params.py
index 8f3ab7e19c9..a44c9eef463 100644
--- a/src/cloudflare/types/zero_trust/access/application_list_params.py
+++ b/src/cloudflare/types/zero_trust/access/application_list_params.py
@@ -20,6 +20,9 @@ class ApplicationListParams(TypedDict, total=False):
domain: str
"""The domain of the app."""
+ exact: bool
+ """True for only exact string matches against passed name/domain query parameters."""
+
name: str
"""The name of the app."""
diff --git a/src/cloudflare/types/zero_trust/access/application_list_response.py b/src/cloudflare/types/zero_trust/access/application_list_response.py
index bccb59ec4fb..1f903dc1240 100644
--- a/src/cloudflare/types/zero_trust/access/application_list_response.py
+++ b/src/cloudflare/types/zero_trust/access/application_list_response.py
@@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel):
A port cannot be assigned to multiple protocols.
"""
- protocol: Literal["SSH"]
+ protocol: Literal["RDP"]
"""The communication protocol your application secures."""
target_attributes: Dict[str, List[str]]
diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py
index 4cfd0257427..1f5808d2ad4 100644
--- a/src/cloudflare/types/zero_trust/access/application_update_params.py
+++ b/src/cloudflare/types/zero_trust/access/application_update_params.py
@@ -2486,7 +2486,7 @@ class BrowserRdpApplicationTargetCriterion(TypedDict, total=False):
A port cannot be assigned to multiple protocols.
"""
- protocol: Required[Literal["SSH"]]
+ protocol: Required[Literal["RDP"]]
"""The communication protocol your application secures."""
target_attributes: Required[Dict[str, List[str]]]
diff --git a/src/cloudflare/types/zero_trust/access/application_update_response.py b/src/cloudflare/types/zero_trust/access/application_update_response.py
index 7ec6b8c8187..9ad6e7684c8 100644
--- a/src/cloudflare/types/zero_trust/access/application_update_response.py
+++ b/src/cloudflare/types/zero_trust/access/application_update_response.py
@@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel):
A port cannot be assigned to multiple protocols.
"""
- protocol: Literal["SSH"]
+ protocol: Literal["RDP"]
"""The communication protocol your application secures."""
target_attributes: Dict[str, List[str]]
diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule.py b/src/cloudflare/types/zero_trust/access/applications/access_rule.py
index 09100b8aa59..dfd9cd0dba7 100644
--- a/src/cloudflare/types/zero_trust/access/applications/access_rule.py
+++ b/src/cloudflare/types/zero_trust/access/applications/access_rule.py
@@ -32,6 +32,10 @@
"AccessCommonNameRuleCommonName",
"AccessLoginMethodRule",
"AccessLoginMethodRuleLoginMethod",
+ "AccessOIDCClaimRule",
+ "AccessOIDCClaimRuleOIDC",
+ "AccessLinkedAppTokenRule",
+ "AccessLinkedAppTokenRuleLinkedAppToken",
]
@@ -68,6 +72,30 @@ class AccessLoginMethodRule(BaseModel):
login_method: AccessLoginMethodRuleLoginMethod
+class AccessOIDCClaimRuleOIDC(BaseModel):
+ claim_name: str
+ """The name of the OIDC claim."""
+
+ claim_value: str
+ """The OIDC claim value to look for."""
+
+ identity_provider_id: str
+ """The ID of your OIDC identity provider."""
+
+
+class AccessOIDCClaimRule(BaseModel):
+ oidc: AccessOIDCClaimRuleOIDC
+
+
+class AccessLinkedAppTokenRuleLinkedAppToken(BaseModel):
+ app_uid: str
+ """The ID of an Access OIDC SaaS application"""
+
+
+class AccessLinkedAppTokenRule(BaseModel):
+ linked_app_token: AccessLinkedAppTokenRuleLinkedAppToken
+
+
AccessRule: TypeAlias = Union[
GroupRule,
AnyValidServiceTokenRule,
@@ -90,5 +118,7 @@ class AccessLoginMethodRule(BaseModel):
IPRule,
OktaGroupRule,
SAMLGroupRule,
+ AccessOIDCClaimRule,
ServiceTokenRule,
+ AccessLinkedAppTokenRule,
]
diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py
index 0e33f24de62..a11f29dd265 100644
--- a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py
+++ b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py
@@ -33,6 +33,10 @@
"AccessCommonNameRuleCommonName",
"AccessLoginMethodRule",
"AccessLoginMethodRuleLoginMethod",
+ "AccessOIDCClaimRule",
+ "AccessOIDCClaimRuleOIDC",
+ "AccessLinkedAppTokenRule",
+ "AccessLinkedAppTokenRuleLinkedAppToken",
]
@@ -69,6 +73,30 @@ class AccessLoginMethodRule(TypedDict, total=False):
login_method: Required[AccessLoginMethodRuleLoginMethod]
+class AccessOIDCClaimRuleOIDC(TypedDict, total=False):
+ claim_name: Required[str]
+ """The name of the OIDC claim."""
+
+ claim_value: Required[str]
+ """The OIDC claim value to look for."""
+
+ identity_provider_id: Required[str]
+ """The ID of your OIDC identity provider."""
+
+
+class AccessOIDCClaimRule(TypedDict, total=False):
+ oidc: Required[AccessOIDCClaimRuleOIDC]
+
+
+class AccessLinkedAppTokenRuleLinkedAppToken(TypedDict, total=False):
+ app_uid: Required[str]
+ """The ID of an Access OIDC SaaS application"""
+
+
+class AccessLinkedAppTokenRule(TypedDict, total=False):
+ linked_app_token: Required[AccessLinkedAppTokenRuleLinkedAppToken]
+
+
AccessRuleParam: TypeAlias = Union[
GroupRuleParam,
AnyValidServiceTokenRuleParam,
@@ -91,5 +119,7 @@ class AccessLoginMethodRule(TypedDict, total=False):
IPRuleParam,
OktaGroupRuleParam,
SAMLGroupRuleParam,
+ AccessOIDCClaimRule,
ServiceTokenRuleParam,
+ AccessLinkedAppTokenRule,
]
diff --git a/src/cloudflare/types/zero_trust/devices/device_list_params.py b/src/cloudflare/types/zero_trust/devices/device_list_params.py
index 05e638302a6..05858f861ea 100644
--- a/src/cloudflare/types/zero_trust/devices/device_list_params.py
+++ b/src/cloudflare/types/zero_trust/devices/device_list_params.py
@@ -39,7 +39,7 @@ class DeviceListParams(TypedDict, total=False):
seen_after: str
"""
- Filters by the last_seen timestamp - returns only devices last seen after this
+ Filter by the last_seen timestamp - returns only devices last seen after this
timestamp.
"""
diff --git a/src/cloudflare/types/zero_trust/devices/registration_list_params.py b/src/cloudflare/types/zero_trust/devices/registration_list_params.py
index 28abde847d5..50fad6bd4d2 100644
--- a/src/cloudflare/types/zero_trust/devices/registration_list_params.py
+++ b/src/cloudflare/types/zero_trust/devices/registration_list_params.py
@@ -33,13 +33,13 @@ class RegistrationListParams(TypedDict, total=False):
seen_after: str
"""
- Filters by the last_seen timestamp - returns only registrations last seen after
+ Filter by the last_seen timestamp - returns only registrations last seen after
this timestamp.
"""
seen_before: str
"""
- Filters by the last_seen timestamp - returns only registrations last seen before
+ Filter by the last_seen timestamp - returns only registrations last seen before
this timestamp.
"""
diff --git a/src/cloudflare/types/zero_trust/dlp/dataset.py b/src/cloudflare/types/zero_trust/dlp/dataset.py
index 58f735d023c..775eb6cb3ca 100644
--- a/src/cloudflare/types/zero_trust/dlp/dataset.py
+++ b/src/cloudflare/types/zero_trust/dlp/dataset.py
@@ -16,13 +16,13 @@ class Column(BaseModel):
num_cells: int
- upload_status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
class Upload(BaseModel):
num_cells: int
- status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
version: int
@@ -42,7 +42,7 @@ class Dataset(BaseModel):
secret: bool
- status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
updated_at: datetime
"""When the dataset was last updated.
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
index 78fa7f784c4..2e10d4c3770 100644
--- a/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
@@ -15,7 +15,7 @@ class Column(BaseModel):
num_cells: int
- upload_status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
class NewVersion(BaseModel):
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py b/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py
index 8370ae917b6..d0dc07005e5 100644
--- a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py
@@ -4,8 +4,6 @@
from typing_extensions import Required, TypedDict
-from ....._types import FileTypes
-
__all__ = ["UploadEditParams"]
@@ -13,5 +11,3 @@ class UploadEditParams(TypedDict, total=False):
account_id: Required[str]
dataset_id: Required[str]
-
- body: Required[FileTypes]
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py
index 53ae57aad51..9b7eaed191e 100755
--- a/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py
@@ -14,4 +14,4 @@ class VersionCreateResponse(BaseModel):
num_cells: int
- upload_status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_params.py b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_params.py
index dd55f1227f4..cee7c6bbd09 100755
--- a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_params.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_params.py
@@ -4,8 +4,6 @@
from typing_extensions import Required, TypedDict
-from ......_types import FileTypes
-
__all__ = ["EntryCreateParams"]
@@ -15,5 +13,3 @@ class EntryCreateParams(TypedDict, total=False):
dataset_id: Required[str]
version: Required[int]
-
- body: Required[FileTypes]
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py
index 9a830f80747..137d2d89d0e 100755
--- a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py
@@ -14,4 +14,4 @@ class EntryCreateResponse(BaseModel):
num_cells: int
- upload_status: Literal["empty", "uploading", "processing", "failed", "complete"]
+ upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/__init__.py b/src/cloudflare/types/zero_trust/dlp/entries/__init__.py
new file mode 100644
index 00000000000..15d05debac2
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/__init__.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .custom_create_params import CustomCreateParams as CustomCreateParams
+from .custom_update_params import CustomUpdateParams as CustomUpdateParams
+from .custom_create_response import CustomCreateResponse as CustomCreateResponse
+from .custom_update_response import CustomUpdateResponse as CustomUpdateResponse
+from .predefined_create_params import PredefinedCreateParams as PredefinedCreateParams
+from .predefined_update_params import PredefinedUpdateParams as PredefinedUpdateParams
+from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams
+from .integration_update_params import IntegrationUpdateParams as IntegrationUpdateParams
+from .predefined_create_response import PredefinedCreateResponse as PredefinedCreateResponse
+from .predefined_update_response import PredefinedUpdateResponse as PredefinedUpdateResponse
+from .integration_create_response import IntegrationCreateResponse as IntegrationCreateResponse
+from .integration_update_response import IntegrationUpdateResponse as IntegrationUpdateResponse
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py
new file mode 100644
index 00000000000..7e3a42d319f
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..profiles.pattern_param import PatternParam
+
+__all__ = ["CustomCreateParams"]
+
+
+class CustomCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ enabled: Required[bool]
+
+ name: Required[str]
+
+ pattern: Required[PatternParam]
+
+ profile_id: Required[str]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py
new file mode 100644
index 00000000000..5a695cc08f1
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ....._models import BaseModel
+from ..profiles.pattern import Pattern
+
+__all__ = ["CustomCreateResponse"]
+
+
+class CustomCreateResponse(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ pattern: Pattern
+
+ updated_at: datetime
+
+ profile_id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py
new file mode 100644
index 00000000000..9fe4584c196
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from ..profiles.pattern_param import PatternParam
+
+__all__ = ["CustomUpdateParams", "Variant0", "Variant1", "Variant2"]
+
+
+class Variant0(TypedDict, total=False):
+ account_id: Required[str]
+
+ name: Required[str]
+
+ pattern: Required[PatternParam]
+
+ type: Required[Literal["custom"]]
+
+ enabled: bool
+
+
+class Variant1(TypedDict, total=False):
+ account_id: Required[str]
+
+ type: Required[Literal["predefined"]]
+
+ enabled: bool
+
+
+class Variant2(TypedDict, total=False):
+ account_id: Required[str]
+
+ type: Required[Literal["integration"]]
+
+ enabled: bool
+
+
+CustomUpdateParams: TypeAlias = Union[Variant0, Variant1, Variant2]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py
new file mode 100644
index 00000000000..423846debdf
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py
@@ -0,0 +1,137 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union, Optional
+from datetime import datetime
+from typing_extensions import Literal, TypeAlias
+
+from ....._models import BaseModel
+from ..profiles.pattern import Pattern
+
+__all__ = [
+ "CustomUpdateResponse",
+ "CustomEntry",
+ "PredefinedEntry",
+ "PredefinedEntryConfidence",
+ "IntegrationEntry",
+ "ExactDataEntry",
+ "DocumentFingerprintEntry",
+ "WordListEntry",
+]
+
+
+class CustomEntry(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ pattern: Pattern
+
+ type: Literal["custom"]
+
+ updated_at: datetime
+
+ profile_id: Optional[str] = None
+
+
+class PredefinedEntryConfidence(BaseModel):
+ ai_context_available: bool
+ """Indicates whether this entry has AI remote service validation."""
+
+ available: bool
+ """
+ Indicates whether this entry has any form of validation that is not an AI remote
+ service.
+ """
+
+
+class PredefinedEntry(BaseModel):
+ id: str
+
+ confidence: PredefinedEntryConfidence
+
+ enabled: bool
+
+ name: str
+
+ type: Literal["predefined"]
+
+ profile_id: Optional[str] = None
+
+
+class IntegrationEntry(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ type: Literal["integration"]
+
+ updated_at: datetime
+
+ profile_id: Optional[str] = None
+
+
+class ExactDataEntry(BaseModel):
+ id: str
+
+ case_sensitive: bool
+ """
+ Only applies to custom word lists. Determines if the words should be matched in
+ a case-sensitive manner Cannot be set to false if secret is true
+ """
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ secret: bool
+
+ type: Literal["exact_data"]
+
+ updated_at: datetime
+
+
+class DocumentFingerprintEntry(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ type: Literal["document_fingerprint"]
+
+ updated_at: datetime
+
+
+class WordListEntry(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ type: Literal["word_list"]
+
+ updated_at: datetime
+
+ word_list: object
+
+ profile_id: Optional[str] = None
+
+
+CustomUpdateResponse: TypeAlias = Union[
+ CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry
+]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py
new file mode 100644
index 00000000000..0127261b9d5
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["IntegrationCreateParams"]
+
+
+class IntegrationCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ enabled: Required[bool]
+
+ entry_id: Required[str]
+
+ profile_id: Optional[str]
+ """
+ This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+ """
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py
new file mode 100644
index 00000000000..1ee434ffa96
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ....._models import BaseModel
+
+__all__ = ["IntegrationCreateResponse"]
+
+
+class IntegrationCreateResponse(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ updated_at: datetime
+
+ profile_id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py
new file mode 100644
index 00000000000..a17458b6ae0
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["IntegrationUpdateParams"]
+
+
+class IntegrationUpdateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ enabled: Required[bool]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py
new file mode 100644
index 00000000000..757686d7058
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ....._models import BaseModel
+
+__all__ = ["IntegrationUpdateResponse"]
+
+
+class IntegrationUpdateResponse(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ enabled: bool
+
+ name: str
+
+ updated_at: datetime
+
+ profile_id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py
new file mode 100644
index 00000000000..8801782faca
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PredefinedCreateParams"]
+
+
+class PredefinedCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ enabled: Required[bool]
+
+ entry_id: Required[str]
+
+ profile_id: Optional[str]
+ """
+ This field is not actually used as the owning profile for a predefined entry is
+ already set to a predefined profile
+ """
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py
new file mode 100644
index 00000000000..de5ef65e7eb
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ....._models import BaseModel
+
+__all__ = ["PredefinedCreateResponse", "Confidence"]
+
+
+class Confidence(BaseModel):
+ ai_context_available: bool
+ """Indicates whether this entry has AI remote service validation."""
+
+ available: bool
+ """
+ Indicates whether this entry has any form of validation that is not an AI remote
+ service.
+ """
+
+
+class PredefinedCreateResponse(BaseModel):
+ id: str
+
+ confidence: Confidence
+
+ enabled: bool
+
+ name: str
+
+ profile_id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py
new file mode 100644
index 00000000000..d38e07163d7
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PredefinedUpdateParams"]
+
+
+class PredefinedUpdateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ enabled: Required[bool]
diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py
new file mode 100644
index 00000000000..06d5f98e106
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ....._models import BaseModel
+
+__all__ = ["PredefinedUpdateResponse", "Confidence"]
+
+
+class Confidence(BaseModel):
+ ai_context_available: bool
+ """Indicates whether this entry has AI remote service validation."""
+
+ available: bool
+ """
+ Indicates whether this entry has any form of validation that is not an AI remote
+ service.
+ """
+
+
+class PredefinedUpdateResponse(BaseModel):
+ id: str
+
+ confidence: Confidence
+
+ enabled: bool
+
+ name: str
+
+ profile_id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py
index 7fb2662045d..47f7328cf22 100644
--- a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py
+++ b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py
@@ -14,7 +14,7 @@
"PredefinedEntryConfidence",
"IntegrationEntry",
"ExactDataEntry",
- "DocumentTemplateEntry",
+ "DocumentFingerprintEntry",
"WordListEntry",
]
@@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel):
updated_at: datetime
-class DocumentTemplateEntry(BaseModel):
+class DocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -133,5 +133,5 @@ class WordListEntry(BaseModel):
EntryGetResponse: TypeAlias = Union[
- CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry
+ CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry
]
diff --git a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py
index 1da2b70ca38..bb10fdb09b3 100644
--- a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py
+++ b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py
@@ -14,7 +14,7 @@
"PredefinedEntryConfidence",
"IntegrationEntry",
"ExactDataEntry",
- "DocumentTemplateEntry",
+ "DocumentFingerprintEntry",
"WordListEntry",
]
@@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel):
updated_at: datetime
-class DocumentTemplateEntry(BaseModel):
+class DocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -133,5 +133,5 @@ class WordListEntry(BaseModel):
EntryListResponse: TypeAlias = Union[
- CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry
+ CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry
]
diff --git a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py
index dcece8b3638..12b5fd242e0 100644
--- a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py
+++ b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py
@@ -14,7 +14,7 @@
"PredefinedEntryConfidence",
"IntegrationEntry",
"ExactDataEntry",
- "DocumentTemplateEntry",
+ "DocumentFingerprintEntry",
"WordListEntry",
]
@@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel):
updated_at: datetime
-class DocumentTemplateEntry(BaseModel):
+class DocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -133,5 +133,5 @@ class WordListEntry(BaseModel):
EntryUpdateResponse: TypeAlias = Union[
- CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry
+ CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry
]
diff --git a/src/cloudflare/types/zero_trust/dlp/profile.py b/src/cloudflare/types/zero_trust/dlp/profile.py
index b1042788f99..aea8fcc7069 100644
--- a/src/cloudflare/types/zero_trust/dlp/profile.py
+++ b/src/cloudflare/types/zero_trust/dlp/profile.py
@@ -18,7 +18,7 @@
"CustomProfileEntryPredefinedEntryConfidence",
"CustomProfileEntryIntegrationEntry",
"CustomProfileEntryExactDataEntry",
- "CustomProfileEntryDocumentTemplateEntry",
+ "CustomProfileEntryDocumentFingerprintEntry",
"CustomProfileEntryWordListEntry",
"PredefinedProfile",
"PredefinedProfileEntry",
@@ -27,7 +27,7 @@
"PredefinedProfileEntryPredefinedEntryConfidence",
"PredefinedProfileEntryIntegrationEntry",
"PredefinedProfileEntryExactDataEntry",
- "PredefinedProfileEntryDocumentTemplateEntry",
+ "PredefinedProfileEntryDocumentFingerprintEntry",
"PredefinedProfileEntryWordListEntry",
"IntegrationProfile",
"IntegrationProfileEntry",
@@ -36,7 +36,7 @@
"IntegrationProfileEntryPredefinedEntryConfidence",
"IntegrationProfileEntryIntegrationEntry",
"IntegrationProfileEntryExactDataEntry",
- "IntegrationProfileEntryDocumentTemplateEntry",
+ "IntegrationProfileEntryDocumentFingerprintEntry",
"IntegrationProfileEntryWordListEntry",
]
@@ -122,7 +122,7 @@ class CustomProfileEntryExactDataEntry(BaseModel):
updated_at: datetime
-class CustomProfileEntryDocumentTemplateEntry(BaseModel):
+class CustomProfileEntryDocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -131,7 +131,7 @@ class CustomProfileEntryDocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -159,7 +159,7 @@ class CustomProfileEntryWordListEntry(BaseModel):
CustomProfileEntryPredefinedEntry,
CustomProfileEntryIntegrationEntry,
CustomProfileEntryExactDataEntry,
- CustomProfileEntryDocumentTemplateEntry,
+ CustomProfileEntryDocumentFingerprintEntry,
CustomProfileEntryWordListEntry,
]
@@ -171,12 +171,6 @@ class CustomProfile(BaseModel):
allowed_match_count: int
"""Related DLP policies will trigger when the match count exceeds the number set."""
- context_awareness: ContextAwareness
- """
- Scan the context of predefined entries to only return matches surrounded by
- keywords.
- """
-
created_at: datetime
"""When the profile was created."""
@@ -196,6 +190,12 @@ class CustomProfile(BaseModel):
confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]] = None
+ context_awareness: Optional[ContextAwareness] = None
+ """
+ Scan the context of predefined entries to only return matches surrounded by
+ keywords.
+ """
+
description: Optional[str] = None
"""The description of the profile."""
@@ -281,7 +281,7 @@ class PredefinedProfileEntryExactDataEntry(BaseModel):
updated_at: datetime
-class PredefinedProfileEntryDocumentTemplateEntry(BaseModel):
+class PredefinedProfileEntryDocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -290,7 +290,7 @@ class PredefinedProfileEntryDocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -318,7 +318,7 @@ class PredefinedProfileEntryWordListEntry(BaseModel):
PredefinedProfileEntryPredefinedEntry,
PredefinedProfileEntryIntegrationEntry,
PredefinedProfileEntryExactDataEntry,
- PredefinedProfileEntryDocumentTemplateEntry,
+ PredefinedProfileEntryDocumentFingerprintEntry,
PredefinedProfileEntryWordListEntry,
]
@@ -433,7 +433,7 @@ class IntegrationProfileEntryExactDataEntry(BaseModel):
updated_at: datetime
-class IntegrationProfileEntryDocumentTemplateEntry(BaseModel):
+class IntegrationProfileEntryDocumentFingerprintEntry(BaseModel):
id: str
created_at: datetime
@@ -442,7 +442,7 @@ class IntegrationProfileEntryDocumentTemplateEntry(BaseModel):
name: str
- type: Literal["document_template"]
+ type: Literal["document_fingerprint"]
updated_at: datetime
@@ -470,7 +470,7 @@ class IntegrationProfileEntryWordListEntry(BaseModel):
IntegrationProfileEntryPredefinedEntry,
IntegrationProfileEntryIntegrationEntry,
IntegrationProfileEntryExactDataEntry,
- IntegrationProfileEntryDocumentTemplateEntry,
+ IntegrationProfileEntryDocumentFingerprintEntry,
IntegrationProfileEntryWordListEntry,
]
diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py
index 48d09684f7b..4b821ad9fd6 100644
--- a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py
+++ b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py
@@ -6,4 +6,5 @@
from .pattern_param import PatternParam as PatternParam
from .custom_create_params import CustomCreateParams as CustomCreateParams
from .custom_update_params import CustomUpdateParams as CustomUpdateParams
+from .predefined_create_params import PredefinedCreateParams as PredefinedCreateParams
from .predefined_update_params import PredefinedUpdateParams as PredefinedUpdateParams
diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py
index 09dfda22c00..139192a7574 100644
--- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py
+++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py
@@ -18,6 +18,7 @@
"SharedEntryPredefined",
"SharedEntryIntegration",
"SharedEntryExactData",
+ "SharedEntryUnionMember4",
]
@@ -105,4 +106,14 @@ class SharedEntryExactData(TypedDict, total=False):
entry_type: Required[Literal["exact_data"]]
-SharedEntry: TypeAlias = Union[SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData]
+class SharedEntryUnionMember4(TypedDict, total=False):
+ enabled: Required[bool]
+
+ entry_id: Required[str]
+
+ entry_type: Required[Literal["document_fingerprint"]]
+
+
+SharedEntry: TypeAlias = Union[
+ SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember4
+]
diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py
index 9bfb604a4b2..466eb7569ae 100644
--- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py
+++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py
@@ -17,6 +17,7 @@
"SharedEntryPredefined",
"SharedEntryIntegration",
"SharedEntryExactData",
+ "SharedEntryUnionMember3",
]
@@ -97,4 +98,14 @@ class SharedEntryExactData(TypedDict, total=False):
entry_type: Required[Literal["exact_data"]]
-SharedEntry: TypeAlias = Union[SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData]
+class SharedEntryUnionMember3(TypedDict, total=False):
+ enabled: Required[bool]
+
+ entry_id: Required[str]
+
+ entry_type: Required[Literal["document_fingerprint"]]
+
+
+SharedEntry: TypeAlias = Union[
+ SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember3
+]
diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py
new file mode 100644
index 00000000000..e36d738f641
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable, Optional
+from typing_extensions import Required, TypedDict
+
+from ..context_awareness_param import ContextAwarenessParam
+
+__all__ = ["PredefinedCreateParams", "Entry"]
+
+
+class PredefinedCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ profile_id: Required[str]
+
+ ai_context_enabled: bool
+
+ allowed_match_count: Optional[int]
+
+ confidence_threshold: Optional[str]
+
+ context_awareness: ContextAwarenessParam
+ """
+ Scan the context of predefined entries to only return matches surrounded by
+ keywords.
+ """
+
+ entries: Iterable[Entry]
+
+ ocr_enabled: bool
+
+
+class Entry(TypedDict, total=False):
+ id: Required[str]
+
+ enabled: Required[bool]
diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py
index 3493d5e0603..17c93d1d9b4 100644
--- a/src/cloudflare/types/zero_trust/gateway/__init__.py
+++ b/src/cloudflare/types/zero_trust/gateway/__init__.py
@@ -31,7 +31,6 @@
from .list_list_params import ListListParams as ListListParams
from .doh_endpoint_param import DOHEndpointParam as DOHEndpointParam
from .dot_endpoint_param import DOTEndpointParam as DOTEndpointParam
-from .gateway_item_param import GatewayItemParam as GatewayItemParam
from .ipv6_network_param import IPV6NetworkParam as IPV6NetworkParam
from .list_create_params import ListCreateParams as ListCreateParams
from .list_update_params import ListUpdateParams as ListUpdateParams
diff --git a/src/cloudflare/types/zero_trust/gateway/activity_log_settings_param.py b/src/cloudflare/types/zero_trust/gateway/activity_log_settings_param.py
index 5dcdd0e03b6..6bb8b38f1e0 100644
--- a/src/cloudflare/types/zero_trust/gateway/activity_log_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/activity_log_settings_param.py
@@ -2,11 +2,12 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import TypedDict
__all__ = ["ActivityLogSettingsParam"]
class ActivityLogSettingsParam(TypedDict, total=False):
- enabled: bool
+ enabled: Optional[bool]
"""Enable activity logging."""
diff --git a/src/cloudflare/types/zero_trust/gateway/anti_virus_settings_param.py b/src/cloudflare/types/zero_trust/gateway/anti_virus_settings_param.py
index 7aec6568292..9f41b96ea89 100644
--- a/src/cloudflare/types/zero_trust/gateway/anti_virus_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/anti_virus_settings_param.py
@@ -11,13 +11,13 @@
class AntiVirusSettingsParam(TypedDict, total=False):
- enabled_download_phase: bool
+ enabled_download_phase: Optional[bool]
"""Enable anti-virus scanning on downloads."""
- enabled_upload_phase: bool
+ enabled_upload_phase: Optional[bool]
"""Enable anti-virus scanning on uploads."""
- fail_closed: bool
+ fail_closed: Optional[bool]
"""Block requests for files that cannot be scanned."""
notification_settings: Optional[NotificationSettingsParam]
diff --git a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py
index 2b587764cff..4e6ba633c56 100644
--- a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py
+++ b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py
@@ -50,6 +50,15 @@ class BlockPageSettings(BaseModel):
name: Optional[str] = None
"""If mode is customized_block_page: block page title."""
+ read_only: Optional[bool] = None
+ """
+ This setting was shared via the Orgs API and cannot be edited by the current
+ account
+ """
+
+ source_account: Optional[str] = None
+ """Account tag of account that shared this setting"""
+
suppress_footer: Optional[bool] = None
"""
If mode is customized_block_page: suppress detailed info at the bottom of the
@@ -58,3 +67,6 @@ class BlockPageSettings(BaseModel):
target_uri: Optional[str] = None
"""If mode is redirect_uri: URI to which the user should be redirected."""
+
+ version: Optional[int] = None
+ """Version number of the setting"""
diff --git a/src/cloudflare/types/zero_trust/gateway/block_page_settings_param.py b/src/cloudflare/types/zero_trust/gateway/block_page_settings_param.py
index 669f363e311..448e0f10272 100644
--- a/src/cloudflare/types/zero_trust/gateway/block_page_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/block_page_settings_param.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import Literal, TypedDict
__all__ = ["BlockPageSettingsParam"]
@@ -13,7 +14,7 @@ class BlockPageSettingsParam(TypedDict, total=False):
If mode is customized_block_page: block page background color in #rrggbb format.
"""
- enabled: bool
+ enabled: Optional[bool]
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
footer_text: str
diff --git a/src/cloudflare/types/zero_trust/gateway/body_scanning_settings.py b/src/cloudflare/types/zero_trust/gateway/body_scanning_settings.py
index 4d21ed246a6..f64b1a61833 100644
--- a/src/cloudflare/types/zero_trust/gateway/body_scanning_settings.py
+++ b/src/cloudflare/types/zero_trust/gateway/body_scanning_settings.py
@@ -1,6 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
+from typing_extensions import Literal
from ...._models import BaseModel
@@ -8,5 +9,5 @@
class BodyScanningSettings(BaseModel):
- inspection_mode: Optional[str] = None
+ inspection_mode: Optional[Literal["deep", "shallow"]] = None
"""Set the inspection mode to either `deep` or `shallow`."""
diff --git a/src/cloudflare/types/zero_trust/gateway/body_scanning_settings_param.py b/src/cloudflare/types/zero_trust/gateway/body_scanning_settings_param.py
index 3ffd6f9037e..c8f3e5afb6e 100644
--- a/src/cloudflare/types/zero_trust/gateway/body_scanning_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/body_scanning_settings_param.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Literal, TypedDict
__all__ = ["BodyScanningSettingsParam"]
class BodyScanningSettingsParam(TypedDict, total=False):
- inspection_mode: str
+ inspection_mode: Literal["deep", "shallow"]
"""Set the inspection mode to either `deep` or `shallow`."""
diff --git a/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings.py b/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings.py
index 95540254905..ff66bad16b9 100644
--- a/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings.py
+++ b/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings.py
@@ -9,7 +9,7 @@
class CustomCertificateSettings(BaseModel):
- enabled: bool
+ enabled: Optional[bool] = None
"""Enable use of custom certificate authority for signing Gateway traffic."""
id: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings_param.py b/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings_param.py
index 60627d47117..15f644be490 100644
--- a/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/custom_certificate_settings_param.py
@@ -2,13 +2,14 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import Required, TypedDict
__all__ = ["CustomCertificateSettingsParam"]
class CustomCertificateSettingsParam(TypedDict, total=False):
- enabled: Required[bool]
+ enabled: Required[Optional[bool]]
"""Enable use of custom certificate authority for signing Gateway traffic."""
id: str
diff --git a/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py
index b742fc65b52..abe16c9d3a7 100644
--- a/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable
+from typing import Iterable, Optional
from typing_extensions import TypedDict
from .ip_network_param import IPNetworkParam
@@ -14,7 +14,7 @@ class DOHEndpointParam(TypedDict, total=False):
enabled: bool
"""True if the endpoint is enabled for this location."""
- networks: Iterable[IPNetworkParam]
+ networks: Optional[Iterable[IPNetworkParam]]
"""A list of allowed source IP network ranges for this endpoint.
When empty, all source IPs are allowed. A non-empty list is only effective if
diff --git a/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py
index f72b4c1ef13..2766ec6c45e 100644
--- a/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable
+from typing import Iterable, Optional
from typing_extensions import TypedDict
from .ip_network_param import IPNetworkParam
@@ -14,7 +14,7 @@ class DOTEndpointParam(TypedDict, total=False):
enabled: bool
"""True if the endpoint is enabled for this location."""
- networks: Iterable[IPNetworkParam]
+ networks: Optional[Iterable[IPNetworkParam]]
"""A list of allowed source IP network ranges for this endpoint.
When empty, all source IPs are allowed. A non-empty list is only effective if
diff --git a/src/cloudflare/types/zero_trust/gateway/endpoint.py b/src/cloudflare/types/zero_trust/gateway/endpoint.py
index 9afb209057c..97c5d8a8e3a 100644
--- a/src/cloudflare/types/zero_trust/gateway/endpoint.py
+++ b/src/cloudflare/types/zero_trust/gateway/endpoint.py
@@ -1,7 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
-
from ...._models import BaseModel
from .doh_endpoint import DOHEndpoint
from .dot_endpoint import DOTEndpoint
@@ -12,10 +10,10 @@
class Endpoint(BaseModel):
- doh: Optional[DOHEndpoint] = None
+ doh: DOHEndpoint
- dot: Optional[DOTEndpoint] = None
+ dot: DOTEndpoint
- ipv4: Optional[IPV4Endpoint] = None
+ ipv4: IPV4Endpoint
- ipv6: Optional[IPV6Endpoint] = None
+ ipv6: IPV6Endpoint
diff --git a/src/cloudflare/types/zero_trust/gateway/endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/endpoint_param.py
index 5494922cd67..3fc40f8abe4 100644
--- a/src/cloudflare/types/zero_trust/gateway/endpoint_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/endpoint_param.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
from .doh_endpoint_param import DOHEndpointParam
from .dot_endpoint_param import DOTEndpointParam
@@ -13,10 +13,10 @@
class EndpointParam(TypedDict, total=False):
- doh: DOHEndpointParam
+ doh: Required[DOHEndpointParam]
- dot: DOTEndpointParam
+ dot: Required[DOTEndpointParam]
- ipv4: IPV4EndpointParam
+ ipv4: Required[IPV4EndpointParam]
- ipv6: IPV6EndpointParam
+ ipv6: Required[IPV6EndpointParam]
diff --git a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py
index ff34962235c..3ca646961f3 100644
--- a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py
+++ b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py
@@ -13,3 +13,15 @@ class ExtendedEmailMatching(BaseModel):
modifiers) used as criteria in Firewall policies.
"""
+
+ read_only: Optional[bool] = None
+ """
+ This setting was shared via the Orgs API and cannot be edited by the current
+ account
+ """
+
+ source_account: Optional[str] = None
+ """Account tag of account that shared this setting"""
+
+ version: Optional[int] = None
+ """Version number of the setting"""
diff --git a/src/cloudflare/types/zero_trust/gateway/extended_email_matching_param.py b/src/cloudflare/types/zero_trust/gateway/extended_email_matching_param.py
index cdf65749933..4627aae66ae 100644
--- a/src/cloudflare/types/zero_trust/gateway/extended_email_matching_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/extended_email_matching_param.py
@@ -2,13 +2,14 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import TypedDict
__all__ = ["ExtendedEmailMatchingParam"]
class ExtendedEmailMatchingParam(TypedDict, total=False):
- enabled: bool
+ enabled: Optional[bool]
"""Enable matching all variants of user emails (with + or .
modifiers) used as criteria in Firewall policies.
diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py
index 33632f6afc7..b71466a5047 100644
--- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py
+++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py
@@ -3,8 +3,6 @@
from typing import Optional
from typing_extensions import Literal
-from pydantic import Field as FieldInfo
-
from ...._models import BaseModel
from .tls_settings import TLSSettings
from .fips_settings import FipsSettings
@@ -17,12 +15,7 @@
from .browser_isolation_settings import BrowserIsolationSettings
from .custom_certificate_settings import CustomCertificateSettings
-__all__ = ["GatewayConfigurationSettings", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
-
-
-class AppControlSettings(BaseModel):
- enabled: Optional[bool] = None
- """Enable App Control"""
+__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Inspection", "Sandbox"]
class Certificate(BaseModel):
@@ -39,6 +32,17 @@ class HostSelector(BaseModel):
"""Enable filtering via hosts for egress policies."""
+class Inspection(BaseModel):
+ mode: Optional[Literal["static", "dynamic"]] = None
+ """Defines the mode of inspection the proxy will use.
+
+ - static: Gateway will use static inspection to inspect HTTP on TCP(80). If TLS
+ decryption is on, Gateway will inspect HTTPS traffic on TCP(443) & UDP(443).
+ - dynamic: Gateway will use protocol detection to dynamically inspect HTTP and
+ HTTPS traffic on any port. TLS decryption must be on to inspect HTTPS traffic.
+ """
+
+
class Sandbox(BaseModel):
enabled: Optional[bool] = None
"""Enable sandbox."""
@@ -54,9 +58,6 @@ class GatewayConfigurationSettings(BaseModel):
antivirus: Optional[AntiVirusSettings] = None
"""Anti-virus settings."""
- app_control_settings: Optional[AppControlSettings] = FieldInfo(alias="app-control-settings", default=None)
- """Setting to enable App Control"""
-
block_page: Optional[BlockPageSettings] = None
"""Block page layout settings."""
@@ -87,6 +88,9 @@ class GatewayConfigurationSettings(BaseModel):
host_selector: Optional[HostSelector] = None
"""Setting to enable host selector in egress policies."""
+ inspection: Optional[Inspection] = None
+ """Setting to define inspection settings"""
+
protocol_detection: Optional[ProtocolDetection] = None
"""Protocol Detection settings."""
diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py
index b3d391ed319..caedfe7943a 100644
--- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py
@@ -3,9 +3,8 @@
from __future__ import annotations
from typing import Optional
-from typing_extensions import Literal, Required, Annotated, TypedDict
+from typing_extensions import Literal, Required, TypedDict
-from ...._utils import PropertyInfo
from .tls_settings_param import TLSSettingsParam
from .fips_settings_param import FipsSettingsParam
from .protocol_detection_param import ProtocolDetectionParam
@@ -17,12 +16,7 @@
from .browser_isolation_settings_param import BrowserIsolationSettingsParam
from .custom_certificate_settings_param import CustomCertificateSettingsParam
-__all__ = ["GatewayConfigurationSettingsParam", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
-
-
-class AppControlSettings(TypedDict, total=False):
- enabled: bool
- """Enable App Control"""
+__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Inspection", "Sandbox"]
class Certificate(TypedDict, total=False):
@@ -35,12 +29,23 @@ class Certificate(TypedDict, total=False):
class HostSelector(TypedDict, total=False):
- enabled: bool
+ enabled: Optional[bool]
"""Enable filtering via hosts for egress policies."""
+class Inspection(TypedDict, total=False):
+ mode: Literal["static", "dynamic"]
+ """Defines the mode of inspection the proxy will use.
+
+ - static: Gateway will use static inspection to inspect HTTP on TCP(80). If TLS
+ decryption is on, Gateway will inspect HTTPS traffic on TCP(443) & UDP(443).
+ - dynamic: Gateway will use protocol detection to dynamically inspect HTTP and
+ HTTPS traffic on any port. TLS decryption must be on to inspect HTTPS traffic.
+ """
+
+
class Sandbox(TypedDict, total=False):
- enabled: bool
+ enabled: Optional[bool]
"""Enable sandbox."""
fallback_action: Literal["allow", "block"]
@@ -54,9 +59,6 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
antivirus: Optional[AntiVirusSettingsParam]
"""Anti-virus settings."""
- app_control_settings: Annotated[Optional[AppControlSettings], PropertyInfo(alias="app-control-settings")]
- """Setting to enable App Control"""
-
block_page: Optional[BlockPageSettingsParam]
"""Block page layout settings."""
@@ -87,6 +89,9 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
host_selector: Optional[HostSelector]
"""Setting to enable host selector in egress policies."""
+ inspection: Optional[Inspection]
+ """Setting to define inspection settings"""
+
protocol_detection: Optional[ProtocolDetectionParam]
"""Protocol Detection settings."""
diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py
deleted file mode 100644
index e1f175cf254..00000000000
--- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["GatewayItemParam"]
-
-
-class GatewayItemParam(TypedDict, total=False):
- description: str
- """The description of the list item, if present"""
-
- value: str
- """The value of the item in a list."""
diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py
index 411a06e4c77..dcfa9a1429c 100644
--- a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py
+++ b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py
@@ -36,34 +36,56 @@ class Expiration(BaseModel):
class GatewayRule(BaseModel):
- id: Optional[str] = None
- """The API resource UUID."""
-
- action: Optional[
- Literal[
- "on",
- "off",
- "allow",
- "block",
- "scan",
- "noscan",
- "safesearch",
- "ytrestricted",
- "isolate",
- "noisolate",
- "override",
- "l4_override",
- "egress",
- "resolve",
- "quarantine",
- "redirect",
- ]
- ] = None
+ action: Literal[
+ "on",
+ "off",
+ "allow",
+ "block",
+ "scan",
+ "noscan",
+ "safesearch",
+ "ytrestricted",
+ "isolate",
+ "noisolate",
+ "override",
+ "l4_override",
+ "egress",
+ "resolve",
+ "quarantine",
+ "redirect",
+ ]
"""
- The action to preform when the associated traffic, identity, and device posture
+ The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
"""
+ enabled: bool
+ """True if the rule is enabled."""
+
+ filters: List[GatewayFilter]
+ """
+ The protocol or layer to evaluate the traffic, identity, and device posture
+ expressions.
+ """
+
+ name: str
+ """The name of the rule."""
+
+ precedence: int
+ """Precedence sets the order of your rules.
+
+ Lower values indicate higher precedence. At each processing phase, applicable
+ rules are evaluated in ascending order of this value. Refer to
+ [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform)
+ docs on how to manage precedence via Terraform.
+ """
+
+ traffic: str
+ """The wirefilter expression used for traffic matching."""
+
+ id: Optional[str] = None
+ """The API resource UUID."""
+
created_at: Optional[datetime] = None
deleted_at: Optional[datetime] = None
@@ -75,9 +97,6 @@ class GatewayRule(BaseModel):
device_posture: Optional[str] = None
"""The wirefilter expression used for device posture check matching."""
- enabled: Optional[bool] = None
- """True if the rule is enabled."""
-
expiration: Optional[Expiration] = None
"""The expiration time stamp and default duration of a DNS policy.
@@ -86,25 +105,15 @@ class GatewayRule(BaseModel):
This does not apply to HTTP or network policies.
"""
- filters: Optional[List[GatewayFilter]] = None
- """
- The protocol or layer to evaluate the traffic, identity, and device posture
- expressions.
- """
-
identity: Optional[str] = None
"""The wirefilter expression used for identity matching."""
- name: Optional[str] = None
- """The name of the rule."""
+ not_sharable: Optional[bool] = None
+ """The rule cannot be shared via the Orgs API"""
- precedence: Optional[int] = None
- """Precedence sets the order of your rules.
-
- Lower values indicate higher precedence. At each processing phase, applicable
- rules are evaluated in ascending order of this value. Refer to
- [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform)
- docs on how to manage precedence via Terraform.
+ read_only: Optional[bool] = None
+ """
+ The rule was shared via the Orgs API and cannot be edited by the current account
"""
rule_settings: Optional[RuleSetting] = None
@@ -116,8 +125,8 @@ class GatewayRule(BaseModel):
This does not apply to HTTP or network policies.
"""
- traffic: Optional[str] = None
- """The wirefilter expression used for traffic matching."""
+ source_account: Optional[str] = None
+ """account tag of account that created the rule"""
updated_at: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py
index 5c48a9dc32e..df7ead856d4 100644
--- a/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable
+from typing import Iterable, Optional
from typing_extensions import TypedDict
from .ipv6_network_param import IPV6NetworkParam
@@ -14,7 +14,7 @@ class IPV6EndpointParam(TypedDict, total=False):
enabled: bool
"""True if the endpoint is enabled for this location."""
- networks: Iterable[IPV6NetworkParam]
+ networks: Optional[Iterable[IPV6NetworkParam]]
"""A list of allowed source IPv6 network ranges for this endpoint.
When empty, all source IPs are allowed. A non-empty list is only effective if
diff --git a/src/cloudflare/types/zero_trust/gateway/list_create_params.py b/src/cloudflare/types/zero_trust/gateway/list_create_params.py
index c1d48ff069c..08477c82c71 100644
--- a/src/cloudflare/types/zero_trust/gateway/list_create_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/list_create_params.py
@@ -5,9 +5,7 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
-from .gateway_item_param import GatewayItemParam
-
-__all__ = ["ListCreateParams"]
+__all__ = ["ListCreateParams", "Item"]
class ListCreateParams(TypedDict, total=False):
@@ -22,5 +20,13 @@ class ListCreateParams(TypedDict, total=False):
description: str
"""The description of the list."""
- items: Iterable[GatewayItemParam]
- """The items in the list."""
+ items: Iterable[Item]
+ """items to add to the list."""
+
+
+class Item(TypedDict, total=False):
+ description: str
+ """The description of the list item, if present"""
+
+ value: str
+ """The value of the item in a list."""
diff --git a/src/cloudflare/types/zero_trust/gateway/list_update_params.py b/src/cloudflare/types/zero_trust/gateway/list_update_params.py
index d02a3f2a256..b6aed84e8fd 100644
--- a/src/cloudflare/types/zero_trust/gateway/list_update_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/list_update_params.py
@@ -5,9 +5,7 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-from .gateway_item_param import GatewayItemParam
-
-__all__ = ["ListUpdateParams"]
+__all__ = ["ListUpdateParams", "Item"]
class ListUpdateParams(TypedDict, total=False):
@@ -19,5 +17,13 @@ class ListUpdateParams(TypedDict, total=False):
description: str
"""The description of the list."""
- items: Iterable[GatewayItemParam]
- """The items in the list."""
+ items: Iterable[Item]
+ """items to add to the list."""
+
+
+class Item(TypedDict, total=False):
+ description: str
+ """The description of the list item, if present"""
+
+ value: str
+ """The value of the item in a list."""
diff --git a/src/cloudflare/types/zero_trust/gateway/location.py b/src/cloudflare/types/zero_trust/gateway/location.py
index a5755c64010..547a5e84b8c 100644
--- a/src/cloudflare/types/zero_trust/gateway/location.py
+++ b/src/cloudflare/types/zero_trust/gateway/location.py
@@ -29,7 +29,7 @@ class Location(BaseModel):
"""
The uuid identifier of the IPv6 block brought to the gateway, so that this
location's IPv6 address is allocated from the Bring Your Own Ipv6(BYOIPv6) block
- and not from the standard CloudFlare IPv6 block.
+ and not from the standard Cloudflare IPv6 block.
"""
doh_subdomain: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/gateway/location_create_params.py b/src/cloudflare/types/zero_trust/gateway/location_create_params.py
index 69898f1625b..df266be80db 100644
--- a/src/cloudflare/types/zero_trust/gateway/location_create_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/location_create_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable
+from typing import Iterable, Optional
from typing_extensions import Required, TypedDict
from .endpoint_param import EndpointParam
@@ -31,14 +31,14 @@ class LocationCreateParams(TypedDict, total=False):
ecs_support: bool
"""True if the location needs to resolve EDNS queries."""
- endpoints: EndpointParam
+ endpoints: Optional[EndpointParam]
"""The destination endpoints configured for this location.
When updating a location, if this field is absent or set with null, the
endpoints configuration remains unchanged.
"""
- networks: Iterable[Network]
+ networks: Optional[Iterable[Network]]
"""A list of network ranges that requests from this location would originate from.
A non-empty list is only effective if the ipv4 endpoint is enabled for this
diff --git a/src/cloudflare/types/zero_trust/gateway/location_update_params.py b/src/cloudflare/types/zero_trust/gateway/location_update_params.py
index 530e5b17e6c..7c34d4b8801 100644
--- a/src/cloudflare/types/zero_trust/gateway/location_update_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/location_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable
+from typing import Iterable, Optional
from typing_extensions import Required, TypedDict
from .endpoint_param import EndpointParam
@@ -31,14 +31,14 @@ class LocationUpdateParams(TypedDict, total=False):
ecs_support: bool
"""True if the location needs to resolve EDNS queries."""
- endpoints: EndpointParam
+ endpoints: Optional[EndpointParam]
"""The destination endpoints configured for this location.
When updating a location, if this field is absent or set with null, the
endpoints configuration remains unchanged.
"""
- networks: Iterable[Network]
+ networks: Optional[Iterable[Network]]
"""A list of network ranges that requests from this location would originate from.
A non-empty list is only effective if the ipv4 endpoint is enabled for this
diff --git a/src/cloudflare/types/zero_trust/gateway/protocol_detection_param.py b/src/cloudflare/types/zero_trust/gateway/protocol_detection_param.py
index faece993406..3608cee7351 100644
--- a/src/cloudflare/types/zero_trust/gateway/protocol_detection_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/protocol_detection_param.py
@@ -2,11 +2,12 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import TypedDict
__all__ = ["ProtocolDetectionParam"]
class ProtocolDetectionParam(TypedDict, total=False):
- enabled: bool
+ enabled: Optional[bool]
"""Enable detecting protocol on initial bytes of client traffic."""
diff --git a/src/cloudflare/types/zero_trust/gateway/rule_create_params.py b/src/cloudflare/types/zero_trust/gateway/rule_create_params.py
index 11890eae556..9219840a8df 100644
--- a/src/cloudflare/types/zero_trust/gateway/rule_create_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/rule_create_params.py
@@ -38,7 +38,7 @@ class RuleCreateParams(TypedDict, total=False):
]
]
"""
- The action to preform when the associated traffic, identity, and device posture
+ The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
"""
diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting.py b/src/cloudflare/types/zero_trust/gateway/rule_setting.py
index 84432d8e0bb..f976a1ec348 100644
--- a/src/cloudflare/types/zero_trust/gateway/rule_setting.py
+++ b/src/cloudflare/types/zero_trust/gateway/rule_setting.py
@@ -202,7 +202,7 @@ class UntrustedCERT(BaseModel):
class RuleSetting(BaseModel):
- add_headers: Optional[Dict[str, str]] = None
+ add_headers: Optional[Dict[str, List[str]]] = None
"""Add custom headers to allowed requests, in the form of key-value pairs.
Keys are header names, pointing to an array with its header value(s).
diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py
index ce610ff6660..56cfecd544b 100644
--- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py
+++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py
@@ -201,7 +201,7 @@ class UntrustedCERT(TypedDict, total=False):
class RuleSettingParam(TypedDict, total=False):
- add_headers: Optional[Dict[str, str]]
+ add_headers: Optional[Dict[str, List[str]]]
"""Add custom headers to allowed requests, in the form of key-value pairs.
Keys are header names, pointing to an array with its header value(s).
@@ -213,7 +213,7 @@ class RuleSettingParam(TypedDict, total=False):
audit_ssh: Optional[AuditSSH]
"""Settings for the Audit SSH action."""
- biso_admin_controls: Optional[BISOAdminControls]
+ biso_admin_controls: BISOAdminControls
"""Configure how browser isolation behaves."""
block_page: Optional[BlockPage]
@@ -225,7 +225,7 @@ class RuleSettingParam(TypedDict, total=False):
block_page_enabled: bool
"""Enable the custom block page."""
- block_reason: str
+ block_reason: Optional[str]
"""
The text describing why this block occurred, displayed on the custom block page
(if enabled).
diff --git a/src/cloudflare/types/zero_trust/gateway/rule_update_params.py b/src/cloudflare/types/zero_trust/gateway/rule_update_params.py
index 930f828f8bf..5171c30b9d4 100644
--- a/src/cloudflare/types/zero_trust/gateway/rule_update_params.py
+++ b/src/cloudflare/types/zero_trust/gateway/rule_update_params.py
@@ -38,7 +38,7 @@ class RuleUpdateParams(TypedDict, total=False):
]
]
"""
- The action to preform when the associated traffic, identity, and device posture
+ The action to perform when the associated traffic, identity, and device posture
expressions are either absent or evaluate to `true`.
"""
diff --git a/tests/api_resources/accounts/logs/test_audit.py b/tests/api_resources/accounts/logs/test_audit.py
index 492d0ca3521..3cb3c774a1d 100644
--- a/tests/api_resources/accounts/logs/test_audit.py
+++ b/tests/api_resources/accounts/logs/test_audit.py
@@ -105,7 +105,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAudit:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO:investigate broken test")
@parametrize
diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py
index f35d0e13841..7a280726d61 100644
--- a/tests/api_resources/accounts/test_members.py
+++ b/tests/api_resources/accounts/test_members.py
@@ -508,7 +508,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMembers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py
index 6a97d8c4b31..b6f6aa04a0d 100644
--- a/tests/api_resources/accounts/test_roles.py
+++ b/tests/api_resources/accounts/test_roles.py
@@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRoles:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/accounts/test_subscriptions.py b/tests/api_resources/accounts/test_subscriptions.py
index b09e6c11610..1ef48e9a3c3 100644
--- a/tests/api_resources/accounts/test_subscriptions.py
+++ b/tests/api_resources/accounts/test_subscriptions.py
@@ -232,7 +232,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSubscriptions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py
index 6b17512734d..a936ded5e33 100644
--- a/tests/api_resources/accounts/test_tokens.py
+++ b/tests/api_resources/accounts/test_tokens.py
@@ -37,10 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -71,10 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
condition={
@@ -101,10 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -127,10 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
) as response:
@@ -156,10 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -178,13 +163,9 @@ def test_method_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -214,13 +195,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
condition={
"request_ip": {
"in": ["123.123.123.0/24", "2606:4700::/32"],
@@ -229,6 +206,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
expires_on=parse_datetime("2020-01-01T00:00:00Z"),
not_before=parse_datetime("2018-07-01T05:20:00Z"),
+ status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -246,13 +224,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert response.is_closed is True
@@ -274,13 +248,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -305,13 +275,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"):
@@ -326,13 +292,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
@pytest.mark.skip(reason="TODO: investigate broken test")
@@ -536,7 +498,9 @@ def test_path_params_verify(self, client: Cloudflare) -> None:
class TestAsyncTokens:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -551,10 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -585,10 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
condition={
@@ -615,10 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -641,10 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
) as response:
@@ -670,10 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -692,13 +641,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -728,13 +673,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
condition={
"request_ip": {
"in": ["123.123.123.0/24", "2606:4700::/32"],
@@ -743,6 +684,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
expires_on=parse_datetime("2020-01-01T00:00:00Z"),
not_before=parse_datetime("2018-07-01T05:20:00Z"),
+ status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -760,13 +702,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert response.is_closed is True
@@ -788,13 +726,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -819,13 +753,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"):
@@ -840,13 +770,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
@pytest.mark.skip(reason="TODO: investigate broken test")
diff --git a/tests/api_resources/accounts/tokens/test_permission_groups.py b/tests/api_resources/accounts/tokens/test_permission_groups.py
index bd764c44569..fd4d295b70e 100644
--- a/tests/api_resources/accounts/tokens/test_permission_groups.py
+++ b/tests/api_resources/accounts/tokens/test_permission_groups.py
@@ -3,14 +3,17 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.accounts.tokens import PermissionGroupGetResponse, PermissionGroupListResponse
+from cloudflare.types.accounts.tokens import (
+ PermissionGroupGetResponse,
+ PermissionGroupListResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -26,6 +29,16 @@ def test_method_list(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ permission_group = client.accounts.tokens.permission_groups.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -66,7 +79,17 @@ def test_method_get(self, client: Cloudflare) -> None:
permission_group = client.accounts.tokens.permission_groups.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ permission_group = client.accounts.tokens.permission_groups.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -78,7 +101,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission_group = response.parse()
- assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -90,7 +113,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission_group = response.parse()
- assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -104,7 +127,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPermissionGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -114,6 +139,16 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ permission_group = await async_client.accounts.tokens.permission_groups.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -154,7 +189,17 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
permission_group = await async_client.accounts.tokens.permission_groups.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ permission_group = await async_client.accounts.tokens.permission_groups.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -166,7 +211,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission_group = await response.parse()
- assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -178,7 +223,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission_group = await response.parse()
- assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"])
+ assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/accounts/tokens/test_value.py b/tests/api_resources/accounts/tokens/test_value.py
index 00a709c212b..c04ad23d1c6 100644
--- a/tests/api_resources/accounts/tokens/test_value.py
+++ b/tests/api_resources/accounts/tokens/test_value.py
@@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncValue:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/acm/test_total_tls.py b/tests/api_resources/acm/test_total_tls.py
index cf7af173e5f..f627910b593 100644
--- a/tests/api_resources/acm/test_total_tls.py
+++ b/tests/api_resources/acm/test_total_tls.py
@@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTotalTLS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py
index 3bb5dc17626..8a8a2efbacc 100644
--- a/tests/api_resources/addressing/address_maps/test_accounts.py
+++ b/tests/api_resources/addressing/address_maps/test_accounts.py
@@ -120,7 +120,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncAccounts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py
index 63221153f3a..ee94225fd61 100644
--- a/tests/api_resources/addressing/address_maps/test_ips.py
+++ b/tests/api_resources/addressing/address_maps/test_ips.py
@@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncIPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py
index f0fe5d2d2bb..978b3f76428 100644
--- a/tests/api_resources/addressing/address_maps/test_zones.py
+++ b/tests/api_resources/addressing/address_maps/test_zones.py
@@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncZones:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/prefixes/test_advertisement_status.py b/tests/api_resources/addressing/prefixes/test_advertisement_status.py
index 23ecde2d395..4bc11f6f6b1 100644
--- a/tests/api_resources/addressing/prefixes/test_advertisement_status.py
+++ b/tests/api_resources/addressing/prefixes/test_advertisement_status.py
@@ -135,7 +135,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAdvertisementStatus:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py
index c66ff1c56f0..0c0f362943e 100644
--- a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py
+++ b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py
@@ -139,8 +139,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
account_id="258def64c72dae45f3e4c8516e2111f2",
prefix_id="2af39739cc4e3b5910c918468bb89828",
asn_prepend_count=2,
+ auto_advertise_withdraw=True,
on_demand={"advertised": True},
- withdraw_if_no_route=True,
)
assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"])
@@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBGPPrefixes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -380,8 +382,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
account_id="258def64c72dae45f3e4c8516e2111f2",
prefix_id="2af39739cc4e3b5910c918468bb89828",
asn_prepend_count=2,
+ auto_advertise_withdraw=True,
on_demand={"advertised": True},
- withdraw_if_no_route=True,
)
assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"])
diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py
index 83ec07279cc..a819531b501 100644
--- a/tests/api_resources/addressing/prefixes/test_delegations.py
+++ b/tests/api_resources/addressing/prefixes/test_delegations.py
@@ -186,7 +186,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncDelegations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/prefixes/test_service_bindings.py b/tests/api_resources/addressing/prefixes/test_service_bindings.py
index 98156802f9c..45a766105ab 100644
--- a/tests/api_resources/addressing/prefixes/test_service_bindings.py
+++ b/tests/api_resources/addressing/prefixes/test_service_bindings.py
@@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncServiceBindings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/regional_hostnames/test_regions.py b/tests/api_resources/addressing/regional_hostnames/test_regions.py
index 5d23799e1bf..e06d39e8cf3 100644
--- a/tests/api_resources/addressing/regional_hostnames/test_regions.py
+++ b/tests/api_resources/addressing/regional_hostnames/test_regions.py
@@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncRegions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py
index ed645091db9..c9a93e4d048 100644
--- a/tests/api_resources/addressing/test_address_maps.py
+++ b/tests/api_resources/addressing/test_address_maps.py
@@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAddressMaps:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/test_loa_documents.py b/tests/api_resources/addressing/test_loa_documents.py
index 6cfbe04f072..91a32806d0c 100644
--- a/tests/api_resources/addressing/test_loa_documents.py
+++ b/tests/api_resources/addressing/test_loa_documents.py
@@ -151,7 +151,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLOADocuments:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py
index 955b4eaa157..6cfbeaba785 100644
--- a/tests/api_resources/addressing/test_prefixes.py
+++ b/tests/api_resources/addressing/test_prefixes.py
@@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPrefixes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py
index 1db9c1e02ea..6f9c356c87a 100644
--- a/tests/api_resources/addressing/test_regional_hostnames.py
+++ b/tests/api_resources/addressing/test_regional_hostnames.py
@@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
hostname="foo.example.com",
region_key="ca",
- routing="routing",
+ routing="dns",
)
assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
@@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRegionalHostnames:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -286,7 +288,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
hostname="foo.example.com",
region_key="ca",
- routing="routing",
+ routing="dns",
)
assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py
index 8d51e635ff9..35ad7f029ae 100644
--- a/tests/api_resources/addressing/test_services.py
+++ b/tests/api_resources/addressing/test_services.py
@@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncServices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/finetunes/test_assets.py b/tests/api_resources/ai/finetunes/test_assets.py
index 1a692800031..015f0a5c02d 100644
--- a/tests/api_resources/ai/finetunes/test_assets.py
+++ b/tests/api_resources/ai/finetunes/test_assets.py
@@ -77,7 +77,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncAssets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/finetunes/test_public.py b/tests/api_resources/ai/finetunes/test_public.py
index cc5f2b658c4..8c4e13933ce 100644
--- a/tests/api_resources/ai/finetunes/test_public.py
+++ b/tests/api_resources/ai/finetunes/test_public.py
@@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncPublic:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/models/test_schema.py b/tests/api_resources/ai/models/test_schema.py
index c2592b98979..ff54c76b027 100644
--- a/tests/api_resources/ai/models/test_schema.py
+++ b/tests/api_resources/ai/models/test_schema.py
@@ -60,7 +60,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSchema:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/test_authors.py b/tests/api_resources/ai/test_authors.py
index 16cdb1d7750..4997cb94973 100644
--- a/tests/api_resources/ai/test_authors.py
+++ b/tests/api_resources/ai/test_authors.py
@@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAuthors:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/test_finetunes.py b/tests/api_resources/ai/test_finetunes.py
index e01ec841666..74e1b6f8fa2 100644
--- a/tests/api_resources/ai/test_finetunes.py
+++ b/tests/api_resources/ai/test_finetunes.py
@@ -114,7 +114,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncFinetunes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/test_models.py b/tests/api_resources/ai/test_models.py
index 56897b9a250..6905cbb257c 100644
--- a/tests/api_resources/ai/test_models.py
+++ b/tests/api_resources/ai/test_models.py
@@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncModels:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai/test_tasks.py b/tests/api_resources/ai/test_tasks.py
index 4383e0af353..b0a6dea5ef5 100644
--- a/tests/api_resources/ai/test_tasks.py
+++ b/tests/api_resources/ai/test_tasks.py
@@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncTasks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai_gateway/test_datasets.py b/tests/api_resources/ai_gateway/test_datasets.py
index dc7ab2a74c5..88b9820ab6a 100644
--- a/tests/api_resources/ai_gateway/test_datasets.py
+++ b/tests/api_resources/ai_gateway/test_datasets.py
@@ -414,7 +414,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDatasets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai_gateway/test_evaluation_types.py b/tests/api_resources/ai_gateway/test_evaluation_types.py
index d03554b8df8..64b7cca833a 100644
--- a/tests/api_resources/ai_gateway/test_evaluation_types.py
+++ b/tests/api_resources/ai_gateway/test_evaluation_types.py
@@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncEvaluationTypes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai_gateway/test_evaluations.py b/tests/api_resources/ai_gateway/test_evaluations.py
index 444549e3cef..0ae12b69d6b 100644
--- a/tests/api_resources/ai_gateway/test_evaluations.py
+++ b/tests/api_resources/ai_gateway/test_evaluations.py
@@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEvaluations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py
index 4be76ce1282..734f4a528d9 100644
--- a/tests/api_resources/ai_gateway/test_logs.py
+++ b/tests/api_resources/ai_gateway/test_logs.py
@@ -433,7 +433,9 @@ def test_path_params_response(self, client: Cloudflare) -> None:
class TestAsyncLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ai_gateway/test_urls.py b/tests/api_resources/ai_gateway/test_urls.py
index 3fa5620cbdd..5dc57869a81 100644
--- a/tests/api_resources/ai_gateway/test_urls.py
+++ b/tests/api_resources/ai_gateway/test_urls.py
@@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncURLs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/alerting/destinations/test_eligible.py b/tests/api_resources/alerting/destinations/test_eligible.py
index ee7c9caff3e..84d19adcb16 100644
--- a/tests/api_resources/alerting/destinations/test_eligible.py
+++ b/tests/api_resources/alerting/destinations/test_eligible.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEligible:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py
index 2201b9943e0..0df4266e854 100644
--- a/tests/api_resources/alerting/destinations/test_pagerduty.py
+++ b/tests/api_resources/alerting/destinations/test_pagerduty.py
@@ -211,7 +211,9 @@ def test_path_params_link(self, client: Cloudflare) -> None:
class TestAsyncPagerduty:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(
reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285"
diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py
index ea816e0bdbf..af2fefa83c1 100644
--- a/tests/api_resources/alerting/destinations/test_webhooks.py
+++ b/tests/api_resources/alerting/destinations/test_webhooks.py
@@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWebhooks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(
reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291"
diff --git a/tests/api_resources/alerting/test_available_alerts.py b/tests/api_resources/alerting/test_available_alerts.py
index 253ff803cdf..0836a669443 100644
--- a/tests/api_resources/alerting/test_available_alerts.py
+++ b/tests/api_resources/alerting/test_available_alerts.py
@@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAvailableAlerts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/alerting/test_history.py b/tests/api_resources/alerting/test_history.py
index 43ef79ac5c3..912513472c3 100644
--- a/tests/api_resources/alerting/test_history.py
+++ b/tests/api_resources/alerting/test_history.py
@@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncHistory:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py
index adad9227350..9ed3edd4cf6 100644
--- a/tests/api_resources/alerting/test_policies.py
+++ b/tests/api_resources/alerting/test_policies.py
@@ -426,7 +426,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(
reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274"
diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py
index a696f2b3018..48149bb3a16 100644
--- a/tests/api_resources/api_gateway/discovery/test_operations.py
+++ b/tests/api_resources/api_gateway/discovery/test_operations.py
@@ -190,7 +190,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncOperations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py
index 5dfac36140d..5db06ad8f6e 100644
--- a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py
+++ b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py
@@ -61,7 +61,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncFallthrough:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py
index 21c19d6c184..dc8cf1adfbb 100644
--- a/tests/api_resources/api_gateway/operations/test_schema_validation.py
+++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py
@@ -15,6 +15,8 @@
SchemaValidationUpdateResponse,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -23,27 +25,32 @@ class TestSchemaValidation:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.operations.schema_validation.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.operations.schema_validation.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.operations.schema_validation.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.operations.schema_validation.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ mitigation_action="block",
+ )
+
assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -52,52 +59,57 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.api_gateway.operations.schema_validation.with_streaming_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.operations.schema_validation.with_streaming_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = response.parse()
- assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
+ schema_validation = response.parse()
+ assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
+ client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
- client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="",
+ @parametrize
+ def test_method_edit(self, client: Cloudflare) -> None:
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.operations.schema_validation.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
)
- @parametrize
- def test_method_edit(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.operations.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.api_gateway.operations.schema_validation.with_raw_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.operations.schema_validation.with_raw_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -106,46 +118,51 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.api_gateway.operations.schema_validation.with_streaming_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- schema_validation = response.parse()
- assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.operations.schema_validation.with_streaming_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ schema_validation = response.parse()
+ assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_edit(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.operations.schema_validation.with_raw_response.edit(
- zone_id="",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.operations.schema_validation.with_raw_response.edit(
+ zone_id="",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ )
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.operations.schema_validation.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.operations.schema_validation.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -154,59 +171,68 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.api_gateway.operations.schema_validation.with_streaming_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.operations.schema_validation.with_streaming_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = response.parse()
- assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
+ schema_validation = response.parse()
+ assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
- client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
+ client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
class TestAsyncSchemaValidation:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.operations.schema_validation.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.operations.schema_validation.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.operations.schema_validation.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.operations.schema_validation.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ mitigation_action="block",
+ )
+
assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -215,52 +241,57 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = await response.parse()
- assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
+ schema_validation = await response.parse()
+ assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
+ await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
+ operation_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
- await async_client.api_gateway.operations.schema_validation.with_raw_response.update(
- operation_id="",
+ @parametrize
+ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.operations.schema_validation.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
)
- @parametrize
- async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.operations.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.operations.schema_validation.with_raw_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.operations.schema_validation.with_raw_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -269,46 +300,51 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.operations.schema_validation.with_streaming_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- schema_validation = await response.parse()
- assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.operations.schema_validation.with_streaming_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ schema_validation = await response.parse()
+ assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.operations.schema_validation.with_raw_response.edit(
- zone_id="",
- settings_multiple_request={
- "3818d821-5901-4147-a474-f5f5aec1d54e": {},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
- },
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.operations.schema_validation.with_raw_response.edit(
+ zone_id="",
+ settings_multiple_request={
+ "3818d821-5901-4147-a474-f5f5aec1d54e": {},
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {},
+ },
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.operations.schema_validation.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.operations.schema_validation.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -317,28 +353,30 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.operations.schema_validation.with_streaming_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.operations.schema_validation.with_streaming_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = await response.parse()
- assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
+ schema_validation = await response.parse()
+ assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
- await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
- operation_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"):
+ await async_client.api_gateway.operations.schema_validation.with_raw_response.get(
+ operation_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
diff --git a/tests/api_resources/api_gateway/settings/test_schema_validation.py b/tests/api_resources/api_gateway/settings/test_schema_validation.py
index 2441b86a24c..cbcf33147af 100644
--- a/tests/api_resources/api_gateway/settings/test_schema_validation.py
+++ b/tests/api_resources/api_gateway/settings/test_schema_validation.py
@@ -13,6 +13,8 @@
Settings,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -21,27 +23,32 @@ class TestSchemaValidation:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.settings.schema_validation.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.settings.schema_validation.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.settings.schema_validation.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- validation_override_mitigation_action="none",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.settings.schema_validation.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ validation_override_mitigation_action="none",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.api_gateway.settings.schema_validation.with_raw_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.settings.schema_validation.with_raw_response.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -50,47 +57,54 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.api_gateway.settings.schema_validation.with_streaming_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.settings.schema_validation.with_streaming_response.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.settings.schema_validation.with_raw_response.update(
- zone_id="",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.settings.schema_validation.with_raw_response.update(
+ zone_id="",
+ validation_default_mitigation_action="block",
+ )
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.settings.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.settings.schema_validation.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.settings.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- validation_override_mitigation_action="none",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.settings.schema_validation.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ validation_override_mitigation_action="none",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.api_gateway.settings.schema_validation.with_raw_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.settings.schema_validation.with_raw_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -99,36 +113,41 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.api_gateway.settings.schema_validation.with_streaming_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.settings.schema_validation.with_streaming_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_edit(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.settings.schema_validation.with_raw_response.edit(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.settings.schema_validation.with_raw_response.edit(
+ zone_id="",
+ )
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- schema_validation = client.api_gateway.settings.schema_validation.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = client.api_gateway.settings.schema_validation.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.api_gateway.settings.schema_validation.with_raw_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.settings.schema_validation.with_raw_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -137,51 +156,60 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.api_gateway.settings.schema_validation.with_streaming_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.settings.schema_validation.with_streaming_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.settings.schema_validation.with_raw_response.get(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.settings.schema_validation.with_raw_response.get(
+ zone_id="",
+ )
class TestAsyncSchemaValidation:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.settings.schema_validation.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.settings.schema_validation.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.settings.schema_validation.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- validation_override_mitigation_action="none",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.settings.schema_validation.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ validation_override_mitigation_action="none",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.settings.schema_validation.with_raw_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.settings.schema_validation.with_raw_response.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -190,47 +218,54 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.settings.schema_validation.with_streaming_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.settings.schema_validation.with_streaming_response.update(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = await response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = await response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.settings.schema_validation.with_raw_response.update(
- zone_id="",
- validation_default_mitigation_action="block",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.settings.schema_validation.with_raw_response.update(
+ zone_id="",
+ validation_default_mitigation_action="block",
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.settings.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.settings.schema_validation.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.settings.schema_validation.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_default_mitigation_action="block",
- validation_override_mitigation_action="none",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.settings.schema_validation.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_default_mitigation_action="block",
+ validation_override_mitigation_action="none",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.settings.schema_validation.with_raw_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.settings.schema_validation.with_raw_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -239,36 +274,41 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.settings.schema_validation.with_streaming_response.edit(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.settings.schema_validation.with_streaming_response.edit(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = await response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = await response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.settings.schema_validation.with_raw_response.edit(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.settings.schema_validation.with_raw_response.edit(
+ zone_id="",
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- schema_validation = await async_client.api_gateway.settings.schema_validation.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ schema_validation = await async_client.api_gateway.settings.schema_validation.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(Settings, schema_validation, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.settings.schema_validation.with_raw_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.settings.schema_validation.with_raw_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -277,20 +317,22 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.settings.schema_validation.with_streaming_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.settings.schema_validation.with_streaming_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- schema_validation = await response.parse()
- assert_matches_type(Settings, schema_validation, path=["response"])
+ schema_validation = await response.parse()
+ assert_matches_type(Settings, schema_validation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.settings.schema_validation.with_raw_response.get(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.settings.schema_validation.with_raw_response.get(
+ zone_id="",
+ )
diff --git a/tests/api_resources/api_gateway/test_configurations.py b/tests/api_resources/api_gateway/test_configurations.py
index 13bdbc85420..0dcffd886a9 100644
--- a/tests/api_resources/api_gateway/test_configurations.py
+++ b/tests/api_resources/api_gateway/test_configurations.py
@@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigurations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/test_discovery.py b/tests/api_resources/api_gateway/test_discovery.py
index f41ab529266..94be7e36cd8 100644
--- a/tests/api_resources/api_gateway/test_discovery.py
+++ b/tests/api_resources/api_gateway/test_discovery.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDiscovery:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py
index 37151f2ed30..aab5d1b4997 100644
--- a/tests/api_resources/api_gateway/test_operations.py
+++ b/tests/api_resources/api_gateway/test_operations.py
@@ -339,7 +339,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOperations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/test_schemas.py b/tests/api_resources/api_gateway/test_schemas.py
index 5c2542b4cb5..df03ab73a6a 100644
--- a/tests/api_resources/api_gateway/test_schemas.py
+++ b/tests/api_resources/api_gateway/test_schemas.py
@@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncSchemas:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py
index 9ebdf9e6b15..600a7dc5bde 100644
--- a/tests/api_resources/api_gateway/test_user_schemas.py
+++ b/tests/api_resources/api_gateway/test_user_schemas.py
@@ -16,6 +16,8 @@
UserSchemaDeleteResponse,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,31 +26,36 @@ class TestUserSchemas:
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
+
assert_matches_type(SchemaUpload, user_schema, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- name="petstore schema",
- validation_enabled="true",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ name="petstore schema",
+ validation_enabled="true",
+ )
+
assert_matches_type(SchemaUpload, user_schema, path=["response"])
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.with_raw_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.with_raw_response.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -57,51 +64,58 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.with_streaming_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.with_streaming_response.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = response.parse()
- assert_matches_type(SchemaUpload, user_schema, path=["response"])
+ user_schema = response.parse()
+ assert_matches_type(SchemaUpload, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.create(
- zone_id="",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.create(
+ zone_id="",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- omit_source=True,
- page=1,
- per_page=5,
- validation_enabled=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ omit_source=True,
+ page=1,
+ per_page=5,
+ validation_enabled=True,
+ )
+
assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.with_raw_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -110,38 +124,43 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.with_streaming_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
+ user_schema = response.parse()
+ assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.list(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.list(
+ zone_id="",
+ )
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -150,55 +169,62 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.with_streaming_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.with_streaming_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = response.parse()
- assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
+ user_schema = response.parse()
+ assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_enabled=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_enabled=True,
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -207,55 +233,62 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.with_streaming_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.with_streaming_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = response.parse()
- assert_matches_type(PublicSchema, user_schema, path=["response"])
+ user_schema = response.parse()
+ assert_matches_type(PublicSchema, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_edit(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
- user_schema = client.api_gateway.user_schemas.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- omit_source=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = client.api_gateway.user_schemas.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ omit_source=True,
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -264,63 +297,72 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.with_streaming_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.with_streaming_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = response.parse()
- assert_matches_type(PublicSchema, user_schema, path=["response"])
+ user_schema = response.parse()
+ assert_matches_type(PublicSchema, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
class TestAsyncUserSchemas:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
+
assert_matches_type(SchemaUpload, user_schema, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- name="petstore schema",
- validation_enabled="true",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ name="petstore schema",
+ validation_enabled="true",
+ )
+
assert_matches_type(SchemaUpload, user_schema, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.with_raw_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.with_raw_response.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -329,51 +371,58 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.with_streaming_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- file=b"raw file contents",
- kind="openapi_v3",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.with_streaming_response.create(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = await response.parse()
- assert_matches_type(SchemaUpload, user_schema, path=["response"])
+ user_schema = await response.parse()
+ assert_matches_type(SchemaUpload, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.create(
- zone_id="",
- file=b"raw file contents",
- kind="openapi_v3",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.create(
+ zone_id="",
+ file=b"raw file contents",
+ kind="openapi_v3",
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- omit_source=True,
- page=1,
- per_page=5,
- validation_enabled=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ omit_source=True,
+ page=1,
+ per_page=5,
+ validation_enabled=True,
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.with_raw_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -382,38 +431,43 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.with_streaming_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
+ user_schema = await response.parse()
+ assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.list(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.list(
+ zone_id="",
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -422,55 +476,62 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.with_streaming_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.with_streaming_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = await response.parse()
- assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
+ user_schema = await response.parse()
+ assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.delete(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.delete(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- validation_enabled=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ validation_enabled=True,
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -479,55 +540,62 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.with_streaming_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.with_streaming_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = await response.parse()
- assert_matches_type(PublicSchema, user_schema, path=["response"])
+ user_schema = await response.parse()
+ assert_matches_type(PublicSchema, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.edit(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.edit(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
- user_schema = await async_client.api_gateway.user_schemas.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- omit_source=True,
- )
+ with pytest.warns(DeprecationWarning):
+ user_schema = await async_client.api_gateway.user_schemas.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ omit_source=True,
+ )
+
assert_matches_type(PublicSchema, user_schema, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -536,28 +604,30 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.with_streaming_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.with_streaming_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- user_schema = await response.parse()
- assert_matches_type(PublicSchema, user_schema, path=["response"])
+ user_schema = await response.parse()
+ assert_matches_type(PublicSchema, user_schema, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- await async_client.api_gateway.user_schemas.with_raw_response.get(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ await async_client.api_gateway.user_schemas.with_raw_response.get(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
diff --git a/tests/api_resources/api_gateway/user_schemas/test_hosts.py b/tests/api_resources/api_gateway/user_schemas/test_hosts.py
index 6b9b80c5228..37f783ef2e5 100644
--- a/tests/api_resources/api_gateway/user_schemas/test_hosts.py
+++ b/tests/api_resources/api_gateway/user_schemas/test_hosts.py
@@ -12,6 +12,8 @@
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.api_gateway.user_schemas import HostListResponse
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,25 +22,30 @@ class TestHosts:
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- host = client.api_gateway.user_schemas.hosts.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ host = client.api_gateway.user_schemas.hosts.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- host = client.api_gateway.user_schemas.hosts.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- page=1,
- per_page=5,
- )
+ with pytest.warns(DeprecationWarning):
+ host = client.api_gateway.user_schemas.hosts.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page=1,
+ per_page=5,
+ )
+
assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.hosts.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.hosts.with_raw_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -47,49 +54,58 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.hosts.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.hosts.with_streaming_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- host = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"])
+ host = response.parse()
+ assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.hosts.with_raw_response.list(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.hosts.with_raw_response.list(
+ zone_id="",
+ )
class TestAsyncHosts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- host = await async_client.api_gateway.user_schemas.hosts.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ host = await async_client.api_gateway.user_schemas.hosts.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- host = await async_client.api_gateway.user_schemas.hosts.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- page=1,
- per_page=5,
- )
+ with pytest.warns(DeprecationWarning):
+ host = await async_client.api_gateway.user_schemas.hosts.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page=1,
+ per_page=5,
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.hosts.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.hosts.with_raw_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -98,20 +114,22 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.hosts.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.hosts.with_streaming_response.list(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- host = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"])
+ host = await response.parse()
+ assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.hosts.with_raw_response.list(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.hosts.with_raw_response.list(
+ zone_id="",
+ )
diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py
index 64234507893..be56db3c8ee 100644
--- a/tests/api_resources/api_gateway/user_schemas/test_operations.py
+++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py
@@ -12,6 +12,8 @@
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.api_gateway.user_schemas import OperationListResponse
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,33 +22,38 @@ class TestOperations:
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- operation = client.api_gateway.user_schemas.operations.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ operation = client.api_gateway.user_schemas.operations.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- operation = client.api_gateway.user_schemas.operations.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- endpoint="/api/v1",
- feature=["thresholds"],
- host=["api.cloudflare.com"],
- method=["GET"],
- operation_status="new",
- page=1,
- per_page=5,
- )
+ with pytest.warns(DeprecationWarning):
+ operation = client.api_gateway.user_schemas.operations.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ endpoint="/api/v1",
+ feature=["thresholds"],
+ host=["api.cloudflare.com"],
+ method=["GET"],
+ operation_status="new",
+ page=1,
+ per_page=5,
+ )
+
assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -55,65 +62,74 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.api_gateway.user_schemas.operations.with_streaming_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.api_gateway.user_schemas.operations.with_streaming_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- operation = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
+ operation = response.parse()
+ assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
class TestAsyncOperations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- operation = await async_client.api_gateway.user_schemas.operations.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ operation = await async_client.api_gateway.user_schemas.operations.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- operation = await async_client.api_gateway.user_schemas.operations.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- endpoint="/api/v1",
- feature=["thresholds"],
- host=["api.cloudflare.com"],
- method=["GET"],
- operation_status="new",
- page=1,
- per_page=5,
- )
+ with pytest.warns(DeprecationWarning):
+ operation = await async_client.api_gateway.user_schemas.operations.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ endpoint="/api/v1",
+ feature=["thresholds"],
+ host=["api.cloudflare.com"],
+ method=["GET"],
+ operation_status="new",
+ page=1,
+ per_page=5,
+ )
+
assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -122,28 +138,30 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- operation = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
+ operation = await response.parse()
+ assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
- await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
- schema_id="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ zone_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"):
+ await async_client.api_gateway.user_schemas.operations.with_raw_response.list(
+ schema_id="",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
diff --git a/tests/api_resources/argo/test_smart_routing.py b/tests/api_resources/argo/test_smart_routing.py
index 8622689044d..e89824e855a 100644
--- a/tests/api_resources/argo/test_smart_routing.py
+++ b/tests/api_resources/argo/test_smart_routing.py
@@ -9,7 +9,6 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.argo import SmartRoutingGetResponse, SmartRoutingEditResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -23,7 +22,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
value="on",
)
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
@@ -35,7 +34,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = response.parse()
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
@@ -47,7 +46,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = response.parse()
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -64,7 +63,7 @@ def test_method_get(self, client: Cloudflare) -> None:
smart_routing = client.argo.smart_routing.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -75,7 +74,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = response.parse()
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -86,7 +85,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = response.parse()
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -99,7 +98,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSmartRouting:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
@@ -107,7 +108,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
value="on",
)
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@@ -119,7 +120,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = await response.parse()
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
@@ -131,7 +132,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = await response.parse()
- assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -148,7 +149,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
smart_routing = await async_client.argo.smart_routing.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -159,7 +160,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = await response.parse()
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -170,7 +171,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
smart_routing = await response.parse()
- assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"])
+ assert_matches_type(object, smart_routing, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/argo/test_tiered_caching.py b/tests/api_resources/argo/test_tiered_caching.py
index d91060caa7b..9055eebb8b8 100644
--- a/tests/api_resources/argo/test_tiered_caching.py
+++ b/tests/api_resources/argo/test_tiered_caching.py
@@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTieredCaching:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/billing/test_profiles.py b/tests/api_resources/billing/test_profiles.py
index b30605d06b8..faf0afcb458 100644
--- a/tests/api_resources/billing/test_profiles.py
+++ b/tests/api_resources/billing/test_profiles.py
@@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncProfiles:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/botnet_feed/configs/test_asn.py b/tests/api_resources/botnet_feed/configs/test_asn.py
index 98199e322e8..7a026bc4696 100755
--- a/tests/api_resources/botnet_feed/configs/test_asn.py
+++ b/tests/api_resources/botnet_feed/configs/test_asn.py
@@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncASN:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/botnet_feed/test_asn.py b/tests/api_resources/botnet_feed/test_asn.py
index 14b998cdfab..89f402069b3 100755
--- a/tests/api_resources/botnet_feed/test_asn.py
+++ b/tests/api_resources/botnet_feed/test_asn.py
@@ -113,7 +113,9 @@ def test_path_params_full_report(self, client: Cloudflare) -> None:
class TestAsyncASN:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_day_report(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/brand_protection/__init__.py b/tests/api_resources/brand_protection/__init__.py
new file mode 100644
index 00000000000..fd8019a9a1a
--- /dev/null
+++ b/tests/api_resources/brand_protection/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/brand_protection/test_logo_matches.py b/tests/api_resources/brand_protection/test_logo_matches.py
new file mode 100644
index 00000000000..27c7c7723dd
--- /dev/null
+++ b/tests/api_resources/brand_protection/test_logo_matches.py
@@ -0,0 +1,239 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.brand_protection import (
+ LogoMatchGetResponse,
+ LogoMatchDownloadResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestLogoMatches:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_method_download(self, client: Cloudflare) -> None:
+ logo_match = client.brand_protection.logo_matches.download(
+ account_id="x",
+ )
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_method_download_with_all_params(self, client: Cloudflare) -> None:
+ logo_match = client.brand_protection.logo_matches.download(
+ account_id="x",
+ limit="limit",
+ logo_id=["string"],
+ offset="offset",
+ )
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_raw_response_download(self, client: Cloudflare) -> None:
+ response = client.brand_protection.logo_matches.with_raw_response.download(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo_match = response.parse()
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_streaming_response_download(self, client: Cloudflare) -> None:
+ with client.brand_protection.logo_matches.with_streaming_response.download(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo_match = response.parse()
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_path_params_download(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.logo_matches.with_raw_response.download(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ logo_match = client.brand_protection.logo_matches.get(
+ account_id="x",
+ )
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ logo_match = client.brand_protection.logo_matches.get(
+ account_id="x",
+ limit="limit",
+ logo_id=["string"],
+ offset="offset",
+ )
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.brand_protection.logo_matches.with_raw_response.get(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo_match = response.parse()
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.brand_protection.logo_matches.with_streaming_response.get(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo_match = response.parse()
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_path_params_get(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.logo_matches.with_raw_response.get(
+ account_id="",
+ )
+
+
+class TestAsyncLogoMatches:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_method_download(self, async_client: AsyncCloudflare) -> None:
+ logo_match = await async_client.brand_protection.logo_matches.download(
+ account_id="x",
+ )
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_method_download_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ logo_match = await async_client.brand_protection.logo_matches.download(
+ account_id="x",
+ limit="limit",
+ logo_id=["string"],
+ offset="offset",
+ )
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_raw_response_download(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.logo_matches.with_raw_response.download(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo_match = await response.parse()
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_streaming_response_download(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.logo_matches.with_streaming_response.download(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo_match = await response.parse()
+ assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_path_params_download(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.logo_matches.with_raw_response.download(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ logo_match = await async_client.brand_protection.logo_matches.get(
+ account_id="x",
+ )
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ logo_match = await async_client.brand_protection.logo_matches.get(
+ account_id="x",
+ limit="limit",
+ logo_id=["string"],
+ offset="offset",
+ )
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.logo_matches.with_raw_response.get(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo_match = await response.parse()
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.logo_matches.with_streaming_response.get(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo_match = await response.parse()
+ assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.logo_matches.with_raw_response.get(
+ account_id="",
+ )
diff --git a/tests/api_resources/brand_protection/test_logos.py b/tests/api_resources/brand_protection/test_logos.py
new file mode 100644
index 00000000000..4d6740bb7f4
--- /dev/null
+++ b/tests/api_resources/brand_protection/test_logos.py
@@ -0,0 +1,236 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.brand_protection import LogoCreateResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestLogos:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ logo = client.brand_protection.logos.create(
+ account_id="x",
+ )
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ logo = client.brand_protection.logos.create(
+ account_id="x",
+ match_type="match_type",
+ tag="tag",
+ threshold=0,
+ image=b"raw file contents",
+ )
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.brand_protection.logos.with_raw_response.create(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo = response.parse()
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.brand_protection.logos.with_streaming_response.create(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo = response.parse()
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.logos.with_raw_response.create(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ logo = client.brand_protection.logos.delete(
+ logo_id="x",
+ account_id="x",
+ )
+ assert logo is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.brand_protection.logos.with_raw_response.delete(
+ logo_id="x",
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo = response.parse()
+ assert logo is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.brand_protection.logos.with_streaming_response.delete(
+ logo_id="x",
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo = response.parse()
+ assert logo is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.logos.with_raw_response.delete(
+ logo_id="x",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `logo_id` but received ''"):
+ client.brand_protection.logos.with_raw_response.delete(
+ logo_id="",
+ account_id="x",
+ )
+
+
+class TestAsyncLogos:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ logo = await async_client.brand_protection.logos.create(
+ account_id="x",
+ )
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ logo = await async_client.brand_protection.logos.create(
+ account_id="x",
+ match_type="match_type",
+ tag="tag",
+ threshold=0,
+ image=b"raw file contents",
+ )
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.logos.with_raw_response.create(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo = await response.parse()
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.logos.with_streaming_response.create(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo = await response.parse()
+ assert_matches_type(LogoCreateResponse, logo, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 422 Unprocessable Entity")
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.logos.with_raw_response.create(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ logo = await async_client.brand_protection.logos.delete(
+ logo_id="x",
+ account_id="x",
+ )
+ assert logo is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.logos.with_raw_response.delete(
+ logo_id="x",
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ logo = await response.parse()
+ assert logo is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.logos.with_streaming_response.delete(
+ logo_id="x",
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ logo = await response.parse()
+ assert logo is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized error")
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.logos.with_raw_response.delete(
+ logo_id="x",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `logo_id` but received ''"):
+ await async_client.brand_protection.logos.with_raw_response.delete(
+ logo_id="",
+ account_id="x",
+ )
diff --git a/tests/api_resources/brand_protection/test_matches.py b/tests/api_resources/brand_protection/test_matches.py
new file mode 100644
index 00000000000..fb28396847a
--- /dev/null
+++ b/tests/api_resources/brand_protection/test_matches.py
@@ -0,0 +1,243 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.brand_protection import (
+ MatchGetResponse,
+ MatchDownloadResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestMatches:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_download(self, client: Cloudflare) -> None:
+ match = client.brand_protection.matches.download(
+ account_id="x",
+ )
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_download_with_all_params(self, client: Cloudflare) -> None:
+ match = client.brand_protection.matches.download(
+ account_id="x",
+ id="id",
+ include_domain_id=True,
+ limit=0,
+ offset=0,
+ )
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_raw_response_download(self, client: Cloudflare) -> None:
+ response = client.brand_protection.matches.with_raw_response.download(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ match = response.parse()
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_streaming_response_download(self, client: Cloudflare) -> None:
+ with client.brand_protection.matches.with_streaming_response.download(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ match = response.parse()
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_path_params_download(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.matches.with_raw_response.download(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ match = client.brand_protection.matches.get(
+ account_id="x",
+ )
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ match = client.brand_protection.matches.get(
+ account_id="x",
+ id="id",
+ include_domain_id=True,
+ limit=0,
+ offset=0,
+ )
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.brand_protection.matches.with_raw_response.get(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ match = response.parse()
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.brand_protection.matches.with_streaming_response.get(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ match = response.parse()
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_path_params_get(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.matches.with_raw_response.get(
+ account_id="",
+ )
+
+
+class TestAsyncMatches:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_download(self, async_client: AsyncCloudflare) -> None:
+ match = await async_client.brand_protection.matches.download(
+ account_id="x",
+ )
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_download_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ match = await async_client.brand_protection.matches.download(
+ account_id="x",
+ id="id",
+ include_domain_id=True,
+ limit=0,
+ offset=0,
+ )
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_raw_response_download(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.matches.with_raw_response.download(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ match = await response.parse()
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_streaming_response_download(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.matches.with_streaming_response.download(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ match = await response.parse()
+ assert_matches_type(MatchDownloadResponse, match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_path_params_download(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.matches.with_raw_response.download(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ match = await async_client.brand_protection.matches.get(
+ account_id="x",
+ )
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ match = await async_client.brand_protection.matches.get(
+ account_id="x",
+ id="id",
+ include_domain_id=True,
+ limit=0,
+ offset=0,
+ )
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.matches.with_raw_response.get(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ match = await response.parse()
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.matches.with_streaming_response.get(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ match = await response.parse()
+ assert_matches_type(MatchGetResponse, match, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.matches.with_raw_response.get(
+ account_id="",
+ )
diff --git a/tests/api_resources/brand_protection/test_queries.py b/tests/api_resources/brand_protection/test_queries.py
new file mode 100644
index 00000000000..273580d63c3
--- /dev/null
+++ b/tests/api_resources/brand_protection/test_queries.py
@@ -0,0 +1,245 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from cloudflare._utils import parse_datetime
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestQueries:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ query = client.brand_protection.queries.create(
+ account_id="x",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ query = client.brand_protection.queries.create(
+ account_id="x",
+ id="id",
+ query_scan=True,
+ query_tag="tag",
+ max_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ min_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ body_scan=True,
+ string_matches={},
+ body_tag="tag",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.brand_protection.queries.with_raw_response.create(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = response.parse()
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.brand_protection.queries.with_streaming_response.create(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = response.parse()
+ assert query is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.queries.with_raw_response.create(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ query = client.brand_protection.queries.delete(
+ account_id="x",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
+ query = client.brand_protection.queries.delete(
+ account_id="x",
+ id="id",
+ scan=True,
+ tag="tag",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.brand_protection.queries.with_raw_response.delete(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = response.parse()
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.brand_protection.queries.with_streaming_response.delete(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = response.parse()
+ assert query is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.brand_protection.queries.with_raw_response.delete(
+ account_id="",
+ )
+
+
+class TestAsyncQueries:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.brand_protection.queries.create(
+ account_id="x",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.brand_protection.queries.create(
+ account_id="x",
+ id="id",
+ query_scan=True,
+ query_tag="tag",
+ max_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ min_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ body_scan=True,
+ string_matches={},
+ body_tag="tag",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.queries.with_raw_response.create(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = await response.parse()
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.queries.with_streaming_response.create(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = await response.parse()
+ assert query is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.queries.with_raw_response.create(
+ account_id="",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.brand_protection.queries.delete(
+ account_id="x",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.brand_protection.queries.delete(
+ account_id="x",
+ id="id",
+ scan=True,
+ tag="tag",
+ )
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.brand_protection.queries.with_raw_response.delete(
+ account_id="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = await response.parse()
+ assert query is None
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.brand_protection.queries.with_streaming_response.delete(
+ account_id="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = await response.parse()
+ assert query is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test, 401 Unauthorized")
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.brand_protection.queries.with_raw_response.delete(
+ account_id="",
+ )
diff --git a/tests/api_resources/browser_rendering/test_content.py b/tests/api_resources/browser_rendering/test_content.py
index 92582a45829..e713bd7dd95 100644
--- a/tests/api_resources/browser_rendering/test_content.py
+++ b/tests/api_resources/browser_rendering/test_content.py
@@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncContent:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_json.py b/tests/api_resources/browser_rendering/test_json.py
index d65aa816256..b019c0a2098 100644
--- a/tests/api_resources/browser_rendering/test_json.py
+++ b/tests/api_resources/browser_rendering/test_json.py
@@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncJson:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_links.py b/tests/api_resources/browser_rendering/test_links.py
index 954d14a7ec2..d3aaa1672cb 100644
--- a/tests/api_resources/browser_rendering/test_links.py
+++ b/tests/api_resources/browser_rendering/test_links.py
@@ -135,7 +135,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncLinks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_markdown.py b/tests/api_resources/browser_rendering/test_markdown.py
index a00e86a19d3..24845a74bfc 100644
--- a/tests/api_resources/browser_rendering/test_markdown.py
+++ b/tests/api_resources/browser_rendering/test_markdown.py
@@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncMarkdown:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_pdf.py b/tests/api_resources/browser_rendering/test_pdf.py
index cb09073d496..63c118cff58 100644
--- a/tests/api_resources/browser_rendering/test_pdf.py
+++ b/tests/api_resources/browser_rendering/test_pdf.py
@@ -94,6 +94,29 @@ def test_method_create_with_all_params(self, client: Cloudflare, respx_mock: Moc
"wait_until": "load",
},
html="x",
+ pdf_options={
+ "display_header_footer": True,
+ "footer_template": "footerTemplate",
+ "format": "letter",
+ "header_template": "headerTemplate",
+ "height": "string",
+ "landscape": True,
+ "margin": {
+ "bottom": "string",
+ "left": "string",
+ "right": "string",
+ "top": "string",
+ },
+ "omit_background": True,
+ "outline": True,
+ "page_ranges": "pageRanges",
+ "prefer_css_page_size": True,
+ "print_background": True,
+ "scale": 0.1,
+ "tagged": True,
+ "timeout": 0,
+ "width": "string",
+ },
reject_request_pattern=["string"],
reject_resource_types=["document"],
set_extra_http_headers={"foo": "string"},
@@ -165,7 +188,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncPDF:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
@pytest.mark.respx(base_url=base_url)
@@ -238,6 +263,29 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"wait_until": "load",
},
html="x",
+ pdf_options={
+ "display_header_footer": True,
+ "footer_template": "footerTemplate",
+ "format": "letter",
+ "header_template": "headerTemplate",
+ "height": "string",
+ "landscape": True,
+ "margin": {
+ "bottom": "string",
+ "left": "string",
+ "right": "string",
+ "top": "string",
+ },
+ "omit_background": True,
+ "outline": True,
+ "page_ranges": "pageRanges",
+ "prefer_css_page_size": True,
+ "print_background": True,
+ "scale": 0.1,
+ "tagged": True,
+ "timeout": 0,
+ "width": "string",
+ },
reject_request_pattern=["string"],
reject_resource_types=["document"],
set_extra_http_headers={"foo": "string"},
diff --git a/tests/api_resources/browser_rendering/test_scrape.py b/tests/api_resources/browser_rendering/test_scrape.py
index 4dd89c8e1ac..ef8925884e4 100644
--- a/tests/api_resources/browser_rendering/test_scrape.py
+++ b/tests/api_resources/browser_rendering/test_scrape.py
@@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncScrape:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_screenshot.py b/tests/api_resources/browser_rendering/test_screenshot.py
index d44ec38de09..c106782ee00 100644
--- a/tests/api_resources/browser_rendering/test_screenshot.py
+++ b/tests/api_resources/browser_rendering/test_screenshot.py
@@ -153,7 +153,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncScreenshot:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/browser_rendering/test_snapshot.py b/tests/api_resources/browser_rendering/test_snapshot.py
index c72f57f5ef9..bcf5ec2b521 100644
--- a/tests/api_resources/browser_rendering/test_snapshot.py
+++ b/tests/api_resources/browser_rendering/test_snapshot.py
@@ -150,7 +150,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncSnapshot:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cache/test_cache_reserve.py b/tests/api_resources/cache/test_cache_reserve.py
index 1d125319b6f..abbb074d4e9 100644
--- a/tests/api_resources/cache/test_cache_reserve.py
+++ b/tests/api_resources/cache/test_cache_reserve.py
@@ -184,7 +184,9 @@ def test_path_params_status(self, client: Cloudflare) -> None:
class TestAsyncCacheReserve:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_clear(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cache/test_regional_tiered_cache.py b/tests/api_resources/cache/test_regional_tiered_cache.py
index 98deff2adf5..2b78a788e2e 100644
--- a/tests/api_resources/cache/test_regional_tiered_cache.py
+++ b/tests/api_resources/cache/test_regional_tiered_cache.py
@@ -102,7 +102,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRegionalTieredCache:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cache/test_smart_tiered_cache.py b/tests/api_resources/cache/test_smart_tiered_cache.py
index 4502fff107d..3457741e5fe 100644
--- a/tests/api_resources/cache/test_smart_tiered_cache.py
+++ b/tests/api_resources/cache/test_smart_tiered_cache.py
@@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSmartTieredCache:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cache/test_variants.py b/tests/api_resources/cache/test_variants.py
index 9cb7356c449..5ddaebb439f 100644
--- a/tests/api_resources/cache/test_variants.py
+++ b/tests/api_resources/cache/test_variants.py
@@ -166,7 +166,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVariants:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/calls/test_sfu.py b/tests/api_resources/calls/test_sfu.py
index 624095f5bb3..5a4bc4ca177 100644
--- a/tests/api_resources/calls/test_sfu.py
+++ b/tests/api_resources/calls/test_sfu.py
@@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSFU:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/calls/test_turn.py b/tests/api_resources/calls/test_turn.py
index 58454ab1bdf..34e3ca6e167 100644
--- a/tests/api_resources/calls/test_turn.py
+++ b/tests/api_resources/calls/test_turn.py
@@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTURN:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/certificate_authorities/test_hostname_associations.py b/tests/api_resources/certificate_authorities/test_hostname_associations.py
index b8429f7df84..7f4088bae55 100644
--- a/tests/api_resources/certificate_authorities/test_hostname_associations.py
+++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py
@@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHostnameAssociations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloud_connector/test_rules.py b/tests/api_resources/cloud_connector/test_rules.py
index 255f82ba344..d80f63bdf9f 100644
--- a/tests/api_resources/cloud_connector/test_rules.py
+++ b/tests/api_resources/cloud_connector/test_rules.py
@@ -113,7 +113,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/requests/test_assets.py b/tests/api_resources/cloudforce_one/requests/test_assets.py
index e25f0eb419d..e2d5c2f8fae 100644
--- a/tests/api_resources/cloudforce_one/requests/test_assets.py
+++ b/tests/api_resources/cloudforce_one/requests/test_assets.py
@@ -273,7 +273,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAssets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py
index c4d7049a561..36273480abe 100644
--- a/tests/api_resources/cloudforce_one/requests/test_message.py
+++ b/tests/api_resources/cloudforce_one/requests/test_message.py
@@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMessage:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py
index 9a915c85dc4..66bd879a97e 100644
--- a/tests/api_resources/cloudforce_one/requests/test_priority.py
+++ b/tests/api_resources/cloudforce_one/requests/test_priority.py
@@ -279,7 +279,9 @@ def test_path_params_quota(self, client: Cloudflare) -> None:
class TestAsyncPriority:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/scans/test_config.py b/tests/api_resources/cloudforce_one/scans/test_config.py
index 532ae366d26..86680ee87c9 100644
--- a/tests/api_resources/cloudforce_one/scans/test_config.py
+++ b/tests/api_resources/cloudforce_one/scans/test_config.py
@@ -221,7 +221,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncConfig:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/scans/test_results.py b/tests/api_resources/cloudforce_one/scans/test_results.py
index 0ac885288f3..8f385538a2c 100644
--- a/tests/api_resources/cloudforce_one/scans/test_results.py
+++ b/tests/api_resources/cloudforce_one/scans/test_results.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncResults:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/test_binary_storage.py b/tests/api_resources/cloudforce_one/test_binary_storage.py
new file mode 100644
index 00000000000..b26a1186d15
--- /dev/null
+++ b/tests/api_resources/cloudforce_one/test_binary_storage.py
@@ -0,0 +1,220 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.cloudforce_one import BinaryStorageCreateResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestBinaryStorage:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ binary_storage = client.cloudforce_one.binary_storage.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ )
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.cloudforce_one.binary_storage.with_raw_response.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ binary_storage = response.parse()
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.cloudforce_one.binary_storage.with_streaming_response.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ binary_storage = response.parse()
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.cloudforce_one.binary_storage.with_raw_response.create(
+ account_id="",
+ file=b"raw file contents",
+ )
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ binary_storage = client.cloudforce_one.binary_storage.get(
+ hash="hash",
+ account_id="account_id",
+ )
+ assert binary_storage is None
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="hash",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ binary_storage = response.parse()
+ assert binary_storage is None
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.cloudforce_one.binary_storage.with_streaming_response.get(
+ hash="hash",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ binary_storage = response.parse()
+ assert binary_storage is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ def test_path_params_get(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="hash",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `hash` but received ''"):
+ client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="",
+ account_id="account_id",
+ )
+
+
+class TestAsyncBinaryStorage:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ binary_storage = await async_client.cloudforce_one.binary_storage.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ )
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.cloudforce_one.binary_storage.with_raw_response.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ binary_storage = await response.parse()
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.cloudforce_one.binary_storage.with_streaming_response.create(
+ account_id="account_id",
+ file=b"raw file contents",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ binary_storage = await response.parse()
+ assert_matches_type(BinaryStorageCreateResponse, binary_storage, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.cloudforce_one.binary_storage.with_raw_response.create(
+ account_id="",
+ file=b"raw file contents",
+ )
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ binary_storage = await async_client.cloudforce_one.binary_storage.get(
+ hash="hash",
+ account_id="account_id",
+ )
+ assert binary_storage is None
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="hash",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ binary_storage = await response.parse()
+ assert binary_storage is None
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.cloudforce_one.binary_storage.with_streaming_response.get(
+ hash="hash",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ binary_storage = await response.parse()
+ assert binary_storage is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
+ @parametrize
+ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="hash",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `hash` but received ''"):
+ await async_client.cloudforce_one.binary_storage.with_raw_response.get(
+ hash="",
+ account_id="account_id",
+ )
diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py
index cf8f3df2da9..e4da0a26eed 100644
--- a/tests/api_resources/cloudforce_one/test_requests.py
+++ b/tests/api_resources/cloudforce_one/test_requests.py
@@ -412,7 +412,9 @@ def test_path_params_types(self, client: Cloudflare) -> None:
class TestAsyncRequests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py
index 3a48d8f5a58..fa6ad756199 100644
--- a/tests/api_resources/cloudforce_one/test_threat_events.py
+++ b/tests/api_resources/cloudforce_one/test_threat_events.py
@@ -30,8 +30,6 @@ class TestThreatEvents:
def test_method_create(self, client: Cloudflare) -> None:
threat_event = client.cloudforce_one.threat_events.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -46,8 +44,6 @@ def test_method_create(self, client: Cloudflare) -> None:
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
threat_event = client.cloudforce_one.threat_events.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -59,6 +55,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
},
tlp="amber",
body_account_id=123456,
+ attacker="Flying Yeti",
+ attacker_country="CN",
dataset_id="durableObjectName",
indicator="domain.com",
tags=["malware"],
@@ -72,8 +70,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.with_raw_response.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -92,8 +88,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.with_streaming_response.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -115,8 +109,6 @@ def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"):
client.cloudforce_one.threat_events.with_raw_response.create(
path_account_id="",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -247,8 +239,6 @@ def test_method_bulk_create(self, client: Cloudflare) -> None:
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -268,8 +258,6 @@ def test_raw_response_bulk_create(self, client: Cloudflare) -> None:
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -293,8 +281,6 @@ def test_streaming_response_bulk_create(self, client: Cloudflare) -> None:
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -321,8 +307,6 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None:
account_id="",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -356,6 +340,12 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
event="An attacker registered the domain domain.com",
indicator="domain2.com",
indicator_type="sha256",
+ insight="new insight",
+ raw={
+ "data": {"foo": "bar"},
+ "source": "example.com",
+ "tlp": "amber",
+ },
target_country="US",
target_industry="Insurance",
tlp="amber",
@@ -459,15 +449,15 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncThreatEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
threat_event = await async_client.cloudforce_one.threat_events.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -482,8 +472,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
threat_event = await async_client.cloudforce_one.threat_events.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -495,6 +483,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
},
tlp="amber",
body_account_id=123456,
+ attacker="Flying Yeti",
+ attacker_country="CN",
dataset_id="durableObjectName",
indicator="domain.com",
tags=["malware"],
@@ -508,8 +498,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.with_raw_response.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -528,8 +516,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.with_streaming_response.create(
path_account_id="account_id",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -551,8 +537,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"):
await async_client.cloudforce_one.threat_events.with_raw_response.create(
path_account_id="",
- attacker="Flying Yeti",
- attacker_country="CN",
category="Domain Resolution",
date=parse_datetime("2022-04-01T00:00:00Z"),
event="An attacker registered the domain domain.com",
@@ -683,8 +667,6 @@ async def test_method_bulk_create(self, async_client: AsyncCloudflare) -> None:
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -704,8 +686,6 @@ async def test_raw_response_bulk_create(self, async_client: AsyncCloudflare) ->
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -729,8 +709,6 @@ async def test_streaming_response_bulk_create(self, async_client: AsyncCloudflar
account_id="account_id",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -757,8 +735,6 @@ async def test_path_params_bulk_create(self, async_client: AsyncCloudflare) -> N
account_id="",
data=[
{
- "attacker": "Flying Yeti",
- "attacker_country": "CN",
"category": "Domain Resolution",
"date": parse_datetime("2022-04-01T00:00:00Z"),
"event": "An attacker registered the domain domain.com",
@@ -792,6 +768,12 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
event="An attacker registered the domain domain.com",
indicator="domain2.com",
indicator_type="sha256",
+ insight="new insight",
+ raw={
+ "data": {"foo": "bar"},
+ "source": "example.com",
+ "tlp": "amber",
+ },
target_country="US",
target_industry="Insurance",
tlp="amber",
diff --git a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py
index 4351d3e7fe2..e1914985e33 100644
--- a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py
+++ b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py
@@ -17,6 +17,7 @@
class TestHealth:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
health = client.cloudforce_one.threat_events.datasets.health.get(
@@ -25,6 +26,7 @@ def test_method_get(self, client: Cloudflare) -> None:
)
assert_matches_type(HealthGetResponse, health, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
@@ -37,6 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
health = response.parse()
assert_matches_type(HealthGetResponse, health, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
@@ -51,6 +54,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -67,8 +71,11 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHealth:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
health = await async_client.cloudforce_one.threat_events.datasets.health.get(
@@ -77,6 +84,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(HealthGetResponse, health, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
@@ -89,6 +97,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
health = await response.parse()
assert_matches_type(HealthGetResponse, health, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
@@ -103,6 +112,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py
index 2b780d97b65..9c37a9ff13f 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py
@@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAttackers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_categories.py b/tests/api_resources/cloudforce_one/threat_events/test_categories.py
index 983168b5bdf..f94a5dbd909 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_categories.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_categories.py
@@ -298,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCategories:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_countries.py b/tests/api_resources/cloudforce_one/threat_events/test_countries.py
index 948f95a73a0..706c0925c45 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_countries.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_countries.py
@@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncCountries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_crons.py b/tests/api_resources/cloudforce_one/threat_events/test_crons.py
index 7ba6a371d53..9bacfe1395e 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_crons.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_crons.py
@@ -103,7 +103,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncCrons:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py
index 06e97ba80c1..f1ae4d436cd 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py
@@ -295,7 +295,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None:
class TestAsyncDatasets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py
index 6c5a0829c6f..0ea6e662e1a 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py
@@ -131,7 +131,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncEventTags:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py
index 27f277dfd80..85c45bc3763 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py
@@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncIndicatorTypes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_insights.py b/tests/api_resources/cloudforce_one/threat_events/test_insights.py
deleted file mode 100644
index 2e8442fa611..00000000000
--- a/tests/api_resources/cloudforce_one/threat_events/test_insights.py
+++ /dev/null
@@ -1,537 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from cloudflare import Cloudflare, AsyncCloudflare
-from tests.utils import assert_matches_type
-from cloudflare.types.cloudforce_one.threat_events import (
- InsightGetResponse,
- InsightEditResponse,
- InsightCreateResponse,
- InsightDeleteResponse,
-)
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestInsights:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_method_create(self, client: Cloudflare) -> None:
- insight = client.cloudforce_one.threat_events.insights.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = response.parse()
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.cloudforce_one.threat_events.insights.with_streaming_response.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = response.parse()
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_path_params_create(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="event_id",
- account_id="",
- content="Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_method_delete(self, client: Cloudflare) -> None:
- insight = client.cloudforce_one.threat_events.insights.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = response.parse()
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.cloudforce_one.threat_events.insights.with_streaming_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = response.parse()
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_path_params_delete(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_method_edit(self, client: Cloudflare) -> None:
- insight = client.cloudforce_one.threat_events.insights.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = response.parse()
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.cloudforce_one.threat_events.insights.with_streaming_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = response.parse()
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_path_params_edit(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_method_get(self, client: Cloudflare) -> None:
- insight = client.cloudforce_one.threat_events.insights.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = response.parse()
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.cloudforce_one.threat_events.insights.with_streaming_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = response.parse()
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- )
-
-
-class TestAsyncInsights:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- insight = await async_client.cloudforce_one.threat_events.insights.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = await response.parse()
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.create(
- event_id="event_id",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = await response.parse()
- assert_matches_type(InsightCreateResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="event_id",
- account_id="",
- content="Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.create(
- event_id="",
- account_id="account_id",
- content="Here is some additional context _in markdown_",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- insight = await async_client.cloudforce_one.threat_events.insights.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = await response.parse()
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = await response.parse()
- assert_matches_type(InsightDeleteResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- insight = await async_client.cloudforce_one.threat_events.insights.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = await response.parse()
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = await response.parse()
- assert_matches_type(InsightEditResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- content="Updated: Here is some additional context _in markdown_",
- )
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- insight = await async_client.cloudforce_one.threat_events.insights.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- insight = await response.parse()
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="event_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- insight = await response.parse()
- assert_matches_type(InsightGetResponse, insight, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="TODO: HTTP 401 from prism")
- @parametrize
- async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="",
- event_id="event_id",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="insight_id",
- account_id="account_id",
- event_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"):
- await async_client.cloudforce_one.threat_events.insights.with_raw_response.get(
- insight_id="",
- account_id="account_id",
- event_id="event_id",
- )
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_raw.py b/tests/api_resources/cloudforce_one/threat_events/test_raw.py
index b854f2753fa..b56d85ba3b8 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_raw.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_raw.py
@@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRaw:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_relate.py b/tests/api_resources/cloudforce_one/threat_events/test_relate.py
index 42bf9925c6d..f9a8447e117 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_relate.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_relate.py
@@ -71,7 +71,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncRelate:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_tags.py
index 9fd56ab430b..bf505654fe1 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_tags.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_tags.py
@@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncTags:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py
index ffdc0a02b83..e08db1e9305 100644
--- a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py
+++ b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py
@@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncTargetIndustries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
@parametrize
diff --git a/tests/api_resources/content_scanning/test_payloads.py b/tests/api_resources/content_scanning/test_payloads.py
index 3c3be9c5537..3c24ad530e0 100644
--- a/tests/api_resources/content_scanning/test_payloads.py
+++ b/tests/api_resources/content_scanning/test_payloads.py
@@ -152,7 +152,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncPayloads:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/content_scanning/test_settings.py b/tests/api_resources/content_scanning/test_settings.py
index f8f169b2766..61236f71476 100644
--- a/tests/api_resources/content_scanning/test_settings.py
+++ b/tests/api_resources/content_scanning/test_settings.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/custom_certificates/test_prioritize.py b/tests/api_resources/custom_certificates/test_prioritize.py
index dec90b6f83c..1ee27704925 100644
--- a/tests/api_resources/custom_certificates/test_prioritize.py
+++ b/tests/api_resources/custom_certificates/test_prioritize.py
@@ -62,7 +62,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncPrioritize:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py
index bbe43fce774..9ceb3582c3f 100644
--- a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py
+++ b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py
@@ -184,7 +184,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/custom_hostnames/test_fallback_origin.py b/tests/api_resources/custom_hostnames/test_fallback_origin.py
index 06e7260f852..4e0e1a70a62 100644
--- a/tests/api_resources/custom_hostnames/test_fallback_origin.py
+++ b/tests/api_resources/custom_hostnames/test_fallback_origin.py
@@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFallbackOrigin:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py
index f97b3c45e5d..288b342469c 100644
--- a/tests/api_resources/d1/test_database.py
+++ b/tests/api_resources/d1/test_database.py
@@ -705,7 +705,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None:
class TestAsyncDatabase:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/diagnostics/test_endpoint_healthchecks.py b/tests/api_resources/diagnostics/test_endpoint_healthchecks.py
new file mode 100644
index 00000000000..406240e1223
--- /dev/null
+++ b/tests/api_resources/diagnostics/test_endpoint_healthchecks.py
@@ -0,0 +1,548 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, Optional, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.diagnostics import (
+ EndpointHealthcheckGetResponse,
+ EndpointHealthcheckListResponse,
+ EndpointHealthcheckCreateResponse,
+ EndpointHealthcheckDeleteResponse,
+ EndpointHealthcheckUpdateResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestEndpointHealthchecks:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ name="My Endpoint",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.diagnostics.endpoint_healthchecks.with_raw_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.diagnostics.endpoint_healthchecks.with_streaming_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.create(
+ account_id="",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ name="My Endpoint",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Cloudflare) -> None:
+ response = client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Cloudflare) -> None:
+ with client.diagnostics.endpoint_healthchecks.with_streaming_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.diagnostics.endpoint_healthchecks.with_raw_response.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.diagnostics.endpoint_healthchecks.with_streaming_response.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.list(
+ account_id="",
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.diagnostics.endpoint_healthchecks.with_streaming_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.diagnostics.endpoint_healthchecks.with_streaming_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_get(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+
+class TestAsyncEndpointHealthchecks:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ name="My Endpoint",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.create(
+ account_id="",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ name="My Endpoint",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckUpdateResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.update(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ check_type="icmp",
+ endpoint="203.0.113.1",
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.list(
+ account_id="",
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(EndpointHealthcheckDeleteResponse, endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.delete(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ endpoint_healthcheck = await response.parse()
+ assert_matches_type(Optional[EndpointHealthcheckGetResponse], endpoint_healthcheck, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.diagnostics.endpoint_healthchecks.with_raw_response.get(
+ id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
diff --git a/tests/api_resources/diagnostics/test_traceroutes.py b/tests/api_resources/diagnostics/test_traceroutes.py
index d71849dd539..9ad32223c09 100644
--- a/tests/api_resources/diagnostics/test_traceroutes.py
+++ b/tests/api_resources/diagnostics/test_traceroutes.py
@@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncTraceroutes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/analytics/reports/test_bytimes.py b/tests/api_resources/dns/analytics/reports/test_bytimes.py
index 73408198645..419f0d4670f 100644
--- a/tests/api_resources/dns/analytics/reports/test_bytimes.py
+++ b/tests/api_resources/dns/analytics/reports/test_bytimes.py
@@ -73,7 +73,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBytimes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/analytics/test_reports.py b/tests/api_resources/dns/analytics/test_reports.py
index 89dae97959c..d3c918a2868 100644
--- a/tests/api_resources/dns/analytics/test_reports.py
+++ b/tests/api_resources/dns/analytics/test_reports.py
@@ -72,7 +72,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReports:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/settings/account/test_views.py b/tests/api_resources/dns/settings/account/test_views.py
index 59ea8910398..0d76207ae4f 100644
--- a/tests/api_resources/dns/settings/account/test_views.py
+++ b/tests/api_resources/dns/settings/account/test_views.py
@@ -284,7 +284,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncViews:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/settings/test_account.py b/tests/api_resources/dns/settings/test_account.py
index fed6b4a9444..b449a943640 100644
--- a/tests/api_resources/dns/settings/test_account.py
+++ b/tests/api_resources/dns/settings/test_account.py
@@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAccount:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="HTTP 422 from prism")
@parametrize
diff --git a/tests/api_resources/dns/settings/test_zone.py b/tests/api_resources/dns/settings/test_zone.py
index b67c99535e4..432b4c9fb62 100644
--- a/tests/api_resources/dns/settings/test_zone.py
+++ b/tests/api_resources/dns/settings/test_zone.py
@@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncZone:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="HTTP 422 from prism")
@parametrize
diff --git a/tests/api_resources/dns/test_dnssec.py b/tests/api_resources/dns/test_dnssec.py
index 3e174c314d6..e37b7a54f70 100644
--- a/tests/api_resources/dns/test_dnssec.py
+++ b/tests/api_resources/dns/test_dnssec.py
@@ -144,7 +144,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDNSSEC:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py
index 19f3b30479b..e91b3631255 100644
--- a/tests/api_resources/dns/test_records.py
+++ b/tests/api_resources/dns/test_records.py
@@ -30,6 +30,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -40,6 +41,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -49,7 +51,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -59,6 +60,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -73,6 +75,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -90,6 +93,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -99,6 +103,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -109,6 +114,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -118,7 +124,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -128,6 +133,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -142,6 +148,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -159,6 +166,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -168,6 +176,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -178,6 +187,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -188,7 +198,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -198,6 +207,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -212,6 +222,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -229,6 +240,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -238,6 +250,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -248,6 +261,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -258,7 +272,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -268,6 +281,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -282,6 +296,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -299,6 +314,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -308,6 +324,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -318,6 +335,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -327,7 +345,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -337,6 +354,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -351,6 +369,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -368,6 +387,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -377,6 +397,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -387,6 +408,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -396,7 +418,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -406,6 +427,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -420,6 +442,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -437,6 +460,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -446,6 +470,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -456,6 +481,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -465,7 +491,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -475,6 +500,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -489,6 +515,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -506,6 +533,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -515,6 +543,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -525,6 +554,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -534,7 +564,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -544,6 +573,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -558,6 +588,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -575,6 +606,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -584,6 +616,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -594,6 +627,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -607,7 +641,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -617,6 +650,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -631,6 +665,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -648,6 +683,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -657,6 +693,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -667,6 +704,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -681,7 +719,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -691,6 +728,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -705,6 +743,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -722,6 +761,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -731,6 +771,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -741,6 +782,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -755,7 +797,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -765,6 +806,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -779,6 +821,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -796,6 +839,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -805,6 +849,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -815,6 +860,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -829,7 +875,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -839,6 +884,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -853,6 +899,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -870,6 +917,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -879,6 +927,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -889,6 +938,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -902,7 +952,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -912,6 +961,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -926,6 +976,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -943,6 +994,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -952,6 +1004,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -962,6 +1015,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -984,7 +1038,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -994,6 +1047,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -1008,6 +1062,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -1025,6 +1080,7 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -1034,6 +1090,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1044,6 +1101,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -1060,7 +1118,6 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1070,6 +1127,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -1084,6 +1142,7 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -1101,6 +1160,7 @@ def test_path_params_create_overload_15(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -1110,6 +1170,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1120,6 +1181,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -1134,7 +1196,6 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1144,6 +1205,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -1158,6 +1220,7 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -1175,6 +1238,7 @@ def test_path_params_create_overload_16(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -1184,6 +1248,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1194,6 +1259,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -1208,7 +1274,6 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1218,6 +1283,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -1232,6 +1298,7 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -1249,6 +1316,7 @@ def test_path_params_create_overload_17(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -1258,6 +1326,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1268,6 +1337,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -1281,7 +1351,6 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1291,6 +1360,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -1305,6 +1375,7 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -1322,6 +1393,7 @@ def test_path_params_create_overload_18(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -1331,6 +1403,7 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1341,6 +1414,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -1354,7 +1428,6 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1364,6 +1437,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -1378,6 +1452,7 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -1395,6 +1470,7 @@ def test_path_params_create_overload_19(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -1404,6 +1480,7 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1414,6 +1491,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -1428,7 +1506,6 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1438,6 +1515,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -1452,6 +1530,7 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -1469,6 +1548,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -1478,6 +1558,7 @@ def test_method_create_overload_21(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1488,6 +1569,7 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) ->
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -1501,7 +1583,6 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1511,6 +1592,7 @@ def test_raw_response_create_overload_21(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -1525,6 +1607,7 @@ def test_streaming_response_create_overload_21(self, client: Cloudflare) -> None
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -1542,6 +1625,7 @@ def test_path_params_create_overload_21(self, client: Cloudflare) -> None:
client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -1552,6 +1636,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1563,6 +1648,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -1572,7 +1658,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1583,6 +1668,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -1598,6 +1684,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -1616,6 +1703,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -1624,6 +1712,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -1634,6 +1723,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1645,6 +1735,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -1654,7 +1745,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1665,6 +1755,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -1680,6 +1771,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -1698,6 +1790,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -1706,6 +1799,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -1716,6 +1810,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1727,6 +1822,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -1737,7 +1833,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1748,6 +1843,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -1763,6 +1859,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -1781,6 +1878,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -1789,6 +1887,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -1799,6 +1898,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1810,6 +1910,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -1820,7 +1921,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1831,6 +1931,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -1846,6 +1947,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -1864,6 +1966,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -1872,6 +1975,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -1882,6 +1986,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1893,6 +1998,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -1902,7 +2008,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1913,6 +2018,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -1928,6 +2034,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -1946,6 +2053,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -1954,6 +2062,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -1964,6 +2073,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1975,6 +2085,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -1984,7 +2095,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -1995,6 +2105,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -2010,6 +2121,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -2028,6 +2140,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -2036,6 +2149,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -2046,6 +2160,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2057,6 +2172,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -2066,7 +2182,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2077,6 +2192,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -2092,6 +2208,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -2110,6 +2227,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -2118,6 +2236,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -2128,6 +2247,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2139,6 +2259,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -2148,7 +2269,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2159,6 +2279,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -2174,6 +2295,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -2192,6 +2314,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -2200,6 +2323,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -2210,6 +2334,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2221,6 +2346,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -2234,7 +2360,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2245,6 +2370,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -2260,6 +2386,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -2278,6 +2405,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -2286,6 +2414,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -2296,6 +2425,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2307,6 +2437,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -2321,7 +2452,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2332,6 +2462,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -2347,6 +2478,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -2365,6 +2497,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -2373,6 +2506,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -2383,6 +2517,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2394,6 +2529,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -2408,7 +2544,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2419,6 +2554,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -2434,6 +2570,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -2452,6 +2589,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -2460,6 +2598,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -2470,6 +2609,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2481,6 +2621,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -2495,7 +2636,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2506,6 +2646,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -2521,6 +2662,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -2539,6 +2681,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -2547,6 +2690,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -2557,6 +2701,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2568,6 +2713,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -2581,7 +2727,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2592,6 +2737,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -2607,6 +2753,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -2625,6 +2772,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -2633,6 +2781,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -2643,6 +2792,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2654,6 +2804,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -2676,7 +2827,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2687,6 +2837,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -2702,6 +2853,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -2720,6 +2872,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -2728,6 +2881,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -2738,6 +2892,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2749,6 +2904,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -2765,7 +2921,6 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2776,6 +2931,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -2791,6 +2947,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -2809,6 +2966,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -2817,6 +2975,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -2827,6 +2986,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2838,6 +2998,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -2852,7 +3013,6 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2863,6 +3023,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -2878,6 +3039,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -2896,6 +3058,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -2904,6 +3067,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -2914,6 +3078,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2925,6 +3090,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -2939,7 +3105,6 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -2950,6 +3115,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -2965,6 +3131,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -2983,6 +3150,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -2991,6 +3159,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -3001,6 +3170,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3012,6 +3182,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -3025,7 +3196,6 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3036,6 +3206,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -3051,6 +3222,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -3069,6 +3241,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -3077,6 +3250,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -3087,6 +3261,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3098,6 +3273,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -3111,7 +3287,6 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3122,6 +3297,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -3137,6 +3313,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -3155,6 +3332,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -3163,6 +3341,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -3173,6 +3352,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3184,6 +3364,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -3198,7 +3379,6 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3209,6 +3389,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -3224,6 +3405,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -3242,6 +3424,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -3250,6 +3433,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -3260,6 +3444,7 @@ def test_method_update_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3271,6 +3456,7 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -3284,7 +3470,6 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) ->
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3295,6 +3480,7 @@ def test_raw_response_update_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -3310,6 +3496,7 @@ def test_streaming_response_update_overload_21(self, client: Cloudflare) -> None
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -3328,6 +3515,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -3336,6 +3524,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -3491,6 +3680,7 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None:
patches=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -3500,13 +3690,13 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None:
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
"id": "023e105f4ecef8ad9ca31a8372d0c353",
}
],
posts=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -3516,12 +3706,12 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None:
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
}
],
puts=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -3531,7 +3721,6 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None:
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
"id": "023e105f4ecef8ad9ca31a8372d0c353",
}
],
@@ -3579,6 +3768,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3590,6 +3780,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -3599,7 +3790,6 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3610,6 +3800,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -3625,6 +3816,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -3643,6 +3835,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -3651,6 +3844,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -3661,6 +3855,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3672,6 +3867,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -3681,7 +3877,6 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3692,6 +3887,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -3707,6 +3903,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -3725,6 +3922,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -3733,6 +3931,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -3743,6 +3942,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3754,6 +3954,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -3764,7 +3965,6 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3775,6 +3975,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -3790,6 +3991,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -3808,6 +4010,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -3816,6 +4019,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -3826,6 +4030,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3837,6 +4042,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -3847,7 +4053,6 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3858,6 +4063,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -3873,6 +4079,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -3891,6 +4098,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -3899,6 +4107,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -3909,6 +4118,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3920,6 +4130,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -3929,7 +4140,6 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -3940,6 +4150,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -3955,6 +4166,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -3973,6 +4185,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -3981,6 +4194,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -3991,6 +4205,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4002,6 +4217,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -4011,7 +4227,6 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4022,6 +4237,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -4037,6 +4253,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -4055,6 +4272,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -4063,6 +4281,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -4073,6 +4292,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4084,6 +4304,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -4093,7 +4314,6 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4104,6 +4324,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -4119,6 +4340,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -4137,6 +4359,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -4145,6 +4368,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -4155,6 +4379,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4166,6 +4391,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -4175,7 +4401,6 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4186,6 +4411,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -4201,6 +4427,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -4219,6 +4446,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -4227,6 +4455,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -4237,6 +4466,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4248,6 +4478,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -4261,7 +4492,6 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4272,6 +4502,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -4287,6 +4518,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -4305,6 +4537,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -4313,6 +4546,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -4323,6 +4557,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4334,6 +4569,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -4348,7 +4584,6 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4359,6 +4594,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -4374,6 +4610,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -4392,6 +4629,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -4400,6 +4638,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -4410,6 +4649,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4421,6 +4661,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -4435,7 +4676,6 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4446,6 +4686,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -4461,6 +4702,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -4479,6 +4721,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -4487,6 +4730,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -4497,6 +4741,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4508,6 +4753,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -4522,7 +4768,6 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4533,6 +4778,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -4548,6 +4794,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -4566,6 +4813,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -4574,6 +4822,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -4584,6 +4833,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4595,6 +4845,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -4608,7 +4859,6 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4619,6 +4869,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -4634,6 +4885,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -4652,6 +4904,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -4660,6 +4913,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -4670,6 +4924,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4681,6 +4936,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -4703,7 +4959,6 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4714,6 +4969,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -4729,6 +4985,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -4747,6 +5004,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -4755,6 +5013,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -4765,6 +5024,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4776,6 +5036,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -4792,7 +5053,6 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4803,6 +5063,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -4818,6 +5079,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -4836,6 +5098,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -4844,6 +5107,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -4854,6 +5118,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4865,6 +5130,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -4879,7 +5145,6 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4890,6 +5155,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -4905,6 +5171,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -4923,6 +5190,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -4931,6 +5199,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -4941,6 +5210,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4952,6 +5222,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -4966,7 +5237,6 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -4977,6 +5247,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -4992,6 +5263,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -5010,6 +5282,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -5018,6 +5291,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -5028,6 +5302,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5039,6 +5314,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -5052,7 +5328,6 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5063,6 +5338,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -5078,6 +5354,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -5096,6 +5373,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -5104,6 +5382,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -5114,6 +5393,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5125,6 +5405,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -5138,7 +5419,6 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5149,6 +5429,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -5164,6 +5445,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -5182,6 +5464,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -5190,6 +5473,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -5200,6 +5484,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5211,6 +5496,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -5225,7 +5511,6 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5236,6 +5521,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -5251,6 +5537,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -5269,6 +5556,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -5277,6 +5565,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -5287,6 +5576,7 @@ def test_method_edit_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5298,6 +5588,7 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -5311,7 +5602,6 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5322,6 +5612,7 @@ def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -5337,6 +5628,7 @@ def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -5355,6 +5647,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None:
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -5363,6 +5656,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None:
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -5556,7 +5850,9 @@ def test_path_params_scan(self, client: Cloudflare) -> None:
class TestAsyncRecords:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -5564,6 +5860,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5574,6 +5871,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -5583,7 +5881,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5593,6 +5890,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -5607,6 +5905,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -5624,6 +5923,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -5633,6 +5933,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5643,6 +5944,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -5652,7 +5954,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5662,6 +5963,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -5676,6 +5978,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -5693,6 +5996,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -5702,6 +6006,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5712,6 +6017,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -5722,7 +6028,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5732,6 +6037,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -5746,6 +6052,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -5763,6 +6070,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -5772,6 +6080,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5782,6 +6091,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -5792,7 +6102,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5802,6 +6111,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -5816,6 +6126,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -5833,6 +6144,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -5842,6 +6154,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5852,6 +6165,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -5861,7 +6175,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5871,6 +6184,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -5885,6 +6199,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -5902,6 +6217,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -5911,6 +6227,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5921,6 +6238,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -5930,7 +6248,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5940,6 +6257,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -5954,6 +6272,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -5971,6 +6290,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -5980,6 +6300,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -5990,6 +6311,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -5999,7 +6321,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6009,6 +6330,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -6023,6 +6345,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -6040,6 +6363,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -6049,6 +6373,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6059,6 +6384,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -6068,7 +6394,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6078,6 +6403,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -6092,6 +6418,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -6109,6 +6436,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -6118,6 +6446,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6128,6 +6457,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -6141,7 +6471,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6151,6 +6480,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -6165,6 +6495,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -6182,6 +6513,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -6191,6 +6523,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6201,6 +6534,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -6215,7 +6549,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6225,6 +6558,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -6239,6 +6573,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -6256,6 +6591,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -6265,6 +6601,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6275,6 +6612,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -6289,7 +6627,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6299,6 +6636,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -6313,6 +6651,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -6330,6 +6669,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -6339,6 +6679,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6349,6 +6690,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -6363,7 +6705,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6373,6 +6714,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -6387,6 +6729,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -6404,6 +6747,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -6413,6 +6757,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6423,6 +6768,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -6436,7 +6782,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6446,6 +6791,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -6460,6 +6806,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -6477,6 +6824,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -6486,6 +6834,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6496,6 +6845,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -6518,7 +6868,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6528,6 +6877,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -6542,6 +6892,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -6559,6 +6910,7 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -6568,6 +6920,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6578,6 +6931,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -6594,7 +6948,6 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6604,6 +6957,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -6618,6 +6972,7 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -6635,6 +6990,7 @@ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -6644,6 +7000,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6654,6 +7011,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -6668,7 +7026,6 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6678,6 +7035,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -6692,6 +7050,7 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -6709,6 +7068,7 @@ async def test_path_params_create_overload_16(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -6718,6 +7078,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6728,6 +7089,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -6742,7 +7104,6 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6752,6 +7113,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -6766,6 +7128,7 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -6783,6 +7146,7 @@ async def test_path_params_create_overload_17(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -6792,6 +7156,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6802,6 +7167,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -6815,7 +7181,6 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6825,6 +7190,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -6839,6 +7205,7 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -6856,6 +7223,7 @@ async def test_path_params_create_overload_18(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -6865,6 +7233,7 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6875,6 +7244,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -6888,7 +7258,6 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6898,6 +7267,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -6912,6 +7282,7 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -6929,6 +7300,7 @@ async def test_path_params_create_overload_19(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -6938,6 +7310,7 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6948,6 +7321,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -6962,7 +7336,6 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -6972,6 +7345,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -6986,6 +7360,7 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -7003,6 +7378,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -7012,6 +7388,7 @@ async def test_method_create_overload_21(self, async_client: AsyncCloudflare) ->
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7022,6 +7399,7 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -7035,7 +7413,6 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7045,6 +7422,7 @@ async def test_raw_response_create_overload_21(self, async_client: AsyncCloudfla
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -7059,6 +7437,7 @@ async def test_streaming_response_create_overload_21(self, async_client: AsyncCl
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -7076,6 +7455,7 @@ async def test_path_params_create_overload_21(self, async_client: AsyncCloudflar
await async_client.dns.records.with_raw_response.create(
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -7086,6 +7466,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7097,6 +7478,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -7106,7 +7488,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7117,6 +7498,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -7132,6 +7514,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -7150,6 +7533,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -7158,6 +7542,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -7168,6 +7553,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7179,6 +7565,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -7188,7 +7575,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7199,6 +7585,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -7214,6 +7601,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -7232,6 +7620,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -7240,6 +7629,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -7250,6 +7640,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7261,6 +7652,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -7271,7 +7663,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7282,6 +7673,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -7297,6 +7689,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -7315,6 +7708,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -7323,6 +7717,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -7333,6 +7728,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7344,6 +7740,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -7354,7 +7751,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7365,6 +7761,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -7380,6 +7777,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -7398,6 +7796,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -7406,6 +7805,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -7416,6 +7816,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7427,6 +7828,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -7436,7 +7838,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7447,6 +7848,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -7462,6 +7864,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -7480,6 +7883,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -7488,6 +7892,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -7498,6 +7903,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7509,6 +7915,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -7518,7 +7925,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7529,6 +7935,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -7544,6 +7951,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -7562,6 +7970,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -7570,6 +7979,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -7580,6 +7990,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7591,6 +8002,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -7600,7 +8012,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7611,6 +8022,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -7626,6 +8038,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -7644,6 +8057,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -7652,6 +8066,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -7662,6 +8077,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7673,6 +8089,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -7682,7 +8099,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7693,6 +8109,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -7708,6 +8125,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -7726,6 +8144,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -7734,6 +8153,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -7744,6 +8164,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7755,6 +8176,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -7768,7 +8190,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7779,6 +8200,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -7794,6 +8216,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -7812,6 +8235,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -7820,6 +8244,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -7830,6 +8255,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7841,6 +8267,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -7855,7 +8282,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7866,6 +8292,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -7881,6 +8308,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -7899,6 +8327,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -7907,6 +8336,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -7917,6 +8347,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7928,6 +8359,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -7942,7 +8374,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -7953,6 +8384,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -7968,6 +8400,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -7986,6 +8419,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -7994,6 +8428,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -8004,6 +8439,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8015,6 +8451,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -8029,7 +8466,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8040,6 +8476,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -8055,6 +8492,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -8073,6 +8511,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -8081,6 +8520,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -8091,6 +8531,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8102,6 +8543,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -8115,7 +8557,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8126,6 +8567,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -8141,6 +8583,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -8159,6 +8602,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -8167,6 +8611,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -8177,6 +8622,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8188,6 +8634,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -8210,7 +8657,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8221,6 +8667,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -8236,6 +8683,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -8254,6 +8702,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -8262,6 +8711,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -8272,6 +8722,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8283,6 +8734,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -8299,7 +8751,6 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8310,6 +8761,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -8325,6 +8777,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -8343,6 +8796,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -8351,6 +8805,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -8361,6 +8816,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8372,6 +8828,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -8386,7 +8843,6 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8397,6 +8853,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -8412,6 +8869,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -8430,6 +8888,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -8438,6 +8897,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -8448,6 +8908,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8459,6 +8920,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -8473,7 +8935,6 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8484,6 +8945,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -8499,6 +8961,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -8517,6 +8980,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -8525,6 +8989,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -8535,6 +9000,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8546,6 +9012,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -8559,7 +9026,6 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8570,6 +9036,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -8585,6 +9052,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -8603,6 +9071,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -8611,6 +9080,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -8621,6 +9091,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8632,6 +9103,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -8645,7 +9117,6 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8656,6 +9127,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -8671,6 +9143,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -8689,6 +9162,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -8697,6 +9171,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -8707,6 +9182,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8718,6 +9194,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -8732,7 +9209,6 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8743,6 +9219,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -8758,6 +9235,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -8776,6 +9254,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -8784,6 +9263,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -8794,6 +9274,7 @@ async def test_method_update_overload_21(self, async_client: AsyncCloudflare) ->
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8805,6 +9286,7 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -8818,7 +9300,6 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -8829,6 +9310,7 @@ async def test_raw_response_update_overload_21(self, async_client: AsyncCloudfla
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -8844,6 +9326,7 @@ async def test_streaming_response_update_overload_21(self, async_client: AsyncCl
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -8862,6 +9345,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -8870,6 +9354,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -9025,6 +9510,7 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare)
patches=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -9034,13 +9520,13 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare)
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
"id": "023e105f4ecef8ad9ca31a8372d0c353",
}
],
posts=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -9050,12 +9536,12 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare)
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
}
],
puts=[
{
"name": "example.com",
+ "ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
@@ -9065,7 +9551,6 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare)
"ipv6_only": True,
},
"tags": ["owner:dns-team"],
- "ttl": 3600,
"id": "023e105f4ecef8ad9ca31a8372d0c353",
}
],
@@ -9113,6 +9598,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9124,6 +9610,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
comment="Domain verification record",
content="198.51.100.4",
@@ -9133,7 +9620,6 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9144,6 +9630,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -9159,6 +9646,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
) as response:
assert not response.is_closed
@@ -9177,6 +9665,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -9185,6 +9674,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="A",
)
@@ -9195,6 +9685,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9206,6 +9697,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
comment="Domain verification record",
content="2400:cb00:2049::1",
@@ -9215,7 +9707,6 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9226,6 +9717,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -9241,6 +9733,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
) as response:
assert not response.is_closed
@@ -9259,6 +9752,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -9267,6 +9761,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="AAAA",
)
@@ -9277,6 +9772,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9288,6 +9784,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
comment="Domain verification record",
content="content",
@@ -9298,7 +9795,6 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9309,6 +9805,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -9324,6 +9821,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
) as response:
assert not response.is_closed
@@ -9342,6 +9840,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -9350,6 +9849,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CNAME",
)
@@ -9360,6 +9860,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9371,6 +9872,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
comment="Domain verification record",
content="mx.example.com",
@@ -9381,7 +9883,6 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9392,6 +9893,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -9407,6 +9909,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
) as response:
assert not response.is_closed
@@ -9425,6 +9928,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -9433,6 +9937,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="MX",
)
@@ -9443,6 +9948,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9454,6 +9960,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
comment="Domain verification record",
content="ns1.example.com",
@@ -9463,7 +9970,6 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9474,6 +9980,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -9489,6 +9996,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
) as response:
assert not response.is_closed
@@ -9507,6 +10015,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -9515,6 +10024,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NS",
)
@@ -9525,6 +10035,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9536,6 +10047,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
comment="Domain verification record",
content="content",
@@ -9545,7 +10057,6 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9556,6 +10067,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -9571,6 +10083,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
) as response:
assert not response.is_closed
@@ -9589,6 +10102,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -9597,6 +10111,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="OPENPGPKEY",
)
@@ -9607,6 +10122,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9618,6 +10134,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
comment="Domain verification record",
content="example.com",
@@ -9627,7 +10144,6 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9638,6 +10154,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -9653,6 +10170,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
) as response:
assert not response.is_closed
@@ -9671,6 +10189,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -9679,6 +10198,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="PTR",
)
@@ -9689,6 +10209,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9700,6 +10221,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
comment="Domain verification record",
content='"v=spf1 include:example.com -all"',
@@ -9709,7 +10231,6 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9720,6 +10241,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -9735,6 +10257,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
) as response:
assert not response.is_closed
@@ -9753,6 +10276,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -9761,6 +10285,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TXT",
)
@@ -9771,6 +10296,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9782,6 +10308,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
comment="Domain verification record",
data={
@@ -9795,7 +10322,6 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9806,6 +10332,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -9821,6 +10348,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
) as response:
assert not response.is_closed
@@ -9839,6 +10367,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -9847,6 +10376,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CAA",
)
@@ -9857,6 +10387,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9868,6 +10399,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
comment="Domain verification record",
data={
@@ -9882,7 +10414,6 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9893,6 +10424,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -9908,6 +10440,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
) as response:
assert not response.is_closed
@@ -9926,6 +10459,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -9934,6 +10468,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="CERT",
)
@@ -9944,6 +10479,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9955,6 +10491,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
comment="Domain verification record",
data={
@@ -9969,7 +10506,6 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -9980,6 +10516,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -9995,6 +10532,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
) as response:
assert not response.is_closed
@@ -10013,6 +10551,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -10021,6 +10560,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DNSKEY",
)
@@ -10031,6 +10571,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10042,6 +10583,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
comment="Domain verification record",
data={
@@ -10056,7 +10598,6 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10067,6 +10608,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -10082,6 +10624,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
) as response:
assert not response.is_closed
@@ -10100,6 +10643,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -10108,6 +10652,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="DS",
)
@@ -10118,6 +10663,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10129,6 +10675,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
comment="Domain verification record",
data={
@@ -10142,7 +10689,6 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10153,6 +10699,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -10168,6 +10715,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
) as response:
assert not response.is_closed
@@ -10186,6 +10734,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -10194,6 +10743,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="HTTPS",
)
@@ -10204,6 +10754,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10215,6 +10766,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
comment="Domain verification record",
data={
@@ -10237,7 +10789,6 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10248,6 +10799,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -10263,6 +10815,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
) as response:
assert not response.is_closed
@@ -10281,6 +10834,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -10289,6 +10843,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="LOC",
)
@@ -10299,6 +10854,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10310,6 +10866,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
comment="Domain verification record",
data={
@@ -10326,7 +10883,6 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10337,6 +10893,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -10352,6 +10909,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
) as response:
assert not response.is_closed
@@ -10370,6 +10928,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -10378,6 +10937,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="NAPTR",
)
@@ -10388,6 +10948,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10399,6 +10960,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
comment="Domain verification record",
data={
@@ -10413,7 +10975,6 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10424,6 +10985,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -10439,6 +11001,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
) as response:
assert not response.is_closed
@@ -10457,6 +11020,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -10465,6 +11029,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SMIMEA",
)
@@ -10475,6 +11040,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10486,6 +11052,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
comment="Domain verification record",
data={
@@ -10500,7 +11067,6 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10511,6 +11077,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -10526,6 +11093,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
) as response:
assert not response.is_closed
@@ -10544,6 +11112,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -10552,6 +11121,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SRV",
)
@@ -10562,6 +11132,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10573,6 +11144,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
comment="Domain verification record",
data={
@@ -10586,7 +11158,6 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10597,6 +11168,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -10612,6 +11184,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
) as response:
assert not response.is_closed
@@ -10630,6 +11203,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -10638,6 +11212,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SSHFP",
)
@@ -10648,6 +11223,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10659,6 +11235,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
comment="Domain verification record",
data={
@@ -10672,7 +11249,6 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10683,6 +11259,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -10698,6 +11275,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
) as response:
assert not response.is_closed
@@ -10716,6 +11294,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -10724,6 +11303,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="SVCB",
)
@@ -10734,6 +11314,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10745,6 +11326,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
comment="Domain verification record",
data={
@@ -10759,7 +11341,6 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10770,6 +11351,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -10785,6 +11367,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
) as response:
assert not response.is_closed
@@ -10803,6 +11386,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -10811,6 +11395,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="TLSA",
)
@@ -10821,6 +11406,7 @@ async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> N
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10832,6 +11418,7 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
comment="Domain verification record",
data={
@@ -10845,7 +11432,6 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async
"ipv6_only": True,
},
tags=["owner:dns-team"],
- ttl=3600,
)
assert_matches_type(Optional[RecordResponse], record, path=["response"])
@@ -10856,6 +11442,7 @@ async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -10871,6 +11458,7 @@ async def test_streaming_response_edit_overload_21(self, async_client: AsyncClou
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
) as response:
assert not response.is_closed
@@ -10889,6 +11477,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare)
dns_record_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
name="example.com",
+ ttl=3600,
type="URI",
)
@@ -10897,6 +11486,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare)
dns_record_id="",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
+ ttl=3600,
type="URI",
)
diff --git a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py
index 1c00b9b98c3..ac11f1743d2 100644
--- a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py
+++ b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py
@@ -56,7 +56,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncStatus:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/zone_transfers/test_acls.py b/tests/api_resources/dns/zone_transfers/test_acls.py
index 1d786773233..17a8ce6984f 100644
--- a/tests/api_resources/dns/zone_transfers/test_acls.py
+++ b/tests/api_resources/dns/zone_transfers/test_acls.py
@@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncACLs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/dns/zone_transfers/test_force_axfr.py b/tests/api_resources/dns/zone_transfers/test_force_axfr.py
index 3451f908b0c..1041d8749e6 100644
--- a/tests/api_resources/dns/zone_transfers/test_force_axfr.py
+++ b/tests/api_resources/dns/zone_transfers/test_force_axfr.py
@@ -60,7 +60,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncForceAXFR:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/zone_transfers/test_incoming.py b/tests/api_resources/dns/zone_transfers/test_incoming.py
index ad925e0d893..c9f7894ced1 100644
--- a/tests/api_resources/dns/zone_transfers/test_incoming.py
+++ b/tests/api_resources/dns/zone_transfers/test_incoming.py
@@ -200,7 +200,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIncoming:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/zone_transfers/test_outgoing.py b/tests/api_resources/dns/zone_transfers/test_outgoing.py
index 5ae0b28a13d..15137462121 100644
--- a/tests/api_resources/dns/zone_transfers/test_outgoing.py
+++ b/tests/api_resources/dns/zone_transfers/test_outgoing.py
@@ -318,7 +318,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOutgoing:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns/zone_transfers/test_peers.py b/tests/api_resources/dns/zone_transfers/test_peers.py
index f81fec733d6..39e2a5e3254 100644
--- a/tests/api_resources/dns/zone_transfers/test_peers.py
+++ b/tests/api_resources/dns/zone_transfers/test_peers.py
@@ -266,7 +266,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPeers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/dns/zone_transfers/test_tsigs.py b/tests/api_resources/dns/zone_transfers/test_tsigs.py
index d3e541d2518..93277f99e97 100644
--- a/tests/api_resources/dns/zone_transfers/test_tsigs.py
+++ b/tests/api_resources/dns/zone_transfers/test_tsigs.py
@@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTSIGs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py
index c40bb24466f..c80b22034cd 100644
--- a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py
+++ b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py
@@ -84,7 +84,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBytimes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns_firewall/analytics/test_reports.py b/tests/api_resources/dns_firewall/analytics/test_reports.py
index cc06eb81017..38fe3e6fec2 100644
--- a/tests/api_resources/dns_firewall/analytics/test_reports.py
+++ b/tests/api_resources/dns_firewall/analytics/test_reports.py
@@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReports:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/dns_firewall/test_reverse_dns.py b/tests/api_resources/dns_firewall/test_reverse_dns.py
index 8ddeaf9f7b0..ba9cca0909a 100644
--- a/tests/api_resources/dns_firewall/test_reverse_dns.py
+++ b/tests/api_resources/dns_firewall/test_reverse_dns.py
@@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReverseDNS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py
index 9e703603fcc..b073fb6fdbc 100644
--- a/tests/api_resources/durable_objects/namespaces/test_objects.py
+++ b/tests/api_resources/durable_objects/namespaces/test_objects.py
@@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncObjects:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/durable_objects/test_namespaces.py b/tests/api_resources/durable_objects/test_namespaces.py
index db836e379cd..2ec52448b4e 100644
--- a/tests/api_resources/durable_objects/test_namespaces.py
+++ b/tests/api_resources/durable_objects/test_namespaces.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
+from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.durable_objects import Namespace
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -23,7 +23,16 @@ def test_method_list(self, client: Cloudflare) -> None:
namespace = client.durable_objects.namespaces.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ namespace = client.durable_objects.namespaces.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page=1,
+ per_page=1,
+ )
+ assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -34,7 +43,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
namespace = response.parse()
- assert_matches_type(SyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
@@ -45,7 +54,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
namespace = response.parse()
- assert_matches_type(SyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -58,14 +67,25 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncNamespaces:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
namespace = await async_client.durable_objects.namespaces.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ namespace = await async_client.durable_objects.namespaces.list(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page=1,
+ per_page=1,
+ )
+ assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -76,7 +96,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
namespace = await response.parse()
- assert_matches_type(AsyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -87,7 +107,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
namespace = await response.parse()
- assert_matches_type(AsyncSinglePage[Namespace], namespace, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py
index 04d1d15c98f..3f6d0df00de 100644
--- a/tests/api_resources/email_routing/rules/test_catch_alls.py
+++ b/tests/api_resources/email_routing/rules/test_catch_alls.py
@@ -119,7 +119,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCatchAlls:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py
index 1530cf79f90..2299afe4b1c 100644
--- a/tests/api_resources/email_routing/test_addresses.py
+++ b/tests/api_resources/email_routing/test_addresses.py
@@ -211,7 +211,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAddresses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_routing/test_dns.py b/tests/api_resources/email_routing/test_dns.py
index e5c819d83c6..3bfbc5c7270 100644
--- a/tests/api_resources/email_routing/test_dns.py
+++ b/tests/api_resources/email_routing/test_dns.py
@@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDNS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py
index 19652d53d62..33b96b74828 100644
--- a/tests/api_resources/email_routing/test_rules.py
+++ b/tests/api_resources/email_routing/test_rules.py
@@ -315,7 +315,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_detections.py b/tests/api_resources/email_security/investigate/test_detections.py
index 0efb7939121..b9a5059538d 100644
--- a/tests/api_resources/email_security/investigate/test_detections.py
+++ b/tests/api_resources/email_security/investigate/test_detections.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDetections:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_move.py b/tests/api_resources/email_security/investigate/test_move.py
index 27096f30850..6a00103c4fa 100644
--- a/tests/api_resources/email_security/investigate/test_move.py
+++ b/tests/api_resources/email_security/investigate/test_move.py
@@ -122,7 +122,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None:
class TestAsyncMove:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_preview.py b/tests/api_resources/email_security/investigate/test_preview.py
index 90c38b7e703..18e710732bb 100644
--- a/tests/api_resources/email_security/investigate/test_preview.py
+++ b/tests/api_resources/email_security/investigate/test_preview.py
@@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPreview:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_raw.py b/tests/api_resources/email_security/investigate/test_raw.py
index d7e214dc7fd..204fbb63f6b 100644
--- a/tests/api_resources/email_security/investigate/test_raw.py
+++ b/tests/api_resources/email_security/investigate/test_raw.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRaw:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_reclassify.py b/tests/api_resources/email_security/investigate/test_reclassify.py
index 8fce2184e02..c7f2fa32108 100644
--- a/tests/api_resources/email_security/investigate/test_reclassify.py
+++ b/tests/api_resources/email_security/investigate/test_reclassify.py
@@ -81,7 +81,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncReclassify:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_release.py b/tests/api_resources/email_security/investigate/test_release.py
index 2b437e713c9..44430b8c827 100644
--- a/tests/api_resources/email_security/investigate/test_release.py
+++ b/tests/api_resources/email_security/investigate/test_release.py
@@ -62,7 +62,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None:
class TestAsyncRelease:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bulk(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/investigate/test_trace.py b/tests/api_resources/email_security/investigate/test_trace.py
index c01f3515dc4..f3ad42bcaea 100644
--- a/tests/api_resources/email_security/investigate/test_trace.py
+++ b/tests/api_resources/email_security/investigate/test_trace.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTrace:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/settings/test_allow_policies.py b/tests/api_resources/email_security/settings/test_allow_policies.py
index dd2afd7b539..9957ba139f1 100644
--- a/tests/api_resources/email_security/settings/test_allow_policies.py
+++ b/tests/api_resources/email_security/settings/test_allow_policies.py
@@ -128,6 +128,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
is_trusted_sender=True,
order="pattern",
page=1,
+ pattern="pattern",
pattern_type="EMAIL",
per_page=1,
search="search",
@@ -310,7 +311,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAllowPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -416,6 +419,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
is_trusted_sender=True,
order="pattern",
page=1,
+ pattern="pattern",
pattern_type="EMAIL",
per_page=1,
search="search",
diff --git a/tests/api_resources/email_security/settings/test_block_senders.py b/tests/api_resources/email_security/settings/test_block_senders.py
index e6bb0a56223..f2611adf7dd 100644
--- a/tests/api_resources/email_security/settings/test_block_senders.py
+++ b/tests/api_resources/email_security/settings/test_block_senders.py
@@ -99,6 +99,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
direction="asc",
order="pattern",
page=1,
+ pattern="pattern",
pattern_type="EMAIL",
per_page=1,
search="search",
@@ -276,7 +277,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBlockSenders:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -353,6 +356,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
direction="asc",
order="pattern",
page=1,
+ pattern="pattern",
pattern_type="EMAIL",
per_page=1,
search="search",
diff --git a/tests/api_resources/email_security/settings/test_domains.py b/tests/api_resources/email_security/settings/test_domains.py
index ef51bd8c036..7a475619f7b 100644
--- a/tests/api_resources/email_security/settings/test_domains.py
+++ b/tests/api_resources/email_security/settings/test_domains.py
@@ -265,7 +265,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/settings/test_impersonation_registry.py b/tests/api_resources/email_security/settings/test_impersonation_registry.py
index 166def7dd1e..0d484d1724d 100644
--- a/tests/api_resources/email_security/settings/test_impersonation_registry.py
+++ b/tests/api_resources/email_security/settings/test_impersonation_registry.py
@@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncImpersonationRegistry:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/email_security/settings/test_trusted_domains.py b/tests/api_resources/email_security/settings/test_trusted_domains.py
index 33d602bb1a4..57aa6fcd50d 100644
--- a/tests/api_resources/email_security/settings/test_trusted_domains.py
+++ b/tests/api_resources/email_security/settings/test_trusted_domains.py
@@ -185,6 +185,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
is_similarity=True,
order="pattern",
page=1,
+ pattern="pattern",
per_page=1,
search="search",
)
@@ -362,7 +363,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTrustedDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate HTTP 422 errors on test suite")
@parametrize
@@ -525,6 +528,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
is_similarity=True,
order="pattern",
page=1,
+ pattern="pattern",
per_page=1,
search="search",
)
diff --git a/tests/api_resources/email_security/test_investigate.py b/tests/api_resources/email_security/test_investigate.py
index f0a6ec41d9b..02ee4b98b99 100644
--- a/tests/api_resources/email_security/test_investigate.py
+++ b/tests/api_resources/email_security/test_investigate.py
@@ -45,6 +45,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
recipient="recipient",
sender="sender",
start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ subject="subject",
)
assert_matches_type(SyncV4PagePaginationArray[InvestigateListResponse], investigate, path=["response"])
@@ -129,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncInvestigate:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@@ -157,6 +160,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
recipient="recipient",
sender="sender",
start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ subject="subject",
)
assert_matches_type(AsyncV4PagePaginationArray[InvestigateListResponse], investigate, path=["response"])
diff --git a/tests/api_resources/email_security/test_submissions.py b/tests/api_resources/email_security/test_submissions.py
index c626455eab3..0645b94fd7a 100644
--- a/tests/api_resources/email_security/test_submissions.py
+++ b/tests/api_resources/email_security/test_submissions.py
@@ -38,6 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
query="query",
requested_disposition="MALICIOUS",
start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="status",
submission_id="submission_id",
type="TEAM",
)
@@ -76,7 +77,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncSubmissions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@@ -97,6 +100,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
query="query",
requested_disposition="MALICIOUS",
start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="status",
submission_id="submission_id",
type="TEAM",
)
diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py
index 2be8b9f05f8..a44b3cddb69 100644
--- a/tests/api_resources/firewall/test_access_rules.py
+++ b/tests/api_resources/firewall/test_access_rules.py
@@ -382,7 +382,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAccessRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py
index a304575e3a2..eb9320ca771 100644
--- a/tests/api_resources/firewall/test_lockdowns.py
+++ b/tests/api_resources/firewall/test_lockdowns.py
@@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLockdowns:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py
index cba8ae1268b..311ee64e156 100644
--- a/tests/api_resources/firewall/test_rules.py
+++ b/tests/api_resources/firewall/test_rules.py
@@ -565,7 +565,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py
index 7a968549f5d..269d7e2662b 100644
--- a/tests/api_resources/firewall/test_ua_rules.py
+++ b/tests/api_resources/firewall/test_ua_rules.py
@@ -44,6 +44,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)",
},
mode="challenge",
+ description="Prevent multiple login failures to mitigate brute force attacks",
+ paused=False,
)
assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"])
@@ -109,6 +111,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"value": "198.51.100.4",
},
mode="challenge",
+ description="Prevent multiple login failures to mitigate brute force attacks",
+ paused=False,
)
assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"])
@@ -175,10 +179,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
ua_rule = client.firewall.ua_rules.list(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
description="abusive",
- description_search="abusive",
page=1,
+ paused=False,
per_page=1,
- ua_search="Safari",
+ user_agent="Safari",
)
assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"])
@@ -311,7 +315,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncUARules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -333,6 +339,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)",
},
mode="challenge",
+ description="Prevent multiple login failures to mitigate brute force attacks",
+ paused=False,
)
assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"])
@@ -398,6 +406,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"value": "198.51.100.4",
},
mode="challenge",
+ description="Prevent multiple login failures to mitigate brute force attacks",
+ paused=False,
)
assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"])
@@ -464,10 +474,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
ua_rule = await async_client.firewall.ua_rules.list(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
description="abusive",
- description_search="abusive",
page=1,
+ paused=False,
per_page=1,
- ua_search="Safari",
+ user_agent="Safari",
)
assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"])
diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py
index 9e79fed3de5..3bdf259db3a 100644
--- a/tests/api_resources/firewall/waf/packages/test_groups.py
+++ b/tests/api_resources/firewall/waf/packages/test_groups.py
@@ -239,7 +239,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py
index 097f991f703..97927be6a8d 100644
--- a/tests/api_resources/firewall/waf/packages/test_rules.py
+++ b/tests/api_resources/firewall/waf/packages/test_rules.py
@@ -240,7 +240,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py
index 20c829e4c6f..81f3f471190 100644
--- a/tests/api_resources/firewall/waf/test_overrides.py
+++ b/tests/api_resources/firewall/waf/test_overrides.py
@@ -334,7 +334,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOverrides:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py
index 63ba5f49982..c79d6229958 100644
--- a/tests/api_resources/firewall/waf/test_packages.py
+++ b/tests/api_resources/firewall/waf/test_packages.py
@@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPackages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py
index 8377cb4f89d..a58c84df9b8 100644
--- a/tests/api_resources/healthchecks/test_previews.py
+++ b/tests/api_resources/healthchecks/test_previews.py
@@ -199,7 +199,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPreviews:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py
index 434d65687c6..09b8b27b4f8 100644
--- a/tests/api_resources/hostnames/settings/test_tls.py
+++ b/tests/api_resources/hostnames/settings/test_tls.py
@@ -177,7 +177,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTLS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py
index ae88048ece8..cbd44624bd7 100644
--- a/tests/api_resources/hyperdrive/test_configs.py
+++ b/tests/api_resources/hyperdrive/test_configs.py
@@ -55,6 +55,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
"sslmode": "verify-full",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
@@ -158,6 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
"sslmode": "verify-full",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
@@ -353,6 +355,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"scheme": "postgres",
"user": "postgres",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
@@ -449,7 +452,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -488,6 +493,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
"sslmode": "verify-full",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
@@ -591,6 +597,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
"sslmode": "verify-full",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
@@ -786,6 +793,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"scheme": "postgres",
"user": "postgres",
},
+ origin_connection_limit=60,
)
assert_matches_type(Hyperdrive, config, path=["response"])
diff --git a/tests/api_resources/iam/test_permission_groups.py b/tests/api_resources/iam/test_permission_groups.py
index 8d4a01aba8b..415565c7243 100644
--- a/tests/api_resources/iam/test_permission_groups.py
+++ b/tests/api_resources/iam/test_permission_groups.py
@@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPermissionGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/iam/test_resource_groups.py b/tests/api_resources/iam/test_resource_groups.py
index b334eec946e..1cd159e9a69 100644
--- a/tests/api_resources/iam/test_resource_groups.py
+++ b/tests/api_resources/iam/test_resource_groups.py
@@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncResourceGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/iam/test_user_groups.py b/tests/api_resources/iam/test_user_groups.py
index 869b1b5a1ae..f3fd0402f8a 100644
--- a/tests/api_resources/iam/test_user_groups.py
+++ b/tests/api_resources/iam/test_user_groups.py
@@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncUserGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/iam/user_groups/test_members.py b/tests/api_resources/iam/user_groups/test_members.py
index b5b8cf68485..603db00d3d0 100644
--- a/tests/api_resources/iam/user_groups/test_members.py
+++ b/tests/api_resources/iam/user_groups/test_members.py
@@ -249,7 +249,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncMembers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py
index ba5252f9de0..2e168db2008 100644
--- a/tests/api_resources/images/test_v1.py
+++ b/tests/api_resources/images/test_v1.py
@@ -37,7 +37,9 @@ def test_method_create(self, client: Cloudflare) -> None:
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
v1 = client.images.v1.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- file={},
+ id="id",
+ creator="creator",
+ file=b"raw file contents",
metadata={},
require_signed_urls=True,
url="https://example.com/path/to/logo.png",
@@ -92,6 +94,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
with pytest.warns(DeprecationWarning):
v1 = client.images.v1.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ creator="creator",
page=1,
per_page=10,
)
@@ -193,6 +196,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
v1 = client.images.v1.edit(
image_id="image_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ creator="creator",
metadata={},
require_signed_urls=True,
)
@@ -288,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncV1:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -303,7 +309,9 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
v1 = await async_client.images.v1.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- file={},
+ id="id",
+ creator="creator",
+ file=b"raw file contents",
metadata={},
require_signed_urls=True,
url="https://example.com/path/to/logo.png",
@@ -358,6 +366,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
with pytest.warns(DeprecationWarning):
v1 = await async_client.images.v1.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ creator="creator",
page=1,
per_page=10,
)
@@ -459,6 +468,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
v1 = await async_client.images.v1.edit(
image_id="image_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ creator="creator",
metadata={},
require_signed_urls=True,
)
diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py
index d668ca234a8..84d5e15b82c 100644
--- a/tests/api_resources/images/test_v2.py
+++ b/tests/api_resources/images/test_v2.py
@@ -29,6 +29,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
v2 = client.images.v2.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
continuation_token="continuation_token",
+ creator="creator",
per_page=10,
sort_order="asc",
)
@@ -67,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncV2:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@@ -81,6 +84,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
v2 = await async_client.images.v2.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
continuation_token="continuation_token",
+ creator="creator",
per_page=10,
sort_order="asc",
)
diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py
index 2d3a89dbc0b..316785c842d 100644
--- a/tests/api_resources/images/v1/test_blobs.py
+++ b/tests/api_resources/images/v1/test_blobs.py
@@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBlobs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
@pytest.mark.respx(base_url=base_url)
diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py
index ef6122e1816..edad6ebcb43 100644
--- a/tests/api_resources/images/v1/test_keys.py
+++ b/tests/api_resources/images/v1/test_keys.py
@@ -153,7 +153,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncKeys:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/images/v1/test_stats.py b/tests/api_resources/images/v1/test_stats.py
index ba44e332bc2..0c355f2fd23 100644
--- a/tests/api_resources/images/v1/test_stats.py
+++ b/tests/api_resources/images/v1/test_stats.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncStats:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py
index 0b88368b362..05d13a9d6c7 100644
--- a/tests/api_resources/images/v1/test_variants.py
+++ b/tests/api_resources/images/v1/test_variants.py
@@ -333,7 +333,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVariants:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/images/v2/test_direct_uploads.py b/tests/api_resources/images/v2/test_direct_uploads.py
index 88a6299905f..066ffab203a 100644
--- a/tests/api_resources/images/v2/test_direct_uploads.py
+++ b/tests/api_resources/images/v2/test_direct_uploads.py
@@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
direct_upload = client.images.v2.direct_uploads.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
id="this/is/my-customid",
+ creator="creator",
expiry=parse_datetime("2021-01-02T02:20:00Z"),
metadata={},
require_signed_urls=True,
@@ -74,7 +75,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncDirectUploads:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -90,6 +93,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
direct_upload = await async_client.images.v2.direct_uploads.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
id="this/is/my-customid",
+ creator="creator",
expiry=parse_datetime("2021-01-02T02:20:00Z"),
metadata={},
require_signed_urls=True,
diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py
index 116eb6f482b..f6b27a86ca8 100644
--- a/tests/api_resources/intel/asn/test_subnets.py
+++ b/tests/api_resources/intel/asn/test_subnets.py
@@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSubnets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py
index b51bdf0886d..01b9bf416fb 100644
--- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py
+++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py
@@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIssueTypes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py
index 23f555d5eab..985ca4c1d6c 100644
--- a/tests/api_resources/intel/attack_surface_report/test_issues.py
+++ b/tests/api_resources/intel/attack_surface_report/test_issues.py
@@ -346,7 +346,9 @@ def test_path_params_type(self, client: Cloudflare) -> None:
class TestAsyncIssues:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/domains/test_bulks.py b/tests/api_resources/intel/domains/test_bulks.py
index 8255f15b2c4..8a1c0480f60 100644
--- a/tests/api_resources/intel/domains/test_bulks.py
+++ b/tests/api_resources/intel/domains/test_bulks.py
@@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBulks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/indicator_feeds/test_downloads.py b/tests/api_resources/intel/indicator_feeds/test_downloads.py
index 98d6659f931..5c04a02c060 100644
--- a/tests/api_resources/intel/indicator_feeds/test_downloads.py
+++ b/tests/api_resources/intel/indicator_feeds/test_downloads.py
@@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDownloads:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py
index 3b06e3c0d14..4b5ec188fd9 100644
--- a/tests/api_resources/intel/indicator_feeds/test_permissions.py
+++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py
@@ -155,7 +155,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncPermissions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py
index 5b7f91a523b..ed91b7eb9ea 100644
--- a/tests/api_resources/intel/indicator_feeds/test_snapshots.py
+++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py
@@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncSnapshots:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py
index 1b9016472fe..16911e7242a 100644
--- a/tests/api_resources/intel/test_asn.py
+++ b/tests/api_resources/intel/test_asn.py
@@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncASN:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py
index dc6785b5f83..a0e513e9464 100644
--- a/tests/api_resources/intel/test_dns.py
+++ b/tests/api_resources/intel/test_dns.py
@@ -73,7 +73,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncDNS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_domain_history.py b/tests/api_resources/intel/test_domain_history.py
index 75926dc919d..e958709d7ca 100644
--- a/tests/api_resources/intel/test_domain_history.py
+++ b/tests/api_resources/intel/test_domain_history.py
@@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomainHistory:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py
index 9a897bf7904..1915f55b790 100644
--- a/tests/api_resources/intel/test_domains.py
+++ b/tests/api_resources/intel/test_domains.py
@@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py
index 6d8258dcf45..c3d7ce21af7 100644
--- a/tests/api_resources/intel/test_indicator_feeds.py
+++ b/tests/api_resources/intel/test_indicator_feeds.py
@@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIndicatorFeeds:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_ip_lists.py b/tests/api_resources/intel/test_ip_lists.py
index 01befdba45c..85a09ac9e4f 100644
--- a/tests/api_resources/intel/test_ip_lists.py
+++ b/tests/api_resources/intel/test_ip_lists.py
@@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIPLists:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py
index 4f39c996906..8ebd90426c0 100644
--- a/tests/api_resources/intel/test_ips.py
+++ b/tests/api_resources/intel/test_ips.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py
index 5fa3ec58751..549b9fa76eb 100644
--- a/tests/api_resources/intel/test_miscategorizations.py
+++ b/tests/api_resources/intel/test_miscategorizations.py
@@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncMiscategorizations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_sinkholes.py b/tests/api_resources/intel/test_sinkholes.py
index 5e9b3dda069..ff8bbde79c8 100644
--- a/tests/api_resources/intel/test_sinkholes.py
+++ b/tests/api_resources/intel/test_sinkholes.py
@@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncSinkholes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py
index 97c8efbf7a2..2bd6d6f9801 100644
--- a/tests/api_resources/intel/test_whois.py
+++ b/tests/api_resources/intel/test_whois.py
@@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWhois:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py
index 351613f0bfb..578cd37251e 100644
--- a/tests/api_resources/kv/namespaces/test_keys.py
+++ b/tests/api_resources/kv/namespaces/test_keys.py
@@ -219,7 +219,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None:
key = client.kv.namespaces.keys.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"])
@@ -230,7 +235,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None:
response = client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert response.is_closed is True
@@ -244,7 +254,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None:
with client.kv.namespaces.keys.with_streaming_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -261,19 +276,31 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None:
client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
class TestAsyncKeys:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@@ -469,7 +496,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None:
key = await async_client.kv.namespaces.keys.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"])
@@ -480,7 +512,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) ->
response = await async_client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert response.is_closed is True
@@ -494,7 +531,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar
async with async_client.kv.namespaces.keys.with_streaming_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -511,12 +553,22 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N
await async_client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
await async_client.kv.namespaces.keys.with_raw_response.bulk_update(
namespace_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py
index e6e56f6f06a..a53c0f4cee9 100644
--- a/tests/api_resources/kv/namespaces/test_metadata.py
+++ b/tests/api_resources/kv/namespaces/test_metadata.py
@@ -3,13 +3,12 @@
from __future__ import annotations
import os
-from typing import Any, Optional, cast
+from typing import Any, cast
import pytest
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.kv.namespaces import MetadataGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
)
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -37,7 +36,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
metadata = response.parse()
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -50,7 +49,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
metadata = response.parse()
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -79,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMetadata:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@@ -88,7 +89,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
)
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -101,7 +102,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
metadata = await response.parse()
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -114,7 +115,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
metadata = await response.parse()
- assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"])
+ assert_matches_type(object, metadata, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py
index fbf0e7a0dd5..0f4bf679af3 100644
--- a/tests/api_resources/kv/namespaces/test_values.py
+++ b/tests/api_resources/kv/namespaces/test_values.py
@@ -32,7 +32,6 @@ def test_method_update(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"])
@@ -44,10 +43,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
expiration=1578435000,
expiration_ttl=300,
+ metadata={"someMetadataKey": "someMetadataValue"},
)
assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"])
@@ -58,7 +57,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -74,7 +72,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
) as response:
assert not response.is_closed
@@ -93,7 +90,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -102,7 +98,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -111,7 +106,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
key_name="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -259,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncValues:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -268,7 +264,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"])
@@ -280,10 +275,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
expiration=1578435000,
expiration_ttl=300,
+ metadata={"someMetadataKey": "someMetadataValue"},
)
assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"])
@@ -294,7 +289,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -310,7 +304,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
) as response:
assert not response.is_closed
@@ -329,7 +322,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
key_name="My-Key",
account_id="",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -338,7 +330,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
key_name="My-Key",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
@@ -347,7 +338,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
key_name="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
- metadata='{"someMetadataKey": "someMetadataValue"}',
value="Some Value",
)
diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py
index df5a97c8a2d..42dd154ab91 100644
--- a/tests/api_resources/kv/test_namespaces.py
+++ b/tests/api_resources/kv/test_namespaces.py
@@ -338,7 +338,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None:
namespace = client.kv.namespaces.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"])
@@ -347,7 +352,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None:
response = client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert response.is_closed is True
@@ -360,7 +370,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None:
with client.kv.namespaces.with_streaming_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -376,14 +391,24 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None:
client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
@parametrize
@@ -436,7 +461,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncNamespaces:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -752,7 +779,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None:
namespace = await async_client.kv.namespaces.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"])
@@ -761,7 +793,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) ->
response = await async_client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
assert response.is_closed is True
@@ -774,7 +811,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar
async with async_client.kv.namespaces.with_streaming_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -790,14 +832,24 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N
await async_client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="0f2ac74b498b48028cb68387c421e279",
account_id="",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
await async_client.kv.namespaces.with_raw_response.bulk_update(
namespace_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[
+ {
+ "key": "My-Key",
+ "value": "Some string",
+ }
+ ],
)
@parametrize
diff --git a/tests/api_resources/leaked_credential_checks/test_detections.py b/tests/api_resources/leaked_credential_checks/test_detections.py
index c74c2b245cc..63fccbbb2c4 100644
--- a/tests/api_resources/leaked_credential_checks/test_detections.py
+++ b/tests/api_resources/leaked_credential_checks/test_detections.py
@@ -215,7 +215,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncDetections:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py
index 18c3eaee3ee..25aba3a816a 100644
--- a/tests/api_resources/load_balancers/monitors/test_previews.py
+++ b/tests/api_resources/load_balancers/monitors/test_previews.py
@@ -94,7 +94,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncPreviews:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py
index ba9680e3bc1..11f3553bf4b 100644
--- a/tests/api_resources/load_balancers/monitors/test_references.py
+++ b/tests/api_resources/load_balancers/monitors/test_references.py
@@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReferences:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py
index 19c16cd8d44..132196347d6 100644
--- a/tests/api_resources/load_balancers/pools/test_health.py
+++ b/tests/api_resources/load_balancers/pools/test_health.py
@@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHealth:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py
index 117c8a62c26..33509c209d5 100644
--- a/tests/api_resources/load_balancers/pools/test_references.py
+++ b/tests/api_resources/load_balancers/pools/test_references.py
@@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReferences:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py
index a52ea29fbff..8f6468e4245 100644
--- a/tests/api_resources/load_balancers/test_monitors.py
+++ b/tests/api_resources/load_balancers/test_monitors.py
@@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMonitors:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py
index 0b014d136c1..8b31995802d 100644
--- a/tests/api_resources/load_balancers/test_pools.py
+++ b/tests/api_resources/load_balancers/test_pools.py
@@ -496,7 +496,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPools:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py
index 281f21e0600..12b9ed13602 100644
--- a/tests/api_resources/load_balancers/test_previews.py
+++ b/tests/api_resources/load_balancers/test_previews.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPreviews:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py
index 6e689dc253b..eb825e082cd 100644
--- a/tests/api_resources/load_balancers/test_regions.py
+++ b/tests/api_resources/load_balancers/test_regions.py
@@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRegions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/load_balancers/test_searches.py b/tests/api_resources/load_balancers/test_searches.py
index bcd3e6d6397..7b6ed9ddf7c 100644
--- a/tests/api_resources/load_balancers/test_searches.py
+++ b/tests/api_resources/load_balancers/test_searches.py
@@ -74,7 +74,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncSearches:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py
index 728edcd12c2..f9e929d6f7f 100644
--- a/tests/api_resources/logpush/datasets/test_fields.py
+++ b/tests/api_resources/logpush/datasets/test_fields.py
@@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFields:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py
index 8392e96d1b8..54f7c233e8f 100644
--- a/tests/api_resources/logpush/datasets/test_jobs.py
+++ b/tests/api_resources/logpush/datasets/test_jobs.py
@@ -81,7 +81,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncJobs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py
index c110064ecf9..49a554ba2f0 100644
--- a/tests/api_resources/logpush/test_edge.py
+++ b/tests/api_resources/logpush/test_edge.py
@@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEdge:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py
index a5c39a87498..862caad9f98 100644
--- a/tests/api_resources/logpush/test_jobs.py
+++ b/tests/api_resources/logpush/test_jobs.py
@@ -33,28 +33,28 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
job = client.logpush.jobs.create(
destination_conf="s3://mybucket/logs?region=us-west-2",
account_id="account_id",
- dataset="http_requests",
+ dataset="gateway_dns",
enabled=False,
filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}',
frequency="high",
- kind="edge",
+ kind="",
logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
max_upload_bytes=5000000,
max_upload_interval_seconds=30,
max_upload_records=1000,
name="example.com",
output_options={
- "batch_prefix": "batch_prefix",
- "batch_suffix": "batch_suffix",
- "cve_2021_44228": True,
- "field_delimiter": "field_delimiter",
- "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"],
+ "batch_prefix": "",
+ "batch_suffix": "",
+ "cve_2021_44228": False,
+ "field_delimiter": ",",
+ "field_names": ["Datetime", "DstIP", "SrcIP"],
"output_type": "ndjson",
- "record_delimiter": "record_delimiter",
- "record_prefix": "record_prefix",
- "record_suffix": "record_suffix",
+ "record_delimiter": "",
+ "record_prefix": "{",
+ "record_suffix": "}\n",
"record_template": "record_template",
- "sample_rate": 0,
+ "sample_rate": 1,
"timestamp_format": "unixnano",
},
ownership_challenge="00000000000000000000",
@@ -123,24 +123,24 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
enabled=False,
filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}',
frequency="high",
- kind="edge",
+ kind="",
logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
max_upload_bytes=5000000,
max_upload_interval_seconds=30,
max_upload_records=1000,
name="example.com",
output_options={
- "batch_prefix": "batch_prefix",
- "batch_suffix": "batch_suffix",
- "cve_2021_44228": True,
- "field_delimiter": "field_delimiter",
- "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"],
+ "batch_prefix": "",
+ "batch_suffix": "",
+ "cve_2021_44228": False,
+ "field_delimiter": ",",
+ "field_names": ["Datetime", "DstIP", "SrcIP"],
"output_type": "ndjson",
- "record_delimiter": "record_delimiter",
- "record_prefix": "record_prefix",
- "record_suffix": "record_suffix",
+ "record_delimiter": "",
+ "record_prefix": "{",
+ "record_suffix": "}\n",
"record_template": "record_template",
- "sample_rate": 0,
+ "sample_rate": 1,
"timestamp_format": "unixnano",
},
ownership_challenge="00000000000000000000",
@@ -369,7 +369,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncJobs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -386,28 +388,28 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
job = await async_client.logpush.jobs.create(
destination_conf="s3://mybucket/logs?region=us-west-2",
account_id="account_id",
- dataset="http_requests",
+ dataset="gateway_dns",
enabled=False,
filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}',
frequency="high",
- kind="edge",
+ kind="",
logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
max_upload_bytes=5000000,
max_upload_interval_seconds=30,
max_upload_records=1000,
name="example.com",
output_options={
- "batch_prefix": "batch_prefix",
- "batch_suffix": "batch_suffix",
- "cve_2021_44228": True,
- "field_delimiter": "field_delimiter",
- "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"],
+ "batch_prefix": "",
+ "batch_suffix": "",
+ "cve_2021_44228": False,
+ "field_delimiter": ",",
+ "field_names": ["Datetime", "DstIP", "SrcIP"],
"output_type": "ndjson",
- "record_delimiter": "record_delimiter",
- "record_prefix": "record_prefix",
- "record_suffix": "record_suffix",
+ "record_delimiter": "",
+ "record_prefix": "{",
+ "record_suffix": "}\n",
"record_template": "record_template",
- "sample_rate": 0,
+ "sample_rate": 1,
"timestamp_format": "unixnano",
},
ownership_challenge="00000000000000000000",
@@ -476,24 +478,24 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
enabled=False,
filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}',
frequency="high",
- kind="edge",
+ kind="",
logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
max_upload_bytes=5000000,
max_upload_interval_seconds=30,
max_upload_records=1000,
name="example.com",
output_options={
- "batch_prefix": "batch_prefix",
- "batch_suffix": "batch_suffix",
- "cve_2021_44228": True,
- "field_delimiter": "field_delimiter",
- "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"],
+ "batch_prefix": "",
+ "batch_suffix": "",
+ "cve_2021_44228": False,
+ "field_delimiter": ",",
+ "field_names": ["Datetime", "DstIP", "SrcIP"],
"output_type": "ndjson",
- "record_delimiter": "record_delimiter",
- "record_prefix": "record_prefix",
- "record_suffix": "record_suffix",
+ "record_delimiter": "",
+ "record_prefix": "{",
+ "record_suffix": "}\n",
"record_template": "record_template",
- "sample_rate": 0,
+ "sample_rate": 1,
"timestamp_format": "unixnano",
},
ownership_challenge="00000000000000000000",
diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py
index 4ad4830713f..18096fdc424 100644
--- a/tests/api_resources/logpush/test_ownership.py
+++ b/tests/api_resources/logpush/test_ownership.py
@@ -150,7 +150,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None:
class TestAsyncOwnership:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py
index 1912c05f201..8ecf8701fc8 100644
--- a/tests/api_resources/logpush/test_validate.py
+++ b/tests/api_resources/logpush/test_validate.py
@@ -206,7 +206,9 @@ def test_path_params_origin(self, client: Cloudflare) -> None:
class TestAsyncValidate:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/logs/control/cmb/test_config.py b/tests/api_resources/logs/control/cmb/test_config.py
index e58378c937e..e745ff9be6b 100644
--- a/tests/api_resources/logs/control/cmb/test_config.py
+++ b/tests/api_resources/logs/control/cmb/test_config.py
@@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfig:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/logs/control/test_retention.py b/tests/api_resources/logs/control/test_retention.py
index 1f321941bb8..8177450dcf5 100644
--- a/tests/api_resources/logs/control/test_retention.py
+++ b/tests/api_resources/logs/control/test_retention.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRetention:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/logs/received/test_fields.py b/tests/api_resources/logs/received/test_fields.py
index 8705e75e0e9..473a5baf341 100644
--- a/tests/api_resources/logs/received/test_fields.py
+++ b/tests/api_resources/logs/received/test_fields.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFields:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py
index b891b658a90..bcd572c49c1 100644
--- a/tests/api_resources/logs/test_rayid.py
+++ b/tests/api_resources/logs/test_rayid.py
@@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRayID:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py
index 088eb9ad2fa..f8c8795c20c 100644
--- a/tests/api_resources/logs/test_received.py
+++ b/tests/api_resources/logs/test_received.py
@@ -74,7 +74,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReceived:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py
index e1be4de8e18..9159a726003 100644
--- a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py
+++ b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py
@@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncPrebuiltPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py
index 42e21b1d632..4813fc1dc17 100644
--- a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py
+++ b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py
@@ -145,7 +145,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncAddressSpaces:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py
index 350a49f7a71..71e9deec8ed 100644
--- a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py
+++ b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py
@@ -401,7 +401,9 @@ def test_path_params_refresh(self, client: Cloudflare) -> None:
class TestAsyncCatalogSyncs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py
index deef57f6415..d03faca3b56 100644
--- a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py
+++ b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py
@@ -510,7 +510,9 @@ def test_path_params_initial_setup(self, client: Cloudflare) -> None:
class TestAsyncCloudIntegrations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/test_on_ramps.py b/tests/api_resources/magic_cloud_networking/test_on_ramps.py
index b47c6990c3a..4706a5bcde6 100644
--- a/tests/api_resources/magic_cloud_networking/test_on_ramps.py
+++ b/tests/api_resources/magic_cloud_networking/test_on_ramps.py
@@ -576,7 +576,9 @@ def test_path_params_plan(self, client: Cloudflare) -> None:
class TestAsyncOnRamps:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_cloud_networking/test_resources.py b/tests/api_resources/magic_cloud_networking/test_resources.py
index d591ba5c7f0..8275125681e 100644
--- a/tests/api_resources/magic_cloud_networking/test_resources.py
+++ b/tests/api_resources/magic_cloud_networking/test_resources.py
@@ -267,7 +267,9 @@ def test_path_params_policy_preview(self, client: Cloudflare) -> None:
class TestAsyncResources:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_network_monitoring/configs/test_full.py b/tests/api_resources/magic_network_monitoring/configs/test_full.py
index fa2d1efd518..9233a8c1c40 100644
--- a/tests/api_resources/magic_network_monitoring/configs/test_full.py
+++ b/tests/api_resources/magic_network_monitoring/configs/test_full.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFull:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py
index 46761c021c6..c9415da5b36 100644
--- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py
+++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py
@@ -72,7 +72,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncAdvertisements:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py
index 5cd11d231e0..aa21987216c 100644
--- a/tests/api_resources/magic_network_monitoring/test_configs.py
+++ b/tests/api_resources/magic_network_monitoring/test_configs.py
@@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py
index 1f5cbdf0ea3..862586ea078 100644
--- a/tests/api_resources/magic_network_monitoring/test_rules.py
+++ b/tests/api_resources/magic_network_monitoring/test_rules.py
@@ -342,7 +342,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py
index 01a029b3b62..3d876e6c8bf 100644
--- a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py
+++ b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py
@@ -56,7 +56,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncTokens:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/connectors/events/test_latest.py b/tests/api_resources/magic_transit/connectors/events/test_latest.py
index fb297d3841a..04679973ea3 100644
--- a/tests/api_resources/magic_transit/connectors/events/test_latest.py
+++ b/tests/api_resources/magic_transit/connectors/events/test_latest.py
@@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncLatest:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py
index 2a812ac20c2..639138ca157 100644
--- a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py
+++ b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py
@@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncLatest:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/connectors/test_events.py b/tests/api_resources/magic_transit/connectors/test_events.py
index 65d54d4764d..aab24b14fa6 100644
--- a/tests/api_resources/magic_transit/connectors/test_events.py
+++ b/tests/api_resources/magic_transit/connectors/test_events.py
@@ -35,6 +35,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
from_=0,
to=0,
cursor="cursor",
+ k="k",
limit=0,
)
assert_matches_type(EventListResponse, event, path=["response"])
@@ -147,7 +148,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@@ -167,6 +170,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
from_=0,
to=0,
cursor="cursor",
+ k="k",
limit=0,
)
assert_matches_type(EventListResponse, event, path=["response"])
diff --git a/tests/api_resources/magic_transit/connectors/test_snapshots.py b/tests/api_resources/magic_transit/connectors/test_snapshots.py
index 46a4ffa8148..f820c3d86f3 100644
--- a/tests/api_resources/magic_transit/connectors/test_snapshots.py
+++ b/tests/api_resources/magic_transit/connectors/test_snapshots.py
@@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSnapshots:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/pcaps/test_download.py b/tests/api_resources/magic_transit/pcaps/test_download.py
index 5ab97be2429..de43411bbd3 100644
--- a/tests/api_resources/magic_transit/pcaps/test_download.py
+++ b/tests/api_resources/magic_transit/pcaps/test_download.py
@@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDownload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
@pytest.mark.respx(base_url=base_url)
diff --git a/tests/api_resources/magic_transit/pcaps/test_ownership.py b/tests/api_resources/magic_transit/pcaps/test_ownership.py
index 7a7d3ea89ec..dcc99b592ff 100644
--- a/tests/api_resources/magic_transit/pcaps/test_ownership.py
+++ b/tests/api_resources/magic_transit/pcaps/test_ownership.py
@@ -194,7 +194,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None:
class TestAsyncOwnership:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py
index d6c31f71bc6..1e98e853d29 100644
--- a/tests/api_resources/magic_transit/sites/test_acls.py
+++ b/tests/api_resources/magic_transit/sites/test_acls.py
@@ -456,7 +456,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncACLs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py
index 2fc412afa6e..8eeced417a8 100644
--- a/tests/api_resources/magic_transit/sites/test_lans.py
+++ b/tests/api_resources/magic_transit/sites/test_lans.py
@@ -471,7 +471,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLANs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py
index b8e91efc2dc..98217a3396c 100644
--- a/tests/api_resources/magic_transit/sites/test_wans.py
+++ b/tests/api_resources/magic_transit/sites/test_wans.py
@@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWANs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/test_apps.py b/tests/api_resources/magic_transit/test_apps.py
index 185b0f31251..bfa9adeceb6 100644
--- a/tests/api_resources/magic_transit/test_apps.py
+++ b/tests/api_resources/magic_transit/test_apps.py
@@ -346,7 +346,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncApps:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(
reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212"
diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py
index 91c10afd3aa..5e6d2e6d6a8 100644
--- a/tests/api_resources/magic_transit/test_cf_interconnects.py
+++ b/tests/api_resources/magic_transit/test_cf_interconnects.py
@@ -46,6 +46,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"type": "request",
},
interface_address="192.0.2.0/31",
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
x_magic_new_hc_target=True,
)
@@ -255,7 +256,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCfInterconnects:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -281,6 +284,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"type": "request",
},
interface_address="192.0.2.0/31",
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
x_magic_new_hc_target=True,
)
diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py
index 75506734f5e..832813e3fae 100644
--- a/tests/api_resources/magic_transit/test_connectors.py
+++ b/tests/api_resources/magic_transit/test_connectors.py
@@ -14,6 +14,8 @@
ConnectorGetResponse,
ConnectorEditResponse,
ConnectorListResponse,
+ ConnectorCreateResponse,
+ ConnectorDeleteResponse,
ConnectorUpdateResponse,
)
@@ -23,6 +25,79 @@
class TestConnectors:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ connector = client.magic_transit.connectors.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ )
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ connector = client.magic_transit.connectors.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={
+ "id": "id",
+ "serial_number": "serial_number",
+ },
+ activated=True,
+ interrupt_window_duration_hours=0,
+ interrupt_window_hour_of_day=0,
+ notes="notes",
+ timezone="timezone",
+ )
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.magic_transit.connectors.with_raw_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ connector = response.parse()
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.magic_transit.connectors.with_streaming_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ connector = response.parse()
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.magic_transit.connectors.with_raw_response.create(
+ account_id="",
+ device={},
+ )
+
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
connector = client.magic_transit.connectors.update(
@@ -122,6 +197,54 @@ def test_path_params_list(self, client: Cloudflare) -> None:
account_id="",
)
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ connector = client.magic_transit.connectors.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ connector = response.parse()
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.magic_transit.connectors.with_streaming_response.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ connector = response.parse()
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="connector_id",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"):
+ client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
connector = client.magic_transit.connectors.edit(
@@ -233,7 +356,82 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConnectors:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ connector = await async_client.magic_transit.connectors.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ )
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ connector = await async_client.magic_transit.connectors.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={
+ "id": "id",
+ "serial_number": "serial_number",
+ },
+ activated=True,
+ interrupt_window_duration_hours=0,
+ interrupt_window_hour_of_day=0,
+ notes="notes",
+ timezone="timezone",
+ )
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.magic_transit.connectors.with_raw_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ connector = await response.parse()
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.magic_transit.connectors.with_streaming_response.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ device={},
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ connector = await response.parse()
+ assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(
+ reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
+ )
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.magic_transit.connectors.with_raw_response.create(
+ account_id="",
+ device={},
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@@ -334,6 +532,54 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
account_id="",
)
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ connector = await async_client.magic_transit.connectors.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ connector = await response.parse()
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.magic_transit.connectors.with_streaming_response.delete(
+ connector_id="connector_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ connector = await response.parse()
+ assert_matches_type(ConnectorDeleteResponse, connector, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="connector_id",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"):
+ await async_client.magic_transit.connectors.with_raw_response.delete(
+ connector_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
connector = await async_client.magic_transit.connectors.edit(
diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py
index 03eee2584f0..37b5369bcee 100644
--- a/tests/api_resources/magic_transit/test_gre_tunnels.py
+++ b/tests/api_resources/magic_transit/test_gre_tunnels.py
@@ -53,6 +53,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
ttl=0,
x_magic_new_hc_target=True,
@@ -136,6 +137,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
ttl=0,
x_magic_new_hc_target=True,
@@ -419,7 +421,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncGRETunnels:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -450,6 +454,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
ttl=0,
x_magic_new_hc_target=True,
@@ -533,6 +538,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
mtu=0,
ttl=0,
x_magic_new_hc_target=True,
diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py
index 96121a2b033..417c5e7c25c 100644
--- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py
+++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py
@@ -51,6 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replay_protection=False,
x_magic_new_hc_target=True,
@@ -127,6 +128,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replay_protection=False,
x_magic_new_hc_target=True,
@@ -459,7 +461,9 @@ def test_path_params_psk_generate(self, client: Cloudflare) -> None:
class TestAsyncIPSECTunnels:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -487,6 +491,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replay_protection=False,
x_magic_new_hc_target=True,
@@ -563,6 +568,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"target": {"saved": "203.0.113.1"},
"type": "request",
},
+ interface_address6="2606:54c1:7:0:a9fe:12d2:1:200/127",
psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replay_protection=False,
x_magic_new_hc_target=True,
diff --git a/tests/api_resources/magic_transit/test_pcaps.py b/tests/api_resources/magic_transit/test_pcaps.py
index 6c7d57154cc..17a6cb661d4 100644
--- a/tests/api_resources/magic_transit/test_pcaps.py
+++ b/tests/api_resources/magic_transit/test_pcaps.py
@@ -311,7 +311,9 @@ def test_path_params_stop(self, client: Cloudflare) -> None:
class TestAsyncPCAPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py
index 81af5a39088..9524a986da2 100644
--- a/tests/api_resources/magic_transit/test_routes.py
+++ b/tests/api_resources/magic_transit/test_routes.py
@@ -420,7 +420,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRoutes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py
index 406ca9f52a9..27c50c24f7f 100644
--- a/tests/api_resources/magic_transit/test_sites.py
+++ b/tests/api_resources/magic_transit/test_sites.py
@@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSites:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py
index 6f11e303c01..ce2192b2694 100644
--- a/tests/api_resources/mtls_certificates/test_associations.py
+++ b/tests/api_resources/mtls_certificates/test_associations.py
@@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAssociations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/network_interconnects/test_cnis.py b/tests/api_resources/network_interconnects/test_cnis.py
index a5ae1785ded..a2d7d5044f1 100644
--- a/tests/api_resources/network_interconnects/test_cnis.py
+++ b/tests/api_resources/network_interconnects/test_cnis.py
@@ -375,7 +375,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCNIs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/network_interconnects/test_interconnects.py b/tests/api_resources/network_interconnects/test_interconnects.py
index 79d4f5ec681..ff267d7864b 100644
--- a/tests/api_resources/network_interconnects/test_interconnects.py
+++ b/tests/api_resources/network_interconnects/test_interconnects.py
@@ -380,7 +380,9 @@ def test_path_params_status(self, client: Cloudflare) -> None:
class TestAsyncInterconnects:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/network_interconnects/test_settings.py b/tests/api_resources/network_interconnects/test_settings.py
index d5151d269f7..144eb7b2f92 100644
--- a/tests/api_resources/network_interconnects/test_settings.py
+++ b/tests/api_resources/network_interconnects/test_settings.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/network_interconnects/test_slots.py b/tests/api_resources/network_interconnects/test_slots.py
index 6e7b507d51c..b57afef6ce5 100644
--- a/tests/api_resources/network_interconnects/test_slots.py
+++ b/tests/api_resources/network_interconnects/test_slots.py
@@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSlots:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py
index 0e2ef562a10..7e804a45b46 100644
--- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py
+++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py
@@ -205,7 +205,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py
index 37839d99139..caded780ceb 100644
--- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py
+++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py
@@ -113,7 +113,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHostnames:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/origin_tls_client_auth/test_settings.py b/tests/api_resources/origin_tls_client_auth/test_settings.py
index fc30faf30eb..03cf5a4bc0e 100644
--- a/tests/api_resources/origin_tls_client_auth/test_settings.py
+++ b/tests/api_resources/origin_tls_client_auth/test_settings.py
@@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py
index 1af65b2ef8f..ea61c20c164 100644
--- a/tests/api_resources/page_shield/test_connections.py
+++ b/tests/api_resources/page_shield/test_connections.py
@@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConnections:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/page_shield/test_cookies.py b/tests/api_resources/page_shield/test_cookies.py
index d3008ff641a..4c3ee43d562 100644
--- a/tests/api_resources/page_shield/test_cookies.py
+++ b/tests/api_resources/page_shield/test_cookies.py
@@ -127,7 +127,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCookies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py
index 375863ad9b6..a62663f6b51 100644
--- a/tests/api_resources/page_shield/test_policies.py
+++ b/tests/api_resources/page_shield/test_policies.py
@@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py
index f8a9077bccf..af2706f5f45 100644
--- a/tests/api_resources/page_shield/test_scripts.py
+++ b/tests/api_resources/page_shield/test_scripts.py
@@ -126,7 +126,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncScripts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py
index db7215a143b..54642c4a269 100644
--- a/tests/api_resources/pages/projects/deployments/history/test_logs.py
+++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py
@@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py
index 7c9203aa0c3..5d4451d14e8 100644
--- a/tests/api_resources/pages/projects/test_deployments.py
+++ b/tests/api_resources/pages/projects/test_deployments.py
@@ -391,7 +391,9 @@ def test_path_params_rollback(self, client: Cloudflare) -> None:
class TestAsyncDeployments:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py
index 24f58204f4a..3725b40f8b8 100644
--- a/tests/api_resources/pages/projects/test_domains.py
+++ b/tests/api_resources/pages/projects/test_domains.py
@@ -316,7 +316,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py
index f4e1ef5989d..f6f4158b237 100644
--- a/tests/api_resources/pages/test_projects.py
+++ b/tests/api_resources/pages/test_projects.py
@@ -495,7 +495,9 @@ def test_path_params_purge_build_cache(self, client: Cloudflare) -> None:
class TestAsyncProjects:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py
index 088cbc4a814..f6d8f1a374d 100644
--- a/tests/api_resources/queues/test_consumers.py
+++ b/tests/api_resources/queues/test_consumers.py
@@ -304,6 +304,54 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None:
queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ consumer = client.queues.consumers.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.queues.consumers.with_raw_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ consumer = response.parse()
+ assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.queues.consumers.with_streaming_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ consumer = response.parse()
+ assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.queues.consumers.with_raw_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"):
+ client.queues.consumers.with_raw_response.list(
+ queue_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
consumer = client.queues.consumers.delete(
@@ -367,34 +415,37 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
consumer = client.queues.consumers.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.queues.consumers.with_raw_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
consumer = response.parse()
- assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.queues.consumers.with_streaming_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
consumer = response.parse()
- assert_matches_type(SyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -402,19 +453,30 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.queues.consumers.with_raw_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"):
client.queues.consumers.with_raw_response.get(
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
queue_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"):
+ client.queues.consumers.with_raw_response.get(
+ consumer_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
class TestAsyncConsumers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None:
@@ -702,6 +764,54 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare
queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ consumer = await async_client.queues.consumers.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.queues.consumers.with_raw_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ consumer = await response.parse()
+ assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.queues.consumers.with_streaming_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ consumer = await response.parse()
+ assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.queues.consumers.with_raw_response.list(
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"):
+ await async_client.queues.consumers.with_raw_response.list(
+ queue_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
consumer = await async_client.queues.consumers.delete(
@@ -765,34 +875,37 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
consumer = await async_client.queues.consumers.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.queues.consumers.with_raw_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
consumer = await response.parse()
- assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.queues.consumers.with_streaming_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
consumer = await response.parse()
- assert_matches_type(AsyncSinglePage[Consumer], consumer, path=["response"])
+ assert_matches_type(Optional[Consumer], consumer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -800,12 +913,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.queues.consumers.with_raw_response.get(
- queue_id="023e105f4ecef8ad9ca31a8372d0c353",
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"):
await async_client.queues.consumers.with_raw_response.get(
+ consumer_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
queue_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"):
+ await async_client.queues.consumers.with_raw_response.get(
+ consumer_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ queue_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py
index 48a8880f39a..f53b6239ae1 100644
--- a/tests/api_resources/queues/test_messages.py
+++ b/tests/api_resources/queues/test_messages.py
@@ -331,7 +331,9 @@ def test_path_params_push_overload_2(self, client: Cloudflare) -> None:
class TestAsyncMessages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_ack(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/queues/test_purge.py b/tests/api_resources/queues/test_purge.py
index f246fe06841..3148148bfb7 100644
--- a/tests/api_resources/queues/test_purge.py
+++ b/tests/api_resources/queues/test_purge.py
@@ -124,7 +124,9 @@ def test_path_params_status(self, client: Cloudflare) -> None:
class TestAsyncPurge:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_start(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/r2/buckets/domains/test_custom.py b/tests/api_resources/r2/buckets/domains/test_custom.py
index c93c6691c11..b9b36f64a20 100644
--- a/tests/api_resources/r2/buckets/domains/test_custom.py
+++ b/tests/api_resources/r2/buckets/domains/test_custom.py
@@ -395,7 +395,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustom:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/buckets/domains/test_managed.py b/tests/api_resources/r2/buckets/domains/test_managed.py
index 2d574c1b72a..416c742d2ed 100644
--- a/tests/api_resources/r2/buckets/domains/test_managed.py
+++ b/tests/api_resources/r2/buckets/domains/test_managed.py
@@ -149,7 +149,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncManaged:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_cors.py b/tests/api_resources/r2/buckets/test_cors.py
index 4c978af07d5..0864698edc4 100644
--- a/tests/api_resources/r2/buckets/test_cors.py
+++ b/tests/api_resources/r2/buckets/test_cors.py
@@ -217,7 +217,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCORS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_event_notifications.py b/tests/api_resources/r2/buckets/test_event_notifications.py
index e3df821f3f2..07495b047e0 100644
--- a/tests/api_resources/r2/buckets/test_event_notifications.py
+++ b/tests/api_resources/r2/buckets/test_event_notifications.py
@@ -317,7 +317,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEventNotifications:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_lifecycle.py b/tests/api_resources/r2/buckets/test_lifecycle.py
index f377344330f..d366fb30c4b 100644
--- a/tests/api_resources/r2/buckets/test_lifecycle.py
+++ b/tests/api_resources/r2/buckets/test_lifecycle.py
@@ -171,7 +171,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLifecycle:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_locks.py b/tests/api_resources/r2/buckets/test_locks.py
index 5921965821f..2debc63606e 100644
--- a/tests/api_resources/r2/buckets/test_locks.py
+++ b/tests/api_resources/r2/buckets/test_locks.py
@@ -154,7 +154,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLocks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_metrics.py b/tests/api_resources/r2/buckets/test_metrics.py
index fde55e0bb0e..974564e0fc8 100644
--- a/tests/api_resources/r2/buckets/test_metrics.py
+++ b/tests/api_resources/r2/buckets/test_metrics.py
@@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncMetrics:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/r2/buckets/test_sippy.py b/tests/api_resources/r2/buckets/test_sippy.py
index 6e67aca418d..b7b43b3b788 100644
--- a/tests/api_resources/r2/buckets/test_sippy.py
+++ b/tests/api_resources/r2/buckets/test_sippy.py
@@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSippy:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/super_slurper/jobs/test_logs.py b/tests/api_resources/r2/super_slurper/jobs/test_logs.py
index c1766d0953d..847b27f546d 100644
--- a/tests/api_resources/r2/super_slurper/jobs/test_logs.py
+++ b/tests/api_resources/r2/super_slurper/jobs/test_logs.py
@@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py
index c3f1403cc88..6583f5a6cee 100644
--- a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py
+++ b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py
@@ -229,7 +229,9 @@ def test_path_params_target(self, client: Cloudflare) -> None:
class TestAsyncConnectivityPrecheck:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_source_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/r2/super_slurper/test_jobs.py b/tests/api_resources/r2/super_slurper/test_jobs.py
index 4f7f9107ee8..e5976ec5fc2 100644
--- a/tests/api_resources/r2/super_slurper/test_jobs.py
+++ b/tests/api_resources/r2/super_slurper/test_jobs.py
@@ -414,7 +414,9 @@ def test_path_params_resume(self, client: Cloudflare) -> None:
class TestAsyncJobs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py
index b9c2dfdc7b3..733506878c5 100644
--- a/tests/api_resources/r2/test_buckets.py
+++ b/tests/api_resources/r2/test_buckets.py
@@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBuckets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/r2/test_temporary_credentials.py b/tests/api_resources/r2/test_temporary_credentials.py
index aa2d0981d16..71d2caa82f8 100644
--- a/tests/api_resources/r2/test_temporary_credentials.py
+++ b/tests/api_resources/r2/test_temporary_credentials.py
@@ -91,7 +91,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncTemporaryCredentials:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/radar/ai/bots/test_summary.py b/tests/api_resources/radar/ai/bots/test_summary.py
index 90e08cd591d..902d2d89a9e 100644
--- a/tests/api_resources/radar/ai/bots/test_summary.py
+++ b/tests/api_resources/radar/ai/bots/test_summary.py
@@ -60,7 +60,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ai/inference/test_summary.py b/tests/api_resources/radar/ai/inference/test_summary.py
index 353a568f366..39dadb81d00 100644
--- a/tests/api_resources/radar/ai/inference/test_summary.py
+++ b/tests/api_resources/radar/ai/inference/test_summary.py
@@ -97,7 +97,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_model(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py
index 1a3c0affb15..844a159826c 100644
--- a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py
+++ b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py
@@ -99,7 +99,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_model(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ai/test_timeseries_groups.py b/tests/api_resources/radar/ai/test_timeseries_groups.py
index 59c16b41561..8f0749ca7c5 100644
--- a/tests/api_resources/radar/ai/test_timeseries_groups.py
+++ b/tests/api_resources/radar/ai/test_timeseries_groups.py
@@ -61,7 +61,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ai/test_to_markdown.py b/tests/api_resources/radar/ai/test_to_markdown.py
index 6dd6f07410a..6b6edbe9b6f 100644
--- a/tests/api_resources/radar/ai/test_to_markdown.py
+++ b/tests/api_resources/radar/ai/test_to_markdown.py
@@ -30,8 +30,8 @@ def test_method_create(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
to_markdown = client.radar.ai.to_markdown.create(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
body=b"raw file contents",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncSinglePage[ToMarkdownCreateResponse], to_markdown, path=["response"])
@@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncToMarkdown:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
@parametrize
@@ -85,8 +87,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
to_markdown = await async_client.radar.ai.to_markdown.create(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
body=b"raw file contents",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncSinglePage[ToMarkdownCreateResponse], to_markdown, path=["response"])
diff --git a/tests/api_resources/radar/annotations/test_outages.py b/tests/api_resources/radar/annotations/test_outages.py
index f249d7e3c89..c1cdb759a86 100644
--- a/tests/api_resources/radar/annotations/test_outages.py
+++ b/tests/api_resources/radar/annotations/test_outages.py
@@ -98,7 +98,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None:
class TestAsyncOutages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py
index 3d71c52ebae..6557815c13b 100644
--- a/tests/api_resources/radar/as112/test_summary.py
+++ b/tests/api_resources/radar/as112/test_summary.py
@@ -272,7 +272,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py
index c428285efdf..563610398f4 100644
--- a/tests/api_resources/radar/as112/test_timeseries_groups.py
+++ b/tests/api_resources/radar/as112/test_timeseries_groups.py
@@ -278,7 +278,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py
index 9d7f4f2d626..a99a57baac1 100644
--- a/tests/api_resources/radar/as112/test_top.py
+++ b/tests/api_resources/radar/as112/test_top.py
@@ -202,7 +202,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py
index a488256e75c..7dea5d0b754 100644
--- a/tests/api_resources/radar/attacks/layer3/test_summary.py
+++ b/tests/api_resources/radar/attacks/layer3/test_summary.py
@@ -316,7 +316,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py
index a6dfc1a6d56..96416cc6c73 100644
--- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py
+++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py
@@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py
index a2ba4039c5b..f2d259447fa 100644
--- a/tests/api_resources/radar/attacks/layer3/test_top.py
+++ b/tests/api_resources/radar/attacks/layer3/test_top.py
@@ -165,7 +165,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_attacks(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer3/top/test_locations.py b/tests/api_resources/radar/attacks/layer3/top/test_locations.py
index fc0424a2a6b..8c84eb28cc7 100644
--- a/tests/api_resources/radar/attacks/layer3/top/test_locations.py
+++ b/tests/api_resources/radar/attacks/layer3/top/test_locations.py
@@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_origin(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py
index ee33af513ca..e7fb747af1b 100644
--- a/tests/api_resources/radar/attacks/layer7/test_summary.py
+++ b/tests/api_resources/radar/attacks/layer7/test_summary.py
@@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_http_method(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py
index 7192af1ea24..4f306059ea1 100644
--- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py
+++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py
@@ -344,7 +344,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_http_method(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py
index 0b9bdd624b2..206bc01f5dd 100644
--- a/tests/api_resources/radar/attacks/layer7/test_top.py
+++ b/tests/api_resources/radar/attacks/layer7/test_top.py
@@ -42,7 +42,6 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None:
limit_direction="ORIGIN",
limit_per_location=10,
location=["string"],
- magnitude="MITIGATED_REQUESTS",
mitigation_product=["DDOS"],
name=["main_series"],
normalization="PERCENTAGE",
@@ -171,7 +170,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_attacks(self, async_client: AsyncCloudflare) -> None:
@@ -191,7 +192,6 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar
limit_direction="ORIGIN",
limit_per_location=10,
location=["string"],
- magnitude="MITIGATED_REQUESTS",
mitigation_product=["DDOS"],
name=["main_series"],
normalization="PERCENTAGE",
diff --git a/tests/api_resources/radar/attacks/layer7/top/test_ases.py b/tests/api_resources/radar/attacks/layer7/top/test_ases.py
index 355e8d958f3..d5fc7fad28a 100644
--- a/tests/api_resources/radar/attacks/layer7/top/test_ases.py
+++ b/tests/api_resources/radar/attacks/layer7/top/test_ases.py
@@ -63,7 +63,9 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None:
class TestAsyncAses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_origin(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/layer7/top/test_locations.py b/tests/api_resources/radar/attacks/layer7/top/test_locations.py
index e316dabe10d..0beda3534c5 100644
--- a/tests/api_resources/radar/attacks/layer7/top/test_locations.py
+++ b/tests/api_resources/radar/attacks/layer7/top/test_locations.py
@@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_origin(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/test_layer3.py b/tests/api_resources/radar/attacks/test_layer3.py
index 0d2c720472e..182fc628ecc 100644
--- a/tests/api_resources/radar/attacks/test_layer3.py
+++ b/tests/api_resources/radar/attacks/test_layer3.py
@@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncLayer3:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/attacks/test_layer7.py b/tests/api_resources/radar/attacks/test_layer7.py
index 7a43a414b3f..66db2e280df 100644
--- a/tests/api_resources/radar/attacks/test_layer7.py
+++ b/tests/api_resources/radar/attacks/test_layer7.py
@@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncLayer7:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py
index 52439d479ae..eb17a28d7a5 100644
--- a/tests/api_resources/radar/bgp/hijacks/test_events.py
+++ b/tests/api_resources/radar/bgp/hijacks/test_events.py
@@ -68,7 +68,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py
index d3e22882b2a..470dc98987b 100644
--- a/tests/api_resources/radar/bgp/leaks/test_events.py
+++ b/tests/api_resources/radar/bgp/leaks/test_events.py
@@ -64,7 +64,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/test_ips.py b/tests/api_resources/radar/bgp/test_ips.py
index 27272ae08e2..8a852f8528c 100644
--- a/tests/api_resources/radar/bgp/test_ips.py
+++ b/tests/api_resources/radar/bgp/test_ips.py
@@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncIPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py
index 34ee276782a..aa7b276d153 100644
--- a/tests/api_resources/radar/bgp/test_routes.py
+++ b/tests/api_resources/radar/bgp/test_routes.py
@@ -199,7 +199,9 @@ def test_streaming_response_stats(self, client: Cloudflare) -> None:
class TestAsyncRoutes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_ases(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/test_top.py b/tests/api_resources/radar/bgp/test_top.py
index afd90a9fc0d..1880ce7d0a2 100644
--- a/tests/api_resources/radar/bgp/test_top.py
+++ b/tests/api_resources/radar/bgp/test_top.py
@@ -59,7 +59,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_prefixes(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py
index 261cfd82941..2bc97e0df99 100644
--- a/tests/api_resources/radar/bgp/top/test_ases.py
+++ b/tests/api_resources/radar/bgp/top/test_ases.py
@@ -94,7 +94,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None:
class TestAsyncAses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/bots/__init__.py b/tests/api_resources/radar/bots/__init__.py
new file mode 100644
index 00000000000..fd8019a9a1a
--- /dev/null
+++ b/tests/api_resources/radar/bots/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/radar/bots/test_web_crawlers.py b/tests/api_resources/radar/bots/test_web_crawlers.py
new file mode 100644
index 00000000000..4aee2bae6e8
--- /dev/null
+++ b/tests/api_resources/radar/bots/test_web_crawlers.py
@@ -0,0 +1,210 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare._utils import parse_datetime
+from cloudflare.types.radar.bots import (
+ WebCrawlerSummaryResponse,
+ WebCrawlerTimeseriesGroupsResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestWebCrawlers:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_summary(self, client: Cloudflare) -> None:
+ web_crawler = client.radar.bots.web_crawlers.summary(
+ dimension="USER_AGENT",
+ )
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
+ web_crawler = client.radar.bots.web_crawlers.summary(
+ dimension="USER_AGENT",
+ bot_operator=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ name=["main_series"],
+ )
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_raw_response_summary(self, client: Cloudflare) -> None:
+ response = client.radar.bots.web_crawlers.with_raw_response.summary(
+ dimension="USER_AGENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_crawler = response.parse()
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_streaming_response_summary(self, client: Cloudflare) -> None:
+ with client.radar.bots.web_crawlers.with_streaming_response.summary(
+ dimension="USER_AGENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_crawler = response.parse()
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_timeseries_groups(self, client: Cloudflare) -> None:
+ web_crawler = client.radar.bots.web_crawlers.timeseries_groups(
+ dimension="USER_AGENT",
+ )
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None:
+ web_crawler = client.radar.bots.web_crawlers.timeseries_groups(
+ dimension="USER_AGENT",
+ agg_interval="1h",
+ bot_operator=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ name=["main_series"],
+ )
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None:
+ response = client.radar.bots.web_crawlers.with_raw_response.timeseries_groups(
+ dimension="USER_AGENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_crawler = response.parse()
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None:
+ with client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups(
+ dimension="USER_AGENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_crawler = response.parse()
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncWebCrawlers:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_summary(self, async_client: AsyncCloudflare) -> None:
+ web_crawler = await async_client.radar.bots.web_crawlers.summary(
+ dimension="USER_AGENT",
+ )
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ web_crawler = await async_client.radar.bots.web_crawlers.summary(
+ dimension="USER_AGENT",
+ bot_operator=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ name=["main_series"],
+ )
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.web_crawlers.with_raw_response.summary(
+ dimension="USER_AGENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_crawler = await response.parse()
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.web_crawlers.with_streaming_response.summary(
+ dimension="USER_AGENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_crawler = await response.parse()
+ assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups(
+ dimension="USER_AGENT",
+ )
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups(
+ dimension="USER_AGENT",
+ agg_interval="1h",
+ bot_operator=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ name=["main_series"],
+ )
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.web_crawlers.with_raw_response.timeseries_groups(
+ dimension="USER_AGENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_crawler = await response.parse()
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups(
+ dimension="USER_AGENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_crawler = await response.parse()
+ assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/radar/dns/test_summary.py b/tests/api_resources/radar/dns/test_summary.py
index 33f17227c95..38000e34bec 100644
--- a/tests/api_resources/radar/dns/test_summary.py
+++ b/tests/api_resources/radar/dns/test_summary.py
@@ -470,7 +470,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/dns/test_timeseries_groups.py b/tests/api_resources/radar/dns/test_timeseries_groups.py
index 4e8475c2340..56cf538cbae 100644
--- a/tests/api_resources/radar/dns/test_timeseries_groups.py
+++ b/tests/api_resources/radar/dns/test_timeseries_groups.py
@@ -480,7 +480,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/dns/test_top.py b/tests/api_resources/radar/dns/test_top.py
index 6d6eb3b42b4..91998856274 100644
--- a/tests/api_resources/radar/dns/test_top.py
+++ b/tests/api_resources/radar/dns/test_top.py
@@ -102,7 +102,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_ases(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/routing/test_summary.py b/tests/api_resources/radar/email/routing/test_summary.py
index 64bbf2de1d2..5d8a9f81409 100644
--- a/tests/api_resources/radar/email/routing/test_summary.py
+++ b/tests/api_resources/radar/email/routing/test_summary.py
@@ -273,7 +273,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_arc(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/routing/test_timeseries_groups.py b/tests/api_resources/radar/email/routing/test_timeseries_groups.py
index 338ae22cd84..e2f211a97df 100644
--- a/tests/api_resources/radar/email/routing/test_timeseries_groups.py
+++ b/tests/api_resources/radar/email/routing/test_timeseries_groups.py
@@ -279,7 +279,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_arc(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/test_summary.py b/tests/api_resources/radar/email/security/test_summary.py
index 51820e1bd4e..05d733875f4 100644
--- a/tests/api_resources/radar/email/security/test_summary.py
+++ b/tests/api_resources/radar/email/security/test_summary.py
@@ -394,7 +394,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_arc(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/test_timeseries_groups.py b/tests/api_resources/radar/email/security/test_timeseries_groups.py
index 59dfb88fc3a..c7ea6db44ee 100644
--- a/tests/api_resources/radar/email/security/test_timeseries_groups.py
+++ b/tests/api_resources/radar/email/security/test_timeseries_groups.py
@@ -403,7 +403,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_arc(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/top/test_tlds.py b/tests/api_resources/radar/email/security/top/test_tlds.py
index 0633c38550e..b4a4c9d5e51 100644
--- a/tests/api_resources/radar/email/security/top/test_tlds.py
+++ b/tests/api_resources/radar/email/security/top/test_tlds.py
@@ -63,7 +63,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncTlds:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py
index 79ca8b49bbe..93e3b437867 100644
--- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py
+++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py
@@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncMalicious:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py
index 2e561af84f9..8a7d5759e5b 100644
--- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py
+++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py
@@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncSpam:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py
index c06d638af23..67e3482f7e9 100644
--- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py
+++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py
@@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncSpoof:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py
index 25c5d7f322b..ad48799698b 100644
--- a/tests/api_resources/radar/entities/test_asns.py
+++ b/tests/api_resources/radar/entities/test_asns.py
@@ -179,7 +179,9 @@ def test_streaming_response_rel(self, client: Cloudflare) -> None:
class TestAsyncASNs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py
index b7fedeea1e4..0e3102f36c1 100644
--- a/tests/api_resources/radar/entities/test_locations.py
+++ b/tests/api_resources/radar/entities/test_locations.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py
index 98df2ef1124..61f93190dc4 100644
--- a/tests/api_resources/radar/http/ases/test_bot_class.py
+++ b/tests/api_resources/radar/http/ases/test_bot_class.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncBotClass:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py
index ec95ad11eb3..51f7c3821c5 100644
--- a/tests/api_resources/radar/http/ases/test_browser_family.py
+++ b/tests/api_resources/radar/http/ases/test_browser_family.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncBrowserFamily:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py
index 16f5159f28e..93ea5f0ac2a 100644
--- a/tests/api_resources/radar/http/ases/test_device_type.py
+++ b/tests/api_resources/radar/http/ases/test_device_type.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncDeviceType:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py
index e78240f48d0..c463291a9c6 100644
--- a/tests/api_resources/radar/http/ases/test_http_method.py
+++ b/tests/api_resources/radar/http/ases/test_http_method.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncHTTPMethod:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py
index ed93997533f..7b20e3f6fd5 100644
--- a/tests/api_resources/radar/http/ases/test_http_protocol.py
+++ b/tests/api_resources/radar/http/ases/test_http_protocol.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncHTTPProtocol:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py
index 6852e542ea2..51d29528bcf 100644
--- a/tests/api_resources/radar/http/ases/test_ip_version.py
+++ b/tests/api_resources/radar/http/ases/test_ip_version.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncIPVersion:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py
index 6504480d77e..7bdb87ae5e9 100644
--- a/tests/api_resources/radar/http/ases/test_os.py
+++ b/tests/api_resources/radar/http/ases/test_os.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncOS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py
index bbd6d24f88d..6e70af951a4 100644
--- a/tests/api_resources/radar/http/ases/test_tls_version.py
+++ b/tests/api_resources/radar/http/ases/test_tls_version.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncTLSVersion:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py
index 6dc83153fd2..b798c51d092 100644
--- a/tests/api_resources/radar/http/locations/test_bot_class.py
+++ b/tests/api_resources/radar/http/locations/test_bot_class.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncBotClass:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py
index 4f1d0335857..77dc9030920 100644
--- a/tests/api_resources/radar/http/locations/test_browser_family.py
+++ b/tests/api_resources/radar/http/locations/test_browser_family.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncBrowserFamily:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py
index 7d5e60d4bb5..f3716bf62a5 100644
--- a/tests/api_resources/radar/http/locations/test_device_type.py
+++ b/tests/api_resources/radar/http/locations/test_device_type.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncDeviceType:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py
index f38a1e462c2..f50613db2db 100644
--- a/tests/api_resources/radar/http/locations/test_http_method.py
+++ b/tests/api_resources/radar/http/locations/test_http_method.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncHTTPMethod:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py
index b72c48d133f..f0c76f621a8 100644
--- a/tests/api_resources/radar/http/locations/test_http_protocol.py
+++ b/tests/api_resources/radar/http/locations/test_http_protocol.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncHTTPProtocol:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py
index cccb9672906..07cd41a1e61 100644
--- a/tests/api_resources/radar/http/locations/test_ip_version.py
+++ b/tests/api_resources/radar/http/locations/test_ip_version.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncIPVersion:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py
index adda371838c..11e69bfc1d4 100644
--- a/tests/api_resources/radar/http/locations/test_os.py
+++ b/tests/api_resources/radar/http/locations/test_os.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncOS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py
index d44cf7872ee..3bcfe4bc5f8 100644
--- a/tests/api_resources/radar/http/locations/test_tls_version.py
+++ b/tests/api_resources/radar/http/locations/test_tls_version.py
@@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncTLSVersion:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/test_ases.py b/tests/api_resources/radar/http/test_ases.py
index 9413713558b..ca39e93f26c 100644
--- a/tests/api_resources/radar/http/test_ases.py
+++ b/tests/api_resources/radar/http/test_ases.py
@@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncAses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/test_locations.py b/tests/api_resources/radar/http/test_locations.py
index a4bd04bb8cd..7b5c37939b5 100644
--- a/tests/api_resources/radar/http/test_locations.py
+++ b/tests/api_resources/radar/http/test_locations.py
@@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/test_summary.py b/tests/api_resources/radar/http/test_summary.py
index 5340efc6361..ecc5266ebd0 100644
--- a/tests/api_resources/radar/http/test_summary.py
+++ b/tests/api_resources/radar/http/test_summary.py
@@ -398,7 +398,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py
index a6c02e58a2a..0fe58aff435 100644
--- a/tests/api_resources/radar/http/test_timeseries_groups.py
+++ b/tests/api_resources/radar/http/test_timeseries_groups.py
@@ -505,7 +505,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/http/test_top.py b/tests/api_resources/radar/http/test_top.py
index ebfce964cf3..573ebe4d676 100644
--- a/tests/api_resources/radar/http/test_top.py
+++ b/tests/api_resources/radar/http/test_top.py
@@ -118,7 +118,9 @@ def test_streaming_response_browser_family(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_browser(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/leaked_credentials/test_summary.py b/tests/api_resources/radar/leaked_credentials/test_summary.py
index 7e877b54281..243ea3d92cb 100644
--- a/tests/api_resources/radar/leaked_credentials/test_summary.py
+++ b/tests/api_resources/radar/leaked_credentials/test_summary.py
@@ -97,7 +97,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py
index a9027283c8e..723333f641e 100644
--- a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py
+++ b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py
@@ -99,7 +99,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None:
class TestAsyncTimeseriesGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/netflows/test_top.py b/tests/api_resources/radar/netflows/test_top.py
index 9dc8315bdcb..c4256286fe9 100644
--- a/tests/api_resources/radar/netflows/test_top.py
+++ b/tests/api_resources/radar/netflows/test_top.py
@@ -100,7 +100,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_ases(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/quality/speed/test_top.py b/tests/api_resources/radar/quality/speed/test_top.py
index 5e8c6d353f7..32f88ff2f33 100644
--- a/tests/api_resources/radar/quality/speed/test_top.py
+++ b/tests/api_resources/radar/quality/speed/test_top.py
@@ -103,7 +103,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_ases(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/quality/test_iqi.py b/tests/api_resources/radar/quality/test_iqi.py
index 40084c8bff3..3d337273df4 100644
--- a/tests/api_resources/radar/quality/test_iqi.py
+++ b/tests/api_resources/radar/quality/test_iqi.py
@@ -117,7 +117,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None:
class TestAsyncIQI:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_summary(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/quality/test_speed.py b/tests/api_resources/radar/quality/test_speed.py
index 235910fd4e7..73ae0a7e430 100644
--- a/tests/api_resources/radar/quality/test_speed.py
+++ b/tests/api_resources/radar/quality/test_speed.py
@@ -99,7 +99,9 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None:
class TestAsyncSpeed:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_histogram(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py
index 553229c8e89..79accf46b76 100644
--- a/tests/api_resources/radar/ranking/test_domain.py
+++ b/tests/api_resources/radar/ranking/test_domain.py
@@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomain:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/ranking/test_internet_services.py b/tests/api_resources/radar/ranking/test_internet_services.py
index 77fbb715bb4..4e510fcecf8 100644
--- a/tests/api_resources/radar/ranking/test_internet_services.py
+++ b/tests/api_resources/radar/ranking/test_internet_services.py
@@ -133,7 +133,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None:
class TestAsyncInternetServices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_categories(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/robots_txt/test_top.py b/tests/api_resources/radar/robots_txt/test_top.py
index e0cc7628659..5d14405e273 100644
--- a/tests/api_resources/radar/robots_txt/test_top.py
+++ b/tests/api_resources/radar/robots_txt/test_top.py
@@ -56,7 +56,9 @@ def test_streaming_response_domain_categories(self, client: Cloudflare) -> None:
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_domain_categories(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/robots_txt/top/test_user_agents.py b/tests/api_resources/radar/robots_txt/top/test_user_agents.py
index ac2435dba6d..989bf17da17 100644
--- a/tests/api_resources/radar/robots_txt/top/test_user_agents.py
+++ b/tests/api_resources/radar/robots_txt/top/test_user_agents.py
@@ -58,7 +58,9 @@ def test_streaming_response_directive(self, client: Cloudflare) -> None:
class TestAsyncUserAgents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_directive(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_annotations.py b/tests/api_resources/radar/test_annotations.py
index 03a7ee5c795..84f528b38ba 100644
--- a/tests/api_resources/radar/test_annotations.py
+++ b/tests/api_resources/radar/test_annotations.py
@@ -59,7 +59,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncAnnotations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_as112.py b/tests/api_resources/radar/test_as112.py
index 98525d4fe89..6b01e5d588f 100644
--- a/tests/api_resources/radar/test_as112.py
+++ b/tests/api_resources/radar/test_as112.py
@@ -62,7 +62,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncAS112:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py
index 4888918b441..62a7dc325f8 100644
--- a/tests/api_resources/radar/test_bgp.py
+++ b/tests/api_resources/radar/test_bgp.py
@@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncBGP:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_bots.py b/tests/api_resources/radar/test_bots.py
new file mode 100644
index 00000000000..dfddc19bd0b
--- /dev/null
+++ b/tests/api_resources/radar/test_bots.py
@@ -0,0 +1,491 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare._utils import parse_datetime
+from cloudflare.types.radar import (
+ BotGetResponse,
+ BotListResponse,
+ BotSummaryResponse,
+ BotTimeseriesResponse,
+ BotTimeseriesGroupsResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestBots:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.list()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.list(
+ bot_category="SEARCH_ENGINE_CRAWLER",
+ bot_operator="botOperator",
+ bot_verification_status="VERIFIED",
+ format="JSON",
+ limit=5,
+ offset=0,
+ )
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.radar.bots.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = response.parse()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.radar.bots.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = response.parse()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.get(
+ bot_slug="gptbot",
+ )
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.get(
+ bot_slug="gptbot",
+ format="JSON",
+ )
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.radar.bots.with_raw_response.get(
+ bot_slug="gptbot",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = response.parse()
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.radar.bots.with_streaming_response.get(
+ bot_slug="gptbot",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = response.parse()
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_get(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"):
+ client.radar.bots.with_raw_response.get(
+ bot_slug="",
+ )
+
+ @parametrize
+ def test_method_summary(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.summary(
+ dimension="BOT",
+ )
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.summary(
+ dimension="BOT",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ def test_raw_response_summary(self, client: Cloudflare) -> None:
+ response = client.radar.bots.with_raw_response.summary(
+ dimension="BOT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = response.parse()
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_summary(self, client: Cloudflare) -> None:
+ with client.radar.bots.with_streaming_response.summary(
+ dimension="BOT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = response.parse()
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_timeseries(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.timeseries()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.timeseries(
+ agg_interval="1h",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ def test_raw_response_timeseries(self, client: Cloudflare) -> None:
+ response = client.radar.bots.with_raw_response.timeseries()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = response.parse()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
+ with client.radar.bots.with_streaming_response.timeseries() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = response.parse()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_timeseries_groups(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.timeseries_groups(
+ dimension="BOT",
+ )
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None:
+ bot = client.radar.bots.timeseries_groups(
+ dimension="BOT",
+ agg_interval="1h",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None:
+ response = client.radar.bots.with_raw_response.timeseries_groups(
+ dimension="BOT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = response.parse()
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None:
+ with client.radar.bots.with_streaming_response.timeseries_groups(
+ dimension="BOT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = response.parse()
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncBots:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.list()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.list(
+ bot_category="SEARCH_ENGINE_CRAWLER",
+ bot_operator="botOperator",
+ bot_verification_status="VERIFIED",
+ format="JSON",
+ limit=5,
+ offset=0,
+ )
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = await response.parse()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = await response.parse()
+ assert_matches_type(BotListResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.get(
+ bot_slug="gptbot",
+ )
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.get(
+ bot_slug="gptbot",
+ format="JSON",
+ )
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.with_raw_response.get(
+ bot_slug="gptbot",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = await response.parse()
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.with_streaming_response.get(
+ bot_slug="gptbot",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = await response.parse()
+ assert_matches_type(BotGetResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"):
+ await async_client.radar.bots.with_raw_response.get(
+ bot_slug="",
+ )
+
+ @parametrize
+ async def test_method_summary(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.summary(
+ dimension="BOT",
+ )
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.summary(
+ dimension="BOT",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.with_raw_response.summary(
+ dimension="BOT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = await response.parse()
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.with_streaming_response.summary(
+ dimension="BOT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = await response.parse()
+ assert_matches_type(BotSummaryResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.timeseries()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.timeseries(
+ agg_interval="1h",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.with_raw_response.timeseries()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = await response.parse()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.with_streaming_response.timeseries() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = await response.parse()
+ assert_matches_type(BotTimeseriesResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.timeseries_groups(
+ dimension="BOT",
+ )
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ bot = await async_client.radar.bots.timeseries_groups(
+ dimension="BOT",
+ agg_interval="1h",
+ asn=["string"],
+ bot=["string"],
+ bot_category=["SEARCH_ENGINE_CRAWLER"],
+ bot_operator=["string"],
+ bot_verification_status=["VERIFIED"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit_per_group=10,
+ location=["string"],
+ name=["main_series"],
+ )
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.radar.bots.with_raw_response.timeseries_groups(
+ dimension="BOT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bot = await response.parse()
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.radar.bots.with_streaming_response.timeseries_groups(
+ dimension="BOT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bot = await response.parse()
+ assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/radar/test_datasets.py b/tests/api_resources/radar/test_datasets.py
index e9e8d057314..fbb7e5b4b7a 100644
--- a/tests/api_resources/radar/test_datasets.py
+++ b/tests/api_resources/radar/test_datasets.py
@@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDatasets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_dns.py b/tests/api_resources/radar/test_dns.py
index 0f507565f30..2bbcc22b504 100644
--- a/tests/api_resources/radar/test_dns.py
+++ b/tests/api_resources/radar/test_dns.py
@@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncDNS:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_entities.py b/tests/api_resources/radar/test_entities.py
index a9a5a170bf0..9c3d1f16731 100644
--- a/tests/api_resources/radar/test_entities.py
+++ b/tests/api_resources/radar/test_entities.py
@@ -58,7 +58,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncEntities:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_http.py b/tests/api_resources/radar/test_http.py
index 7187de25759..6f6730baacc 100644
--- a/tests/api_resources/radar/test_http.py
+++ b/tests/api_resources/radar/test_http.py
@@ -69,7 +69,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncHTTP:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_netflows.py b/tests/api_resources/radar/test_netflows.py
index 66ccf93f556..73d50ce90ad 100644
--- a/tests/api_resources/radar/test_netflows.py
+++ b/tests/api_resources/radar/test_netflows.py
@@ -104,7 +104,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None:
class TestAsyncNetflows:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_summary(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py
index 9ea16b2ce33..727d90a1879 100644
--- a/tests/api_resources/radar/test_ranking.py
+++ b/tests/api_resources/radar/test_ranking.py
@@ -102,7 +102,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None:
class TestAsyncRanking:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_search.py b/tests/api_resources/radar/test_search.py
index a0d51854976..2e313ae7af0 100644
--- a/tests/api_resources/radar/test_search.py
+++ b/tests/api_resources/radar/test_search.py
@@ -62,7 +62,9 @@ def test_streaming_response_global(self, client: Cloudflare) -> None:
class TestAsyncSearch:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_global(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_tcp_resets_timeouts.py b/tests/api_resources/radar/test_tcp_resets_timeouts.py
index ad009f54168..3ea655e3b91 100644
--- a/tests/api_resources/radar/test_tcp_resets_timeouts.py
+++ b/tests/api_resources/radar/test_tcp_resets_timeouts.py
@@ -102,7 +102,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None:
class TestAsyncTCPResetsTimeouts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_summary(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/test_traffic_anomalies.py b/tests/api_resources/radar/test_traffic_anomalies.py
index 7e92c76fe39..34ff87eb8bb 100644
--- a/tests/api_resources/radar/test_traffic_anomalies.py
+++ b/tests/api_resources/radar/test_traffic_anomalies.py
@@ -60,7 +60,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncTrafficAnomalies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/traffic_anomalies/test_locations.py b/tests/api_resources/radar/traffic_anomalies/test_locations.py
index 005738ac3e2..cb56dcdd238 100644
--- a/tests/api_resources/radar/traffic_anomalies/test_locations.py
+++ b/tests/api_resources/radar/traffic_anomalies/test_locations.py
@@ -57,7 +57,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py
index 888fe79936c..2a1576beb5a 100644
--- a/tests/api_resources/radar/verified_bots/test_top.py
+++ b/tests/api_resources/radar/verified_bots/test_top.py
@@ -15,6 +15,8 @@
TopCategoriesResponse,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -23,27 +25,32 @@ class TestTop:
@parametrize
def test_method_bots(self, client: Cloudflare) -> None:
- top = client.radar.verified_bots.top.bots()
+ with pytest.warns(DeprecationWarning):
+ top = client.radar.verified_bots.top.bots()
+
assert_matches_type(TopBotsResponse, top, path=["response"])
@parametrize
def test_method_bots_with_all_params(self, client: Cloudflare) -> None:
- top = client.radar.verified_bots.top.bots(
- asn=["string"],
- continent=["string"],
- date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
- date_range=["7d"],
- date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
- format="JSON",
- limit=5,
- location=["string"],
- name=["main_series"],
- )
+ with pytest.warns(DeprecationWarning):
+ top = client.radar.verified_bots.top.bots(
+ asn=["string"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit=5,
+ location=["string"],
+ name=["main_series"],
+ )
+
assert_matches_type(TopBotsResponse, top, path=["response"])
@parametrize
def test_raw_response_bots(self, client: Cloudflare) -> None:
- response = client.radar.verified_bots.top.with_raw_response.bots()
+ with pytest.warns(DeprecationWarning):
+ response = client.radar.verified_bots.top.with_raw_response.bots()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -52,38 +59,44 @@ def test_raw_response_bots(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_bots(self, client: Cloudflare) -> None:
- with client.radar.verified_bots.top.with_streaming_response.bots() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.radar.verified_bots.top.with_streaming_response.bots() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- top = response.parse()
- assert_matches_type(TopBotsResponse, top, path=["response"])
+ top = response.parse()
+ assert_matches_type(TopBotsResponse, top, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_categories(self, client: Cloudflare) -> None:
- top = client.radar.verified_bots.top.categories()
+ with pytest.warns(DeprecationWarning):
+ top = client.radar.verified_bots.top.categories()
+
assert_matches_type(TopCategoriesResponse, top, path=["response"])
@parametrize
def test_method_categories_with_all_params(self, client: Cloudflare) -> None:
- top = client.radar.verified_bots.top.categories(
- asn=["string"],
- continent=["string"],
- date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
- date_range=["7d"],
- date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
- format="JSON",
- limit=5,
- location=["string"],
- name=["main_series"],
- )
+ with pytest.warns(DeprecationWarning):
+ top = client.radar.verified_bots.top.categories(
+ asn=["string"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit=5,
+ location=["string"],
+ name=["main_series"],
+ )
+
assert_matches_type(TopCategoriesResponse, top, path=["response"])
@parametrize
def test_raw_response_categories(self, client: Cloudflare) -> None:
- response = client.radar.verified_bots.top.with_raw_response.categories()
+ with pytest.warns(DeprecationWarning):
+ response = client.radar.verified_bots.top.with_raw_response.categories()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -92,42 +105,50 @@ def test_raw_response_categories(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_categories(self, client: Cloudflare) -> None:
- with client.radar.verified_bots.top.with_streaming_response.categories() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.radar.verified_bots.top.with_streaming_response.categories() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- top = response.parse()
- assert_matches_type(TopCategoriesResponse, top, path=["response"])
+ top = response.parse()
+ assert_matches_type(TopCategoriesResponse, top, path=["response"])
assert cast(Any, response.is_closed) is True
class TestAsyncTop:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_bots(self, async_client: AsyncCloudflare) -> None:
- top = await async_client.radar.verified_bots.top.bots()
+ with pytest.warns(DeprecationWarning):
+ top = await async_client.radar.verified_bots.top.bots()
+
assert_matches_type(TopBotsResponse, top, path=["response"])
@parametrize
async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) -> None:
- top = await async_client.radar.verified_bots.top.bots(
- asn=["string"],
- continent=["string"],
- date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
- date_range=["7d"],
- date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
- format="JSON",
- limit=5,
- location=["string"],
- name=["main_series"],
- )
+ with pytest.warns(DeprecationWarning):
+ top = await async_client.radar.verified_bots.top.bots(
+ asn=["string"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit=5,
+ location=["string"],
+ name=["main_series"],
+ )
+
assert_matches_type(TopBotsResponse, top, path=["response"])
@parametrize
async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.radar.verified_bots.top.with_raw_response.bots()
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.radar.verified_bots.top.with_raw_response.bots()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -136,38 +157,44 @@ async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_bots(self, async_client: AsyncCloudflare) -> None:
- async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- top = await response.parse()
- assert_matches_type(TopBotsResponse, top, path=["response"])
+ top = await response.parse()
+ assert_matches_type(TopBotsResponse, top, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_categories(self, async_client: AsyncCloudflare) -> None:
- top = await async_client.radar.verified_bots.top.categories()
+ with pytest.warns(DeprecationWarning):
+ top = await async_client.radar.verified_bots.top.categories()
+
assert_matches_type(TopCategoriesResponse, top, path=["response"])
@parametrize
async def test_method_categories_with_all_params(self, async_client: AsyncCloudflare) -> None:
- top = await async_client.radar.verified_bots.top.categories(
- asn=["string"],
- continent=["string"],
- date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
- date_range=["7d"],
- date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
- format="JSON",
- limit=5,
- location=["string"],
- name=["main_series"],
- )
+ with pytest.warns(DeprecationWarning):
+ top = await async_client.radar.verified_bots.top.categories(
+ asn=["string"],
+ continent=["string"],
+ date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ date_range=["7d"],
+ date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
+ format="JSON",
+ limit=5,
+ location=["string"],
+ name=["main_series"],
+ )
+
assert_matches_type(TopCategoriesResponse, top, path=["response"])
@parametrize
async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.radar.verified_bots.top.with_raw_response.categories()
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.radar.verified_bots.top.with_raw_response.categories()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -176,11 +203,12 @@ async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_streaming_response_categories(self, async_client: AsyncCloudflare) -> None:
- async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- top = await response.parse()
- assert_matches_type(TopCategoriesResponse, top, path=["response"])
+ top = await response.parse()
+ assert_matches_type(TopCategoriesResponse, top, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py
index ebd7b48b403..672117b33bb 100644
--- a/tests/api_resources/registrar/test_domains.py
+++ b/tests/api_resources/registrar/test_domains.py
@@ -165,7 +165,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py
index 92147ae93ba..73c32b2424d 100644
--- a/tests/api_resources/request_tracers/test_traces.py
+++ b/tests/api_resources/request_tracers/test_traces.py
@@ -106,7 +106,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncTraces:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/resource_sharing/test_recipients.py b/tests/api_resources/resource_sharing/test_recipients.py
index 4da13a844a5..48922ac03ca 100644
--- a/tests/api_resources/resource_sharing/test_recipients.py
+++ b/tests/api_resources/resource_sharing/test_recipients.py
@@ -261,7 +261,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRecipients:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/resource_sharing/test_resources.py b/tests/api_resources/resource_sharing/test_resources.py
index 967e5dcbfca..36adaec0d62 100644
--- a/tests/api_resources/resource_sharing/test_resources.py
+++ b/tests/api_resources/resource_sharing/test_resources.py
@@ -340,7 +340,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncResources:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py
index da64194e2e9..da56522a4bf 100644
--- a/tests/api_resources/rules/lists/test_bulk_operations.py
+++ b/tests/api_resources/rules/lists/test_bulk_operations.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBulkOperations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py
index 91e4dc0c2f5..28eaef209ed 100644
--- a/tests/api_resources/rules/lists/test_items.py
+++ b/tests/api_resources/rules/lists/test_items.py
@@ -9,9 +9,8 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
+from cloudflare.pagination import SyncCursorPagination, AsyncCursorPagination
from cloudflare.types.rules.lists import (
- ItemGetResponse,
- ItemListResponse,
ItemCreateResponse,
ItemDeleteResponse,
ItemUpdateResponse,
@@ -28,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None:
item = client.rules.lists.items.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert_matches_type(ItemCreateResponse, item, path=["response"])
@@ -37,7 +36,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.rules.lists.items.with_raw_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert response.is_closed is True
@@ -50,7 +49,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.rules.lists.items.with_streaming_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -66,14 +65,14 @@ def test_path_params_create(self, client: Cloudflare) -> None:
client.rules.lists.items.with_raw_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
client.rules.lists.items.with_raw_response.create(
list_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
@parametrize
@@ -81,7 +80,7 @@ def test_method_update(self, client: Cloudflare) -> None:
item = client.rules.lists.items.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert_matches_type(ItemUpdateResponse, item, path=["response"])
@@ -90,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.rules.lists.items.with_raw_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert response.is_closed is True
@@ -103,7 +102,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.rules.lists.items.with_streaming_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -119,14 +118,14 @@ def test_path_params_update(self, client: Cloudflare) -> None:
client.rules.lists.items.with_raw_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
client.rules.lists.items.with_raw_response.update(
list_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
@parametrize
@@ -135,7 +134,7 @@ def test_method_list(self, client: Cloudflare) -> None:
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(SyncCursorPagination[object], item, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
@@ -146,7 +145,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
per_page=1,
search="1.1.1.",
)
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(SyncCursorPagination[object], item, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -158,7 +157,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(SyncCursorPagination[object], item, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
@@ -170,7 +169,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(SyncCursorPagination[object], item, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -196,6 +195,15 @@ def test_method_delete(self, client: Cloudflare) -> None:
)
assert_matches_type(ItemDeleteResponse, item, path=["response"])
+ @parametrize
+ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
+ item = client.rules.lists.items.delete(
+ list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ items=[{}],
+ )
+ assert_matches_type(ItemDeleteResponse, item, path=["response"])
+
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.rules.lists.items.with_raw_response.delete(
@@ -243,7 +251,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
)
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -256,7 +264,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -269,7 +277,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -298,14 +306,16 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncItems:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
item = await async_client.rules.lists.items.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert_matches_type(ItemCreateResponse, item, path=["response"])
@@ -314,7 +324,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.rules.lists.items.with_raw_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert response.is_closed is True
@@ -327,7 +337,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
async with async_client.rules.lists.items.with_streaming_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -343,14 +353,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
await async_client.rules.lists.items.with_raw_response.create(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
await async_client.rules.lists.items.with_raw_response.create(
list_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
@parametrize
@@ -358,7 +368,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
item = await async_client.rules.lists.items.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert_matches_type(ItemUpdateResponse, item, path=["response"])
@@ -367,7 +377,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.rules.lists.items.with_raw_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
assert response.is_closed is True
@@ -380,7 +390,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
async with async_client.rules.lists.items.with_streaming_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -396,14 +406,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
await async_client.rules.lists.items.with_raw_response.update(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
await async_client.rules.lists.items.with_raw_response.update(
list_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- body=[{}],
+ body=[{"ip": "10.0.0.1"}],
)
@parametrize
@@ -412,7 +422,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(AsyncCursorPagination[object], item, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -423,7 +433,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
per_page=1,
search="1.1.1.",
)
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(AsyncCursorPagination[object], item, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -435,7 +445,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(AsyncCursorPagination[object], item, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -447,7 +457,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(ItemListResponse, item, path=["response"])
+ assert_matches_type(AsyncCursorPagination[object], item, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -473,6 +483,15 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(ItemDeleteResponse, item, path=["response"])
+ @parametrize
+ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ item = await async_client.rules.lists.items.delete(
+ list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ items=[{}],
+ )
+ assert_matches_type(ItemDeleteResponse, item, path=["response"])
+
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.rules.lists.items.with_raw_response.delete(
@@ -520,7 +539,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
)
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -533,7 +552,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -546,7 +565,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(ItemGetResponse, item, path=["response"])
+ assert_matches_type(object, item, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py
index c08bd6dac16..df909befdc9 100644
--- a/tests/api_resources/rules/test_lists.py
+++ b/tests/api_resources/rules/test_lists.py
@@ -9,9 +9,10 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
+from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.rules import (
+ ListsList,
ListGetResponse,
- ListListResponse,
ListCreateResponse,
ListDeleteResponse,
ListUpdateResponse,
@@ -151,7 +152,7 @@ def test_method_list(self, client: Cloudflare) -> None:
list_ = client.rules.lists.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -162,7 +163,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
list_ = response.parse()
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
@@ -173,7 +174,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
list_ = response.parse()
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -286,7 +287,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLists:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -416,7 +419,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
list_ = await async_client.rules.lists.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -427,7 +430,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
list_ = await response.parse()
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -438,7 +441,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
list_ = await response.parse()
- assert_matches_type(ListListResponse, list_, path=["response"])
+ assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py
index 6b0858b12c5..002f11ccc12 100644
--- a/tests/api_resources/rulesets/phases/test_versions.py
+++ b/tests/api_resources/rulesets/phases/test_versions.py
@@ -155,7 +155,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVersions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py
index 4a4de40bd3e..612a2ecec3f 100644
--- a/tests/api_resources/rulesets/test_phases.py
+++ b/tests/api_resources/rulesets/test_phases.py
@@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPhases:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py
index d37e672d13d..3187d76d509 100644
--- a/tests/api_resources/rulesets/test_rules.py
+++ b/tests/api_resources/rulesets/test_rules.py
@@ -1294,6 +1294,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) ->
id="3a03d665bac047339bb530ecb439a90d",
action="skip",
action_parameters={
+ "phase": "current",
"phases": ["http_request_firewall_custom"],
"products": ["bic"],
"rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]},
@@ -3340,6 +3341,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No
id="3a03d665bac047339bb530ecb439a90d",
action="skip",
action_parameters={
+ "phase": "current",
"phases": ["http_request_firewall_custom"],
"products": ["bic"],
"rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]},
@@ -3918,7 +3920,9 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -5193,6 +5197,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy
id="3a03d665bac047339bb530ecb439a90d",
action="skip",
action_parameters={
+ "phase": "current",
"phases": ["http_request_firewall_custom"],
"products": ["bic"],
"rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]},
@@ -7239,6 +7244,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async
id="3a03d665bac047339bb530ecb439a90d",
action="skip",
action_parameters={
+ "phase": "current",
"phases": ["http_request_firewall_custom"],
"products": ["bic"],
"rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]},
diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py
index 620e4992e4d..21b8ef98db7 100644
--- a/tests/api_resources/rulesets/test_versions.py
+++ b/tests/api_resources/rulesets/test_versions.py
@@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVersions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py
index 5ab034386be..6f8dce9a875 100644
--- a/tests/api_resources/rum/test_rules.py
+++ b/tests/api_resources/rum/test_rules.py
@@ -331,7 +331,9 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py
index 0762f7dfd57..279dc7b73dd 100644
--- a/tests/api_resources/rum/test_site_info.py
+++ b/tests/api_resources/rum/test_site_info.py
@@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSiteInfo:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/schema_validation/settings/test_operations.py b/tests/api_resources/schema_validation/settings/test_operations.py
index f6852ed6e79..6e05e58155a 100644
--- a/tests/api_resources/schema_validation/settings/test_operations.py
+++ b/tests/api_resources/schema_validation/settings/test_operations.py
@@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOperations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/schema_validation/test_schemas.py b/tests/api_resources/schema_validation/test_schemas.py
index 14b2e9dcc9b..057c751492b 100644
--- a/tests/api_resources/schema_validation/test_schemas.py
+++ b/tests/api_resources/schema_validation/test_schemas.py
@@ -291,7 +291,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSchemas:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/schema_validation/test_settings.py b/tests/api_resources/schema_validation/test_settings.py
index 103f160ac31..68752e94f3d 100644
--- a/tests/api_resources/schema_validation/test_settings.py
+++ b/tests/api_resources/schema_validation/test_settings.py
@@ -159,7 +159,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/secrets_store/stores/test_secrets.py b/tests/api_resources/secrets_store/stores/test_secrets.py
index 21904623076..4a1fb250b27 100644
--- a/tests/api_resources/secrets_store/stores/test_secrets.py
+++ b/tests/api_resources/secrets_store/stores/test_secrets.py
@@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -49,7 +49,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -103,12 +103,13 @@ def test_path_params_create(self, client: Cloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
)
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
secret = client.secrets_store.stores.secrets.list(
@@ -117,6 +118,7 @@ def test_method_list(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
secret = client.secrets_store.stores.secrets.list(
@@ -126,10 +128,12 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
order="name",
page=2,
per_page=20,
+ scopes=[["workers", "ai_gateway"]],
search="search",
)
assert_matches_type(SyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
response = client.secrets_store.stores.secrets.with_raw_response.list(
@@ -142,6 +146,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
secret = response.parse()
assert_matches_type(SyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
with client.secrets_store.stores.secrets.with_streaming_response.list(
@@ -156,6 +161,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -286,6 +292,20 @@ def test_method_duplicate(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
+ )
+ assert_matches_type(Optional[SecretDuplicateResponse], secret, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
+ @parametrize
+ def test_method_duplicate_with_all_params(self, client: Cloudflare) -> None:
+ secret = client.secrets_store.stores.secrets.duplicate(
+ secret_id="3fd85f74b32742f1bff64a85009dda07",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
+ comment="info about my secret",
)
assert_matches_type(Optional[SecretDuplicateResponse], secret, path=["response"])
@@ -297,6 +317,7 @@ def test_raw_response_duplicate(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
assert response.is_closed is True
@@ -312,6 +333,7 @@ def test_streaming_response_duplicate(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -330,6 +352,7 @@ def test_path_params_duplicate(self, client: Cloudflare) -> None:
account_id="",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
@@ -338,6 +361,7 @@ def test_path_params_duplicate(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `secret_id` but received ''"):
@@ -346,37 +370,38 @@ def test_path_params_duplicate(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
secret = client.secrets_store.stores.secrets.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
secret = client.secrets_store.stores.secrets.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
- scopes=["workers"],
- value="api-token-secret-123",
+ comment="info about my secret",
+ scopes=["workers", "ai_gateway"],
)
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.secrets_store.stores.secrets.with_raw_response.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
assert response.is_closed is True
@@ -384,13 +409,13 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
secret = response.parse()
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.secrets_store.stores.secrets.with_streaming_response.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -400,6 +425,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
def test_path_params_edit(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -407,7 +433,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
@@ -415,7 +440,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="",
- name="MY_API_KEY",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `secret_id` but received ''"):
@@ -423,7 +447,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
secret_id="",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
@parametrize
@@ -488,7 +511,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSecrets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -498,7 +523,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -513,7 +538,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -532,7 +557,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -554,7 +579,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
@@ -567,12 +592,13 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
body=[
{
"name": "MY_API_KEY",
- "scopes": ["workers"],
+ "scopes": ["workers", "ai_gateway"],
"value": "api-token-secret-123",
}
],
)
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
secret = await async_client.secrets_store.stores.secrets.list(
@@ -581,6 +607,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(AsyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
secret = await async_client.secrets_store.stores.secrets.list(
@@ -590,10 +617,12 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
order="name",
page=2,
per_page=20,
+ scopes=[["workers", "ai_gateway"]],
search="search",
)
assert_matches_type(AsyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
response = await async_client.secrets_store.stores.secrets.with_raw_response.list(
@@ -606,6 +635,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
secret = await response.parse()
assert_matches_type(AsyncV4PagePaginationArray[SecretListResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
async with async_client.secrets_store.stores.secrets.with_streaming_response.list(
@@ -620,6 +650,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -750,6 +781,20 @@ async def test_method_duplicate(self, async_client: AsyncCloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
+ )
+ assert_matches_type(Optional[SecretDuplicateResponse], secret, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
+ @parametrize
+ async def test_method_duplicate_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ secret = await async_client.secrets_store.stores.secrets.duplicate(
+ secret_id="3fd85f74b32742f1bff64a85009dda07",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
+ comment="info about my secret",
)
assert_matches_type(Optional[SecretDuplicateResponse], secret, path=["response"])
@@ -761,6 +806,7 @@ async def test_raw_response_duplicate(self, async_client: AsyncCloudflare) -> No
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
assert response.is_closed is True
@@ -776,6 +822,7 @@ async def test_streaming_response_duplicate(self, async_client: AsyncCloudflare)
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -794,6 +841,7 @@ async def test_path_params_duplicate(self, async_client: AsyncCloudflare) -> Non
account_id="",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
@@ -802,6 +850,7 @@ async def test_path_params_duplicate(self, async_client: AsyncCloudflare) -> Non
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `secret_id` but received ''"):
@@ -810,37 +859,38 @@ async def test_path_params_duplicate(self, async_client: AsyncCloudflare) -> Non
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
name="MY_API_KEY",
+ scopes=["workers", "ai_gateway"],
)
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
secret = await async_client.secrets_store.stores.secrets.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
secret = await async_client.secrets_store.stores.secrets.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
- scopes=["workers"],
- value="api-token-secret-123",
+ comment="info about my secret",
+ scopes=["workers", "ai_gateway"],
)
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.secrets_store.stores.secrets.with_raw_response.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
assert response.is_closed is True
@@ -848,13 +898,13 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
secret = await response.parse()
assert_matches_type(Optional[SecretEditResponse], secret, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
async with async_client.secrets_store.stores.secrets.with_streaming_response.edit(
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -864,6 +914,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate prism error for 422 Unprocessable Entity")
@parametrize
async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -871,7 +922,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
@@ -879,7 +929,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
secret_id="3fd85f74b32742f1bff64a85009dda07",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="",
- name="MY_API_KEY",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `secret_id` but received ''"):
@@ -887,7 +936,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
secret_id="",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
store_id="023e105f4ecef8ad9ca31a8372d0c353",
- name="MY_API_KEY",
)
@parametrize
diff --git a/tests/api_resources/secrets_store/test_quota.py b/tests/api_resources/secrets_store/test_quota.py
index 90e87c12a44..d74f03ae049 100644
--- a/tests/api_resources/secrets_store/test_quota.py
+++ b/tests/api_resources/secrets_store/test_quota.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncQuota:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/secrets_store/test_stores.py b/tests/api_resources/secrets_store/test_stores.py
index 96211f2286b..68fb500fd5e 100644
--- a/tests/api_resources/secrets_store/test_stores.py
+++ b/tests/api_resources/secrets_store/test_stores.py
@@ -163,7 +163,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncStores:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/security_center/insights/test_class_.py b/tests/api_resources/security_center/insights/test_class_.py
index 3ec1f252d86..0609b2be126 100644
--- a/tests/api_resources/security_center/insights/test_class_.py
+++ b/tests/api_resources/security_center/insights/test_class_.py
@@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncClass:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken prism assertion")
@parametrize
diff --git a/tests/api_resources/security_center/insights/test_severity.py b/tests/api_resources/security_center/insights/test_severity.py
index ddc6e8dd62b..589dd72a083 100644
--- a/tests/api_resources/security_center/insights/test_severity.py
+++ b/tests/api_resources/security_center/insights/test_severity.py
@@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSeverity:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken prism assertion")
@parametrize
diff --git a/tests/api_resources/security_center/insights/test_type.py b/tests/api_resources/security_center/insights/test_type.py
index a2c3da3604c..e9ae172ed08 100644
--- a/tests/api_resources/security_center/insights/test_type.py
+++ b/tests/api_resources/security_center/insights/test_type.py
@@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncType:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken prism assertion")
@parametrize
diff --git a/tests/api_resources/security_center/test_insights.py b/tests/api_resources/security_center/test_insights.py
index c4776444b97..4c92fe945f9 100644
--- a/tests/api_resources/security_center/test_insights.py
+++ b/tests/api_resources/security_center/test_insights.py
@@ -159,7 +159,9 @@ def test_path_params_dismiss(self, client: Cloudflare) -> None:
class TestAsyncInsights:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken prism assertion")
@parametrize
diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py
index 371c111994b..a3d69547087 100644
--- a/tests/api_resources/snippets/test_content.py
+++ b/tests/api_resources/snippets/test_content.py
@@ -27,12 +27,12 @@ class TestContent:
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
content = client.snippets.content.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert content.is_closed
assert content.json() == {"foo": "bar"}
@@ -43,13 +43,13 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
content = client.snippets.content.with_raw_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert content.is_closed is True
@@ -61,12 +61,12 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
with client.snippets.content.with_streaming_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as content:
assert not content.is_closed
assert content.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -83,30 +83,32 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.snippets.content.with_raw_response.get(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
client.snippets.content.with_raw_response.get(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
class TestAsyncContent:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
content = await async_client.snippets.content.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert content.is_closed
assert await content.json() == {"foo": "bar"}
@@ -117,13 +119,13 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
content = await async_client.snippets.content.with_raw_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert content.is_closed is True
@@ -135,12 +137,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock:
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
- respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock(
+ respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock(
return_value=httpx.Response(200, json={"foo": "bar"})
)
async with async_client.snippets.content.with_streaming_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as content:
assert not content.is_closed
assert content.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -157,12 +159,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.snippets.content.with_raw_response.get(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
await async_client.snippets.content.with_raw_response.get(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py
index 53816f2070b..53da364b377 100644
--- a/tests/api_resources/snippets/test_rules.py
+++ b/tests/api_resources/snippets/test_rules.py
@@ -21,20 +21,11 @@ class TestRules:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
rule = client.snippets.rules.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(SyncSinglePage[RuleUpdateResponse], rule, path=["response"])
-
- @parametrize
- def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- rule = client.snippets.rules.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
rules=[
{
- "description": "Rule description",
- "enabled": True,
- "expression": 'http.cookie eq "a=b"',
- "snippet_name": "snippet_name_01",
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
}
],
)
@@ -43,7 +34,13 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.snippets.rules.with_raw_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
)
assert response.is_closed is True
@@ -54,7 +51,13 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.snippets.rules.with_streaming_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -69,19 +72,25 @@ def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.snippets.rules.with_raw_response.update(
zone_id="",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
)
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
rule = client.snippets.rules.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
response = client.snippets.rules.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
@@ -92,7 +101,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
with client.snippets.rules.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -112,31 +121,31 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
rule = client.snippets.rules.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.snippets.rules.with_raw_response.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"])
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.snippets.rules.with_streaming_response.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -149,25 +158,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.snippets.rules.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(AsyncSinglePage[RuleUpdateResponse], rule, path=["response"])
-
- @parametrize
- async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.snippets.rules.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
rules=[
{
- "description": "Rule description",
- "enabled": True,
- "expression": 'http.cookie eq "a=b"',
- "snippet_name": "snippet_name_01",
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
}
],
)
@@ -176,7 +178,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.rules.with_raw_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
)
assert response.is_closed is True
@@ -187,7 +195,13 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.rules.with_streaming_response.update(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -202,19 +216,25 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.snippets.rules.with_raw_response.update(
zone_id="",
+ rules=[
+ {
+ "expression": "ip.src eq 1.1.1.1",
+ "snippet_name": "my_snippet",
+ }
+ ],
)
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.snippets.rules.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.rules.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
@@ -225,7 +245,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.rules.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -245,31 +265,31 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.snippets.rules.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.rules.with_raw_response.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"])
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.rules.with_streaming_response.delete(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py
index 8d60f728d26..e5734e2287b 100644
--- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py
+++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCurrents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py
index bf5b7ef66b8..0699c930575 100644
--- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py
+++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py
@@ -76,7 +76,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBytimes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py
index ee8b78cd589..bf892c8df62 100644
--- a/tests/api_resources/spectrum/analytics/events/test_summaries.py
+++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py
@@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSummaries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py
index 1ed83c2f50f..27bdcdfcc59 100644
--- a/tests/api_resources/spectrum/test_apps.py
+++ b/tests/api_resources/spectrum/test_apps.py
@@ -524,7 +524,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncApps:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/speed/pages/test_tests.py b/tests/api_resources/speed/pages/test_tests.py
index a97a4b14f52..148d3b0c93d 100644
--- a/tests/api_resources/speed/pages/test_tests.py
+++ b/tests/api_resources/speed/pages/test_tests.py
@@ -256,7 +256,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/speed/test_availabilities.py b/tests/api_resources/speed/test_availabilities.py
index 59d87a22852..8f2e328affd 100644
--- a/tests/api_resources/speed/test_availabilities.py
+++ b/tests/api_resources/speed/test_availabilities.py
@@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAvailabilities:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py
index 611a73ec015..a14bcb31c8b 100644
--- a/tests/api_resources/speed/test_pages.py
+++ b/tests/api_resources/speed/test_pages.py
@@ -151,7 +151,9 @@ def test_path_params_trend(self, client: Cloudflare) -> None:
class TestAsyncPages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py
index e3e05e0ed53..96eab910c45 100644
--- a/tests/api_resources/speed/test_schedule.py
+++ b/tests/api_resources/speed/test_schedule.py
@@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSchedule:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ssl/certificate_packs/test_quota.py b/tests/api_resources/ssl/certificate_packs/test_quota.py
index 0181a4d9e7d..2c665c9237e 100644
--- a/tests/api_resources/ssl/certificate_packs/test_quota.py
+++ b/tests/api_resources/ssl/certificate_packs/test_quota.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncQuota:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ssl/test_analyze.py b/tests/api_resources/ssl/test_analyze.py
index 3a1e6c43744..cd0a9100b67 100644
--- a/tests/api_resources/ssl/test_analyze.py
+++ b/tests/api_resources/ssl/test_analyze.py
@@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncAnalyze:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py
index 6c118f8d63c..0ea985fb443 100644
--- a/tests/api_resources/ssl/test_certificate_packs.py
+++ b/tests/api_resources/ssl/test_certificate_packs.py
@@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCertificatePacks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ssl/test_recommendations.py b/tests/api_resources/ssl/test_recommendations.py
index 49520ba3738..972bf1c1ffc 100644
--- a/tests/api_resources/ssl/test_recommendations.py
+++ b/tests/api_resources/ssl/test_recommendations.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, Optional, cast
+from typing import Any, cast
import pytest
@@ -11,6 +11,8 @@
from tests.utils import assert_matches_type
from cloudflare.types.ssl import RecommendationGetResponse
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -19,80 +21,92 @@ class TestRecommendations:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- recommendation = client.ssl.recommendations.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ recommendation = client.ssl.recommendations.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.ssl.recommendations.with_raw_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.ssl.recommendations.with_raw_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
recommendation = response.parse()
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.ssl.recommendations.with_streaming_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.ssl.recommendations.with_streaming_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- recommendation = response.parse()
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ recommendation = response.parse()
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.ssl.recommendations.with_raw_response.get(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ client.ssl.recommendations.with_raw_response.get(
+ zone_id="",
+ )
class TestAsyncRecommendations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- recommendation = await async_client.ssl.recommendations.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ recommendation = await async_client.ssl.recommendations.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.ssl.recommendations.with_raw_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.ssl.recommendations.with_raw_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
recommendation = await response.parse()
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.ssl.recommendations.with_streaming_response.get(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.ssl.recommendations.with_streaming_response.get(
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- recommendation = await response.parse()
- assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"])
+ recommendation = await response.parse()
+ assert_matches_type(RecommendationGetResponse, recommendation, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.ssl.recommendations.with_raw_response.get(
- zone_id="",
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
+ await async_client.ssl.recommendations.with_raw_response.get(
+ zone_id="",
+ )
diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py
index 4d6460a428d..73b42e44599 100644
--- a/tests/api_resources/ssl/test_verification.py
+++ b/tests/api_resources/ssl/test_verification.py
@@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVerification:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/ssl/universal/test_settings.py b/tests/api_resources/ssl/universal/test_settings.py
index a6040dd1411..425b2528f38 100644
--- a/tests/api_resources/ssl/universal/test_settings.py
+++ b/tests/api_resources/ssl/universal/test_settings.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py
index c3e6421643b..e70b277d2e2 100644
--- a/tests/api_resources/stream/captions/language/test_vtt.py
+++ b/tests/api_resources/stream/captions/language/test_vtt.py
@@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVtt:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py
index 0fe61c3cb38..133fafb0f57 100644
--- a/tests/api_resources/stream/captions/test_language.py
+++ b/tests/api_resources/stream/captions/test_language.py
@@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLanguage:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py
index d1041731a3f..e4aeed86843 100644
--- a/tests/api_resources/stream/live_inputs/test_outputs.py
+++ b/tests/api_resources/stream/live_inputs/test_outputs.py
@@ -263,7 +263,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncOutputs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py
index bf7462cf829..243129a8296 100644
--- a/tests/api_resources/stream/test_audio_tracks.py
+++ b/tests/api_resources/stream/test_audio_tracks.py
@@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAudioTracks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py
index 89847fcdd1a..e39009815b6 100644
--- a/tests/api_resources/stream/test_captions.py
+++ b/tests/api_resources/stream/test_captions.py
@@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCaptions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_clip.py b/tests/api_resources/stream/test_clip.py
index c0806600820..7c6b2a2bf25 100644
--- a/tests/api_resources/stream/test_clip.py
+++ b/tests/api_resources/stream/test_clip.py
@@ -85,7 +85,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncClip:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_copy.py b/tests/api_resources/stream/test_copy.py
index c2d65c32f2e..da77578d882 100644
--- a/tests/api_resources/stream/test_copy.py
+++ b/tests/api_resources/stream/test_copy.py
@@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncCopy:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_direct_upload.py b/tests/api_resources/stream/test_direct_upload.py
index 54f9c3d0070..70474f551cb 100644
--- a/tests/api_resources/stream/test_direct_upload.py
+++ b/tests/api_resources/stream/test_direct_upload.py
@@ -79,7 +79,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncDirectUpload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py
index 59fdefe0eb2..242d4f3c211 100644
--- a/tests/api_resources/stream/test_downloads.py
+++ b/tests/api_resources/stream/test_downloads.py
@@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDownloads:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py
index 1019efe5e4c..4158863edde 100644
--- a/tests/api_resources/stream/test_embed.py
+++ b/tests/api_resources/stream/test_embed.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEmbed:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py
index fba7bbc8253..31b38c8f769 100644
--- a/tests/api_resources/stream/test_keys.py
+++ b/tests/api_resources/stream/test_keys.py
@@ -148,7 +148,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncKeys:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py
index a41165cf355..8c637eb3141 100644
--- a/tests/api_resources/stream/test_live_inputs.py
+++ b/tests/api_resources/stream/test_live_inputs.py
@@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLiveInputs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py
index b3e356b61f6..1ecc4892b56 100644
--- a/tests/api_resources/stream/test_token.py
+++ b/tests/api_resources/stream/test_token.py
@@ -100,7 +100,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncToken:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_videos.py b/tests/api_resources/stream/test_videos.py
index c0ee01a60ff..9708f4488bf 100644
--- a/tests/api_resources/stream/test_videos.py
+++ b/tests/api_resources/stream/test_videos.py
@@ -65,7 +65,9 @@ def test_path_params_storage_usage(self, client: Cloudflare) -> None:
class TestAsyncVideos:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_storage_usage(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py
index a70f96b1280..0cafcf5d0c5 100644
--- a/tests/api_resources/stream/test_watermarks.py
+++ b/tests/api_resources/stream/test_watermarks.py
@@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWatermarks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/stream/test_webhooks.py b/tests/api_resources/stream/test_webhooks.py
index 565e3777ea8..63a685256d4 100644
--- a/tests/api_resources/stream/test_webhooks.py
+++ b/tests/api_resources/stream/test_webhooks.py
@@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWebhooks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py
index a2309a11c6f..8efb4e4713c 100644
--- a/tests/api_resources/test_abuse_reports.py
+++ b/tests/api_resources/test_abuse_reports.py
@@ -20,12 +20,22 @@ class TestAbuseReports:
@parametrize
def test_method_create_overload_1(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -34,38 +44,29 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
- email="email",
- email2="email2",
- name="x",
- urls="urls",
+ act="abuse_dmca",
address1="x",
agent_name="x",
- agree=0,
+ agree=1,
city="x",
- comments="x",
- company="x",
country="x",
- destination_ips="destination_ips",
+ email="email",
+ email2="email2",
host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
+ name="x",
original_work="x",
owner_notification="send",
- ports_protocols="ports_protocols",
- reported_country="xx",
- reported_user_agent="x",
signature="signature",
- source_ips="source_ips",
state="x",
+ urls="urls",
+ comments="x",
+ company="x",
+ reported_country="xx",
+ reported_user_agent="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -73,12 +74,22 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_1(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
@@ -91,12 +102,22 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
) as response:
assert not response.is_closed
@@ -112,12 +133,43 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None:
def test_path_params_create_overload_1(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
@@ -125,12 +177,18 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_2(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -139,38 +197,25 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -178,12 +223,18 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_2(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
@@ -196,12 +247,18 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
) as response:
assert not response.is_closed
@@ -217,12 +274,35 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None:
def test_path_params_create_overload_2(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_trademark",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
@@ -230,12 +310,15 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_3(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -244,38 +327,25 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -283,12 +353,15 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_3(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -301,12 +374,15 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -322,12 +398,29 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None:
def test_path_params_create_overload_3(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_general",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -335,12 +428,15 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_4(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -349,38 +445,23 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -388,12 +469,15 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_4(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -406,12 +490,15 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -427,12 +514,29 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None:
def test_path_params_create_overload_4(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_phishing",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -440,12 +544,16 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_5(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -454,38 +562,24 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -493,12 +587,16 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_5(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
@@ -511,12 +609,16 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -532,12 +634,31 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None:
def test_path_params_create_overload_5(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_children",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ ncmec_notification="send",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
@@ -545,12 +666,15 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_6(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -559,38 +683,22 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -598,12 +706,15 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_6(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -616,12 +727,15 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -637,12 +751,29 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None:
def test_path_params_create_overload_6(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_threat",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -650,12 +781,13 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_7(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -664,38 +796,20 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -703,12 +817,13 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_7(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -721,12 +836,13 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -742,12 +858,25 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None:
def test_path_params_create_overload_7(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_registrar_whois",
+ email="email",
+ email2="email2",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -755,12 +884,15 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_overload_8(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -769,38 +901,23 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None:
@parametrize
def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None:
abuse_report = client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -808,12 +925,15 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
@parametrize
def test_raw_response_create_overload_8(self, client: Cloudflare) -> None:
response = client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
@@ -826,12 +946,15 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None:
with client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -847,29 +970,58 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None:
def test_path_params_create_overload_8(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_ncsei",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
class TestAsyncAbuseReports:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response")
@parametrize
async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -878,38 +1030,29 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
- email="email",
- email2="email2",
- name="x",
- urls="urls",
+ act="abuse_dmca",
address1="x",
agent_name="x",
- agree=0,
+ agree=1,
city="x",
- comments="x",
- company="x",
country="x",
- destination_ips="destination_ips",
+ email="email",
+ email2="email2",
host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
+ name="x",
original_work="x",
owner_notification="send",
- ports_protocols="ports_protocols",
- reported_country="xx",
- reported_user_agent="x",
signature="signature",
- source_ips="source_ips",
state="x",
+ urls="urls",
+ comments="x",
+ company="x",
+ reported_country="xx",
+ reported_user_agent="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -917,12 +1060,22 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
@@ -935,12 +1088,22 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
) as response:
assert not response.is_closed
@@ -956,12 +1119,43 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo
async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_dmca",
+ address1="x",
+ agent_name="x",
+ agree=1,
+ city="x",
+ country="x",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ original_work="x",
+ owner_notification="send",
+ signature="signature",
+ state="x",
urls="urls",
)
@@ -969,12 +1163,18 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -983,38 +1183,25 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1022,12 +1209,18 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
@@ -1040,12 +1233,18 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
) as response:
assert not response.is_closed
@@ -1061,12 +1260,35 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo
async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_trademark",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_trademark",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
+ trademark_number="x",
+ trademark_office="x",
+ trademark_symbol="x",
urls="urls",
)
@@ -1074,12 +1296,15 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1088,38 +1313,25 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1127,12 +1339,15 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1145,12 +1360,15 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1166,12 +1384,29 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo
async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
act="abuse_general",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_general",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1179,12 +1414,15 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1193,38 +1431,23 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1232,12 +1455,15 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1250,12 +1476,15 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1271,12 +1500,29 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo
async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_phishing",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_phishing",
email="email",
email2="email2",
+ host_notification="send",
+ justification="xxxxxxxxxxxxxxxxxxxx",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1284,12 +1530,16 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1298,38 +1548,24 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1337,12 +1573,16 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
@@ -1355,12 +1595,16 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1376,12 +1620,31 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo
async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_children",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ ncmec_notification="send",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_children",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ ncmec_notification="send",
+ owner_notification="send",
urls="urls",
)
@@ -1389,12 +1652,15 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1403,38 +1669,22 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1442,12 +1692,15 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1460,12 +1713,15 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1481,12 +1737,29 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo
async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_threat",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ justification="x",
+ name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_threat",
email="email",
email2="email2",
+ host_notification="send",
+ justification="x",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1494,12 +1767,13 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1508,38 +1782,20 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
- country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1547,12 +1803,13 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1565,12 +1822,13 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1586,12 +1844,25 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo
async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_registrar_whois",
email="email",
email2="email2",
name="x",
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_registrar_whois",
+ email="email",
+ email2="email2",
+ name="x",
+ owner_notification="send",
urls="urls",
)
@@ -1599,12 +1870,15 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare
@parametrize
async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1613,38 +1887,23 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None:
abuse_report = await async_client.abuse_reports.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
- address1="x",
- agent_name="x",
- agree=0,
- city="x",
comments="x",
company="x",
country="x",
- destination_ips="destination_ips",
- host_notification="send",
- justification="x",
- ncmec_notification="send",
- ncsei_subject_representation=True,
- original_work="x",
- owner_notification="send",
- ports_protocols="ports_protocols",
reported_country="xx",
reported_user_agent="x",
- signature="signature",
- source_ips="source_ips",
- state="x",
tele="x",
title="x",
- trademark_number="x",
- trademark_office="x",
- trademark_symbol="x",
)
assert_matches_type(str, abuse_report, path=["response"])
@@ -1652,12 +1911,15 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None:
response = await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
@@ -1670,12 +1932,15 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar
@parametrize
async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None:
async with async_client.abuse_reports.with_streaming_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- act="abuse_general",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
) as response:
assert not response.is_closed
@@ -1691,11 +1956,28 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo
async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.abuse_reports.with_raw_response.create(
- report_type="abuse_general",
+ report_type="report_type",
account_id="",
- act="abuse_general",
+ act="abuse_ncsei",
+ email="email",
+ email2="email2",
+ host_notification="send",
+ name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
+ urls="urls",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"):
+ await async_client.abuse_reports.with_raw_response.create(
+ report_type="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ act="abuse_ncsei",
email="email",
email2="email2",
+ host_notification="send",
name="x",
+ ncsei_subject_representation=True,
+ owner_notification="send",
urls="urls",
)
diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py
index 345d30376fa..df241383c9e 100644
--- a/tests/api_resources/test_accounts.py
+++ b/tests/api_resources/test_accounts.py
@@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAccounts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_ai.py b/tests/api_resources/test_ai.py
index 3e168ba5d75..1861c05cc28 100644
--- a/tests/api_resources/test_ai.py
+++ b/tests/api_resources/test_ai.py
@@ -1027,7 +1027,9 @@ def test_path_params_run_overload_14(self, client: Cloudflare) -> None:
class TestAsyncAI:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py
index be57afddcff..909b68d8164 100644
--- a/tests/api_resources/test_ai_gateway.py
+++ b/tests/api_resources/test_ai_gateway.py
@@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAIGateway:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_audit_logs.py b/tests/api_resources/test_audit_logs.py
index 5c550224d90..b992b177c3f 100644
--- a/tests/api_resources/test_audit_logs.py
+++ b/tests/api_resources/test_audit_logs.py
@@ -80,7 +80,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAuditLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_bot_management.py b/tests/api_resources/test_bot_management.py
index 45478cc0021..526820026a7 100644
--- a/tests/api_resources/test_bot_management.py
+++ b/tests/api_resources/test_bot_management.py
@@ -264,7 +264,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBotManagement:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py
index 9dfcb8502d9..373bff75a30 100644
--- a/tests/api_resources/test_brand_protection.py
+++ b/tests/api_resources/test_brand_protection.py
@@ -3,16 +3,14 @@
from __future__ import annotations
import os
-from typing import Any, Optional, cast
+from typing import Any, cast
import pytest
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.brand_protection import (
- Info,
- Submit,
-)
+from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
+from cloudflare.types.brand_protection import BrandProtectionSubmitResponse, BrandProtectionURLInfoResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,45 +18,41 @@
class TestBrandProtection:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_method_submit(self, client: Cloudflare) -> None:
brand_protection = client.brand_protection.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
-
- @parametrize
- def test_method_submit_with_all_params(self, client: Cloudflare) -> None:
- brand_protection = client.brand_protection.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- url="https://www.cloudflare.com",
- )
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_raw_response_submit(self, client: Cloudflare) -> None:
response = client.brand_protection.with_raw_response.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = response.parse()
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_streaming_response_submit(self, client: Cloudflare) -> None:
with client.brand_protection.with_streaming_response.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = response.parse()
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_path_params_submit(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -66,46 +60,41 @@ def test_path_params_submit(self, client: Cloudflare) -> None:
account_id="",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_method_url_info(self, client: Cloudflare) -> None:
brand_protection = client.brand_protection.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
-
- @parametrize
- def test_method_url_info_with_all_params(self, client: Cloudflare) -> None:
- brand_protection = client.brand_protection.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- url=["string"],
- url_id=[0],
+ account_id="x",
)
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_raw_response_url_info(self, client: Cloudflare) -> None:
response = client.brand_protection.with_raw_response.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = response.parse()
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_streaming_response_url_info(self, client: Cloudflare) -> None:
with client.brand_protection.with_streaming_response.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = response.parse()
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_path_params_url_info(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -115,47 +104,45 @@ def test_path_params_url_info(self, client: Cloudflare) -> None:
class TestAsyncBrandProtection:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_method_submit(self, async_client: AsyncCloudflare) -> None:
brand_protection = await async_client.brand_protection.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
-
- @parametrize
- async def test_method_submit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- brand_protection = await async_client.brand_protection.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- url="https://www.cloudflare.com",
- )
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_raw_response_submit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.brand_protection.with_raw_response.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = await response.parse()
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_streaming_response_submit(self, async_client: AsyncCloudflare) -> None:
async with async_client.brand_protection.with_streaming_response.submit(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = await response.parse()
- assert_matches_type(Optional[Submit], brand_protection, path=["response"])
+ assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"])
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_path_params_submit(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -163,46 +150,41 @@ async def test_path_params_submit(self, async_client: AsyncCloudflare) -> None:
account_id="",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_method_url_info(self, async_client: AsyncCloudflare) -> None:
brand_protection = await async_client.brand_protection.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
-
- @parametrize
- async def test_method_url_info_with_all_params(self, async_client: AsyncCloudflare) -> None:
- brand_protection = await async_client.brand_protection.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- url=["string"],
- url_id=[0],
+ account_id="x",
)
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> None:
response = await async_client.brand_protection.with_raw_response.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = await response.parse()
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) -> None:
async with async_client.brand_protection.with_streaming_response.url_info(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
brand_protection = await response.parse()
- assert_matches_type(Optional[Info], brand_protection, path=["response"])
+ assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"])
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_path_params_url_info(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py
index 7af5c5be461..30ba1b0bf1e 100644
--- a/tests/api_resources/test_cache.py
+++ b/tests/api_resources/test_cache.py
@@ -20,14 +20,14 @@ class TestCache:
@parametrize
def test_method_purge_overload_1(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
tags=["a-cache-tag", "another-cache-tag"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -35,7 +35,7 @@ def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -46,7 +46,7 @@ def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -66,14 +66,14 @@ def test_path_params_purge_overload_1(self, client: Cloudflare) -> None:
@parametrize
def test_method_purge_overload_2(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
hosts=["www.example.com", "images.example.com"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -81,7 +81,7 @@ def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -92,7 +92,7 @@ def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -112,14 +112,14 @@ def test_path_params_purge_overload_2(self, client: Cloudflare) -> None:
@parametrize
def test_method_purge_overload_3(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
prefixes=["www.example.com/foo", "images.example.com/bar/baz"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -127,7 +127,7 @@ def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -138,7 +138,7 @@ def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -158,14 +158,14 @@ def test_path_params_purge_overload_3(self, client: Cloudflare) -> None:
@parametrize
def test_method_purge_overload_4(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
purge_everything=True,
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -173,7 +173,7 @@ def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -184,7 +184,7 @@ def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -204,14 +204,14 @@ def test_path_params_purge_overload_4(self, client: Cloudflare) -> None:
@parametrize
def test_method_purge_overload_5(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -219,7 +219,7 @@ def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -230,7 +230,7 @@ def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -250,14 +250,14 @@ def test_path_params_purge_overload_5(self, client: Cloudflare) -> None:
@parametrize
def test_method_purge_overload_6(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> None:
cache = client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
files=[
{
"headers": {
@@ -282,7 +282,7 @@ def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> No
@parametrize
def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None:
response = client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -293,7 +293,7 @@ def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_purge_overload_6(self, client: Cloudflare) -> None:
with client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -312,19 +312,21 @@ def test_path_params_purge_overload_6(self, client: Cloudflare) -> None:
class TestAsyncCache:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
tags=["a-cache-tag", "another-cache-tag"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -332,7 +334,7 @@ async def test_method_purge_with_all_params_overload_1(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -343,7 +345,7 @@ async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -363,14 +365,14 @@ async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
hosts=["www.example.com", "images.example.com"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -378,7 +380,7 @@ async def test_method_purge_with_all_params_overload_2(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -389,7 +391,7 @@ async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -409,14 +411,14 @@ async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
prefixes=["www.example.com/foo", "images.example.com/bar/baz"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -424,7 +426,7 @@ async def test_method_purge_with_all_params_overload_3(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -435,7 +437,7 @@ async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -455,14 +457,14 @@ async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
purge_everything=True,
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -470,7 +472,7 @@ async def test_method_purge_with_all_params_overload_4(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -481,7 +483,7 @@ async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -501,14 +503,14 @@ async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"],
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@@ -516,7 +518,7 @@ async def test_method_purge_with_all_params_overload_5(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -527,7 +529,7 @@ async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -547,14 +549,14 @@ async def test_path_params_purge_overload_5(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_purge_overload_6(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"])
@parametrize
async def test_method_purge_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None:
cache = await async_client.cache.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
files=[
{
"headers": {
@@ -579,7 +581,7 @@ async def test_method_purge_with_all_params_overload_6(self, async_client: Async
@parametrize
async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.with_raw_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
@@ -590,7 +592,7 @@ async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.with_streaming_response.purge(
- zone_id="zone_id",
+ zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py
index 254ed8c24c4..45cab4c2feb 100644
--- a/tests/api_resources/test_client_certificates.py
+++ b/tests/api_resources/test_client_certificates.py
@@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncClientCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_content_scanning.py b/tests/api_resources/test_content_scanning.py
index a66910245a8..c01e309d925 100644
--- a/tests/api_resources/test_content_scanning.py
+++ b/tests/api_resources/test_content_scanning.py
@@ -94,7 +94,9 @@ def test_path_params_enable(self, client: Cloudflare) -> None:
class TestAsyncContentScanning:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_disable(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py
index 8f054553aad..e7b672d2ede 100644
--- a/tests/api_resources/test_custom_certificates.py
+++ b/tests/api_resources/test_custom_certificates.py
@@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py
index a18761dde17..10f5a4a1398 100644
--- a/tests/api_resources/test_custom_hostnames.py
+++ b/tests/api_resources/test_custom_hostnames.py
@@ -336,7 +336,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomHostnames:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py
index 942468fa896..6a9a06f4d4d 100644
--- a/tests/api_resources/test_custom_nameservers.py
+++ b/tests/api_resources/test_custom_nameservers.py
@@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomNameservers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_custom_pages.py b/tests/api_resources/test_custom_pages.py
index 28b7765c9eb..352e903dd66 100644
--- a/tests/api_resources/test_custom_pages.py
+++ b/tests/api_resources/test_custom_pages.py
@@ -10,7 +10,11 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.custom_pages import CustomPageGetResponse, CustomPageUpdateResponse
+from cloudflare.types.custom_pages import (
+ CustomPageGetResponse,
+ CustomPageListResponse,
+ CustomPageUpdateResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -22,7 +26,7 @@ class TestCustomPages:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -33,7 +37,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -44,7 +48,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -59,7 +63,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.custom_pages.with_streaming_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -75,17 +79,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- client.custom_pages.with_raw_response.update(
- identifier="",
- state="default",
- url="http://www.example.com",
- account_id="account_id",
- )
-
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="",
@@ -93,7 +89,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -105,7 +101,7 @@ def test_method_list(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.list(
account_id="account_id",
)
- assert_matches_type(SyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(SyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -113,7 +109,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.list(
account_id="account_id",
)
- assert_matches_type(SyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(SyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -125,7 +121,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(SyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(SyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -137,7 +133,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(SyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(SyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -158,7 +154,7 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"])
@@ -167,7 +163,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
custom_page = client.custom_pages.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"])
@@ -176,7 +172,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
@@ -189,7 +185,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.custom_pages.with_streaming_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
) as response:
assert not response.is_closed
@@ -203,33 +199,29 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- client.custom_pages.with_raw_response.get(
- identifier="",
- account_id="account_id",
- )
-
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="",
)
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
class TestAsyncCustomPages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
custom_page = await async_client.custom_pages.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -240,7 +232,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
custom_page = await async_client.custom_pages.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -251,7 +243,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -266,7 +258,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.custom_pages.with_streaming_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -282,17 +274,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- await async_client.custom_pages.with_raw_response.update(
- identifier="",
- state="default",
- url="http://www.example.com",
- account_id="account_id",
- )
-
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
await async_client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="",
@@ -300,7 +284,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
await async_client.custom_pages.with_raw_response.update(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
state="default",
url="http://www.example.com",
account_id="account_id",
@@ -312,7 +296,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
custom_page = await async_client.custom_pages.list(
account_id="account_id",
)
- assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(AsyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -320,7 +304,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
custom_page = await async_client.custom_pages.list(
account_id="account_id",
)
- assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(AsyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -332,7 +316,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(AsyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
@@ -344,7 +328,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"])
+ assert_matches_type(AsyncSinglePage[CustomPageListResponse], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -365,7 +349,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
custom_page = await async_client.custom_pages.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"])
@@ -374,7 +358,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
custom_page = await async_client.custom_pages.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"])
@@ -383,7 +367,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
@@ -396,7 +380,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.custom_pages.with_streaming_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
) as response:
assert not response.is_closed
@@ -410,20 +394,14 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@pytest.mark.skip(reason="TODO: investigate prism failures")
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- await async_client.custom_pages.with_raw_response.get(
- identifier="",
- account_id="account_id",
- )
-
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
await async_client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="",
)
with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
await async_client.custom_pages.with_raw_response.get(
- identifier="023e105f4ecef8ad9ca31a8372d0c353",
+ identifier="ratelimit_block",
account_id="account_id",
)
diff --git a/tests/api_resources/test_dcv_delegation.py b/tests/api_resources/test_dcv_delegation.py
index 0f04ca1a893..1660709969b 100644
--- a/tests/api_resources/test_dcv_delegation.py
+++ b/tests/api_resources/test_dcv_delegation.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDCVDelegation:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_dns_firewall.py b/tests/api_resources/test_dns_firewall.py
index c97f5b3c417..a1843a42bbe 100644
--- a/tests/api_resources/test_dns_firewall.py
+++ b/tests/api_resources/test_dns_firewall.py
@@ -314,7 +314,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDNSFirewall:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py
index e39bb1e1c5e..9ee958eb5ce 100644
--- a/tests/api_resources/test_email_routing.py
+++ b/tests/api_resources/test_email_routing.py
@@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEmailRouting:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_disable(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py
index 1f0aaa1080f..bf12c195874 100644
--- a/tests/api_resources/test_filters.py
+++ b/tests/api_resources/test_filters.py
@@ -390,7 +390,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFilters:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py
index c242ab594ac..e8ceb8eda69 100644
--- a/tests/api_resources/test_healthchecks.py
+++ b/tests/api_resources/test_healthchecks.py
@@ -435,7 +435,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHealthchecks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py
index e013f501f77..449885157ba 100644
--- a/tests/api_resources/test_ips.py
+++ b/tests/api_resources/test_ips.py
@@ -51,7 +51,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncIPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py
index 0dae2518fe2..ea17c20d1b1 100644
--- a/tests/api_resources/test_keyless_certificates.py
+++ b/tests/api_resources/test_keyless_certificates.py
@@ -293,7 +293,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncKeylessCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_leaked_credential_checks.py b/tests/api_resources/test_leaked_credential_checks.py
index 6d29dde2917..6f82f5dbb3d 100644
--- a/tests/api_resources/test_leaked_credential_checks.py
+++ b/tests/api_resources/test_leaked_credential_checks.py
@@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLeakedCredentialChecks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py
index 5b206b46d25..12774db01b0 100644
--- a/tests/api_resources/test_load_balancers.py
+++ b/tests/api_resources/test_load_balancers.py
@@ -699,7 +699,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLoadBalancers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_managed_transforms.py b/tests/api_resources/test_managed_transforms.py
index f00cf76c8b0..d2e91bfbb4f 100644
--- a/tests/api_resources/test_managed_transforms.py
+++ b/tests/api_resources/test_managed_transforms.py
@@ -196,7 +196,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncManagedTransforms:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response")
@parametrize
diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py
index 7d30c588011..19fe2ee97a7 100644
--- a/tests/api_resources/test_memberships.py
+++ b/tests/api_resources/test_memberships.py
@@ -181,7 +181,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMemberships:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py
index 666b1c3c621..e5ad0553d13 100644
--- a/tests/api_resources/test_mtls_certificates.py
+++ b/tests/api_resources/test_mtls_certificates.py
@@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncMTLSCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py
index ddd89222e1e..23f97dc3e59 100644
--- a/tests/api_resources/test_origin_ca_certificates.py
+++ b/tests/api_resources/test_origin_ca_certificates.py
@@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOriginCACertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate auth errors on test suite")
@parametrize
diff --git a/tests/api_resources/test_origin_post_quantum_encryption.py b/tests/api_resources/test_origin_post_quantum_encryption.py
index 5be62d7556c..9160b032a64 100644
--- a/tests/api_resources/test_origin_post_quantum_encryption.py
+++ b/tests/api_resources/test_origin_post_quantum_encryption.py
@@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOriginPostQuantumEncryption:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py
index fc28c9cbee6..89b2f4c1fbc 100644
--- a/tests/api_resources/test_origin_tls_client_auth.py
+++ b/tests/api_resources/test_origin_tls_client_auth.py
@@ -207,7 +207,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOriginTLSClientAuth:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_page_rules.py b/tests/api_resources/test_page_rules.py
index bfe632db4aa..a98e9338e9d 100644
--- a/tests/api_resources/test_page_rules.py
+++ b/tests/api_resources/test_page_rules.py
@@ -404,7 +404,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPageRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="generated params are incorrect")
@parametrize
diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py
index 2511ba986b2..a1c807dc965 100644
--- a/tests/api_resources/test_page_shield.py
+++ b/tests/api_resources/test_page_shield.py
@@ -105,7 +105,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPageShield:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_pipelines.py b/tests/api_resources/test_pipelines.py
index 97d66e53b81..6ca73da466f 100644
--- a/tests/api_resources/test_pipelines.py
+++ b/tests/api_resources/test_pipelines.py
@@ -438,7 +438,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPipelines:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py
index fb1930d4074..e337e5aae5c 100644
--- a/tests/api_resources/test_queues.py
+++ b/tests/api_resources/test_queues.py
@@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncQueues:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py
index 13cbbdfeca6..85a6de47b2f 100644
--- a/tests/api_resources/test_rate_limits.py
+++ b/tests/api_resources/test_rate_limits.py
@@ -396,7 +396,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRateLimits:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_resource_sharing.py b/tests/api_resources/test_resource_sharing.py
index 04448a2d72f..45692b97cbf 100644
--- a/tests/api_resources/test_resource_sharing.py
+++ b/tests/api_resources/test_resource_sharing.py
@@ -307,7 +307,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncResourceSharing:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py
index 1d16aef9e20..f6589f3c67d 100644
--- a/tests/api_resources/test_rulesets.py
+++ b/tests/api_resources/test_rulesets.py
@@ -425,7 +425,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRulesets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_security_txt.py b/tests/api_resources/test_security_txt.py
index 58f8e8306f3..0da5f1a9f06 100644
--- a/tests/api_resources/test_security_txt.py
+++ b/tests/api_resources/test_security_txt.py
@@ -158,7 +158,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSecurityTXT:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py
index 25af699eda9..613a845621b 100644
--- a/tests/api_resources/test_snippets.py
+++ b/tests/api_resources/test_snippets.py
@@ -3,14 +3,18 @@
from __future__ import annotations
import os
-from typing import Any, Optional, cast
+from typing import Any, cast
import pytest
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.snippets import Snippet, SnippetDeleteResponse
+from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from cloudflare.types.snippets import (
+ SnippetGetResponse,
+ SnippetListResponse,
+ SnippetUpdateResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -22,47 +26,42 @@ class TestSnippets:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
snippet = client.snippets.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
-
- @pytest.mark.skip(reason="throwing HTTP 415")
- @parametrize
- def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- snippet = client.snippets.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- files="export { async function fetch(request, env) {return new Response('some_response') } }",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
metadata={"main_module": "main.js"},
)
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.snippets.with_raw_response.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.snippets.with_streaming_response.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -71,44 +70,57 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.snippets.with_raw_response.update(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
client.snippets.with_raw_response.update(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
snippet = client.snippets.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ )
+ assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ snippet = client.snippets.list(
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ page=1,
+ per_page=25,
)
- assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
response = client.snippets.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
with client.snippets.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -122,34 +134,34 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
snippet = client.snippets.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.snippets.with_raw_response.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.snippets.with_streaming_response.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -157,47 +169,47 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.snippets.with_raw_response.delete(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
client.snippets.with_raw_response.delete(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
snippet = client.snippets.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.snippets.with_raw_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.snippets.with_streaming_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -205,65 +217,62 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.snippets.with_raw_response.get(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
client.snippets.with_raw_response.get(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
class TestAsyncSnippets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
snippet = await async_client.snippets.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
-
- @pytest.mark.skip(reason="throwing HTTP 415")
- @parametrize
- async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- snippet = await async_client.snippets.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- files="export { async function fetch(request, env) {return new Response('some_response') } }",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
metadata={"main_module": "main.js"},
)
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.with_raw_response.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
@pytest.mark.skip(reason="throwing HTTP 415")
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.with_streaming_response.update(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetUpdateResponse, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -272,44 +281,57 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.snippets.with_raw_response.update(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
await async_client.snippets.with_raw_response.update(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ files=[b"raw file contents"],
+ metadata={"main_module": "main.js"},
)
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
snippet = await async_client.snippets.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ )
+ assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ snippet = await async_client.snippets.list(
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
+ page=1,
+ per_page=25,
)
- assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -323,34 +345,34 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
snippet = await async_client.snippets.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.with_raw_response.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.with_streaming_response.delete(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(SnippetDeleteResponse, snippet, path=["response"])
+ assert_matches_type(str, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -358,47 +380,47 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.snippets.with_raw_response.delete(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
await async_client.snippets.with_raw_response.delete(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
snippet = await async_client.snippets.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.snippets.with_raw_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.snippets.with_streaming_response.get(
- snippet_name="snippet_name_01",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ snippet_name="my_snippet",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
snippet = await response.parse()
- assert_matches_type(Optional[Snippet], snippet, path=["response"])
+ assert_matches_type(SnippetGetResponse, snippet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -406,12 +428,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.snippets.with_raw_response.get(
- snippet_name="snippet_name_01",
+ snippet_name="my_snippet",
zone_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"):
await async_client.snippets.with_raw_response.get(
snippet_name="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
+ zone_id="9f1839b6152d298aca64c4e906b6d074",
)
diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py
index db91a27d509..9dc95d5e834 100644
--- a/tests/api_resources/test_stream.py
+++ b/tests/api_resources/test_stream.py
@@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncStream:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/test_url_normalization.py b/tests/api_resources/test_url_normalization.py
index 961a3f7b78d..7dfd2d41316 100644
--- a/tests/api_resources/test_url_normalization.py
+++ b/tests/api_resources/test_url_normalization.py
@@ -156,7 +156,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncURLNormalization:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response")
@parametrize
diff --git a/tests/api_resources/test_user.py b/tests/api_resources/test_user.py
index d214ccb7353..b6ccd151f8b 100644
--- a/tests/api_resources/test_user.py
+++ b/tests/api_resources/test_user.py
@@ -80,7 +80,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncUser:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py
index 763cf81e989..ed4243ca17b 100644
--- a/tests/api_resources/test_waiting_rooms.py
+++ b/tests/api_resources/test_waiting_rooms.py
@@ -486,7 +486,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWaitingRooms:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_workflows.py b/tests/api_resources/test_workflows.py
index 30163e14d9c..bcc84aa9081 100644
--- a/tests/api_resources/test_workflows.py
+++ b/tests/api_resources/test_workflows.py
@@ -227,7 +227,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWorkflows:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_zaraz.py b/tests/api_resources/test_zaraz.py
index 5b9e0b3829c..00bdec56c63 100644
--- a/tests/api_resources/test_zaraz.py
+++ b/tests/api_resources/test_zaraz.py
@@ -61,7 +61,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncZaraz:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py
index b4f8bf827d8..0ee90986d59 100644
--- a/tests/api_resources/test_zones.py
+++ b/tests/api_resources/test_zones.py
@@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncZones:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/turnstile/test_widgets.py b/tests/api_resources/turnstile/test_widgets.py
index 931be7a095f..cfdb1450c39 100644
--- a/tests/api_resources/turnstile/test_widgets.py
+++ b/tests/api_resources/turnstile/test_widgets.py
@@ -373,7 +373,9 @@ def test_path_params_rotate_secret(self, client: Cloudflare) -> None:
class TestAsyncWidgets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/url_scanner/test_responses.py b/tests/api_resources/url_scanner/test_responses.py
index 1690ba966df..f059cb256eb 100644
--- a/tests/api_resources/url_scanner/test_responses.py
+++ b/tests/api_resources/url_scanner/test_responses.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncResponses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py
index a2d0680507a..bcb27351ece 100644
--- a/tests/api_resources/url_scanner/test_scans.py
+++ b/tests/api_resources/url_scanner/test_scans.py
@@ -421,7 +421,9 @@ def test_path_params_screenshot(self, client: Cloudflare) -> None:
class TestAsyncScans:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/billing/test_history.py b/tests/api_resources/user/billing/test_history.py
index 067df084104..b5a06e26a57 100644
--- a/tests/api_resources/user/billing/test_history.py
+++ b/tests/api_resources/user/billing/test_history.py
@@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncHistory:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/billing/test_profile.py b/tests/api_resources/user/billing/test_profile.py
index 06eed719a6b..4a974aed1f0 100644
--- a/tests/api_resources/user/billing/test_profile.py
+++ b/tests/api_resources/user/billing/test_profile.py
@@ -50,7 +50,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncProfile:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/test_audit_logs.py b/tests/api_resources/user/test_audit_logs.py
index 5ce89e4e73b..f678b7539a2 100644
--- a/tests/api_resources/user/test_audit_logs.py
+++ b/tests/api_resources/user/test_audit_logs.py
@@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncAuditLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py
index d2bfd631da8..e2c1217a92d 100644
--- a/tests/api_resources/user/test_invites.py
+++ b/tests/api_resources/user/test_invites.py
@@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncInvites:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/test_organizations.py b/tests/api_resources/user/test_organizations.py
index 724aac1a95c..da23d43f15d 100644
--- a/tests/api_resources/user/test_organizations.py
+++ b/tests/api_resources/user/test_organizations.py
@@ -152,7 +152,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOrganizations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py
index f2483fa8d75..ab0298d51a7 100644
--- a/tests/api_resources/user/test_subscriptions.py
+++ b/tests/api_resources/user/test_subscriptions.py
@@ -139,7 +139,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
class TestAsyncSubscriptions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py
index af745a5815d..bcba28f9023 100644
--- a/tests/api_resources/user/test_tokens.py
+++ b/tests/api_resources/user/test_tokens.py
@@ -36,10 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -69,10 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
condition={
@@ -98,10 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -123,10 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
) as response:
@@ -151,13 +139,9 @@ def test_method_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -186,13 +170,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
condition={
"request_ip": {
"in": ["123.123.123.0/24", "2606:4700::/32"],
@@ -201,6 +181,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
expires_on=parse_datetime("2020-01-01T00:00:00Z"),
not_before=parse_datetime("2018-07-01T05:20:00Z"),
+ status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -217,13 +198,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert response.is_closed is True
@@ -244,13 +221,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -274,13 +247,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
@pytest.mark.skip(reason="TODO: investigate broken test")
@@ -435,7 +404,9 @@ def test_streaming_response_verify(self, client: Cloudflare) -> None:
class TestAsyncTokens:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -449,10 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -482,10 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
condition={
@@ -511,10 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
)
@@ -536,10 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
) as response:
@@ -564,13 +523,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -599,13 +554,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
condition={
"request_ip": {
"in": ["123.123.123.0/24", "2606:4700::/32"],
@@ -614,6 +565,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
expires_on=parse_datetime("2020-01-01T00:00:00Z"),
not_before=parse_datetime("2018-07-01T05:20:00Z"),
+ status="active",
)
assert_matches_type(Optional[Token], token, path=["response"])
@@ -630,13 +582,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
assert response.is_closed is True
@@ -657,13 +605,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -687,13 +631,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
],
- "resources": {
- "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*",
- "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*",
- },
+ "resources": {"foo": "string"},
}
],
- status="active",
)
@pytest.mark.skip(reason="TODO: investigate broken test")
diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py
index 2ce293ee632..3e813ab1b1e 100644
--- a/tests/api_resources/user/tokens/test_permission_groups.py
+++ b/tests/api_resources/user/tokens/test_permission_groups.py
@@ -24,6 +24,15 @@ def test_method_list(self, client: Cloudflare) -> None:
permission_group = client.user.tokens.permission_groups.list()
assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ permission_group = client.user.tokens.permission_groups.list(
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -48,7 +57,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
class TestAsyncPermissionGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -56,6 +67,15 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
permission_group = await async_client.user.tokens.permission_groups.list()
assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ permission_group = await async_client.user.tokens.permission_groups.list(
+ name="Account%20Settings%20Write",
+ scope="com.cloudflare.api.account.zone",
+ )
+ assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"])
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py
index 1256130d6bf..459bf43aabf 100644
--- a/tests/api_resources/user/tokens/test_value.py
+++ b/tests/api_resources/user/tokens/test_value.py
@@ -64,7 +64,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncValue:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/vectorize/indexes/test_metadata_index.py b/tests/api_resources/vectorize/indexes/test_metadata_index.py
index 2c91354788d..2dbf39b034d 100644
--- a/tests/api_resources/vectorize/indexes/test_metadata_index.py
+++ b/tests/api_resources/vectorize/indexes/test_metadata_index.py
@@ -182,7 +182,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncMetadataIndex:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py
index 1a27050902d..fd2e3b78fcf 100644
--- a/tests/api_resources/vectorize/test_indexes.py
+++ b/tests/api_resources/vectorize/test_indexes.py
@@ -600,7 +600,9 @@ def test_path_params_upsert(self, client: Cloudflare) -> None:
class TestAsyncIndexes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py
index c164f78f6b8..efd4a6b83a1 100644
--- a/tests/api_resources/waiting_rooms/events/test_details.py
+++ b/tests/api_resources/waiting_rooms/events/test_details.py
@@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDetails:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py
index a626488d2e3..b7615210e18 100644
--- a/tests/api_resources/waiting_rooms/test_events.py
+++ b/tests/api_resources/waiting_rooms/test_events.py
@@ -491,7 +491,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/test_page.py b/tests/api_resources/waiting_rooms/test_page.py
index 881d9a3a906..e7f87c79d0d 100644
--- a/tests/api_resources/waiting_rooms/test_page.py
+++ b/tests/api_resources/waiting_rooms/test_page.py
@@ -61,7 +61,9 @@ def test_path_params_preview(self, client: Cloudflare) -> None:
class TestAsyncPage:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_preview(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py
index 535dbf679a3..7861f9bfe4a 100644
--- a/tests/api_resources/waiting_rooms/test_rules.py
+++ b/tests/api_resources/waiting_rooms/test_rules.py
@@ -374,7 +374,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/test_settings.py b/tests/api_resources/waiting_rooms/test_settings.py
index 823c9e02011..787b1c36e75 100644
--- a/tests/api_resources/waiting_rooms/test_settings.py
+++ b/tests/api_resources/waiting_rooms/test_settings.py
@@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py
index 5ca8f12dbec..3c06812d4e3 100644
--- a/tests/api_resources/waiting_rooms/test_statuses.py
+++ b/tests/api_resources/waiting_rooms/test_statuses.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncStatuses:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py
index b46488974a4..6c2e96fbf7f 100644
--- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py
+++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py
@@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEntries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py
index 26cdee2b5a6..e83927a314f 100644
--- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py
+++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py
@@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncContentLists:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py
index cb60bbc8e75..a53bf0c2b0d 100644
--- a/tests/api_resources/web3/test_hostnames.py
+++ b/tests/api_resources/web3/test_hostnames.py
@@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHostnames:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/assets/test_upload.py b/tests/api_resources/workers/assets/test_upload.py
index 4ba17c7640a..1e058d78ce4 100644
--- a/tests/api_resources/workers/assets/test_upload.py
+++ b/tests/api_resources/workers/assets/test_upload.py
@@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncUpload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/observability/test_telemetry.py b/tests/api_resources/workers/observability/test_telemetry.py
index ba1b1bc90fc..bef7afd0eb6 100644
--- a/tests/api_resources/workers/observability/test_telemetry.py
+++ b/tests/api_resources/workers/observability/test_telemetry.py
@@ -311,7 +311,9 @@ def test_path_params_values(self, client: Cloudflare) -> None:
class TestAsyncTelemetry:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_keys(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/assets/test_upload.py b/tests/api_resources/workers/scripts/assets/test_upload.py
index b1d00e18e6b..049f3460f79 100644
--- a/tests/api_resources/workers/scripts/assets/test_upload.py
+++ b/tests/api_resources/workers/scripts/assets/test_upload.py
@@ -97,7 +97,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncUpload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py
index 844fa02c9fc..0b849e9c51a 100644
--- a/tests/api_resources/workers/scripts/test_content.py
+++ b/tests/api_resources/workers/scripts/test_content.py
@@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"body_part": "worker.js",
"main_module": "worker.js",
},
+ files=[b"raw file contents"],
cf_worker_body_part="CF-WORKER-BODY-PART",
cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART",
)
@@ -165,7 +166,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncContent:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -187,6 +190,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"body_part": "worker.js",
"main_module": "worker.js",
},
+ files=[b"raw file contents"],
cf_worker_body_part="CF-WORKER-BODY-PART",
cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART",
)
diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py
index 45203082efa..eabd533c8e1 100644
--- a/tests/api_resources/workers/scripts/test_deployments.py
+++ b/tests/api_resources/workers/scripts/test_deployments.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, Optional, cast
+from typing import Any, cast
import pytest
@@ -11,7 +11,9 @@
from tests.utils import assert_matches_type
from cloudflare.types.workers.scripts import (
DeploymentGetResponse,
+ DeploymentListResponse,
DeploymentCreateResponse,
+ DeploymentDeleteResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -29,11 +31,11 @@ def test_method_create(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@@ -44,13 +46,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
force=True,
annotations={"workers_message": "Deploy bug fix."},
)
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
@@ -61,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
@@ -69,7 +71,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
@@ -80,7 +82,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
) as response:
@@ -88,7 +90,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -102,7 +104,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
@@ -115,42 +117,153 @@ def test_path_params_create(self, client: Cloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ deployment = client.workers.scripts.deployments.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.workers.scripts.deployments.with_raw_response.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ deployment = response.parse()
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.workers.scripts.deployments.with_streaming_response.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ deployment = response.parse()
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.list(
+ script_name="this-is_my_script-01",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.list(
+ script_name="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ deployment = client.workers.scripts.deployments.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ deployment = response.parse()
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.workers.scripts.deployments.with_streaming_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ deployment = response.parse()
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ script_name="this-is_my_script-01",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
deployment = client.workers.scripts.deployments.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.workers.scripts.deployments.with_raw_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.workers.scripts.deployments.with_streaming_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -158,19 +271,30 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.workers.scripts.deployments.with_raw_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
+ script_name="this-is_my_script-01",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
client.workers.scripts.deployments.with_raw_response.get(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
script_name="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"):
+ client.workers.scripts.deployments.with_raw_response.get(
+ deployment_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
class TestAsyncDeployments:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -181,11 +305,11 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -196,13 +320,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
force=True,
annotations={"workers_message": "Deploy bug fix."},
)
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@@ -213,7 +337,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
@@ -221,7 +345,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
@@ -232,7 +356,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
) as response:
@@ -240,7 +364,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentCreateResponse, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -254,7 +378,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
@@ -267,42 +391,153 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
versions=[
{
"percentage": 100,
- "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de",
+ "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
}
],
)
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ deployment = await async_client.workers.scripts.deployments.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.workers.scripts.deployments.with_raw_response.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ deployment = await response.parse()
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.workers.scripts.deployments.with_streaming_response.list(
+ script_name="this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ deployment = await response.parse()
+ assert_matches_type(DeploymentListResponse, deployment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.list(
+ script_name="this-is_my_script-01",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.list(
+ script_name="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ deployment = await async_client.workers.scripts.deployments.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ deployment = await response.parse()
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.workers.scripts.deployments.with_streaming_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ deployment = await response.parse()
+ assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ script_name="this-is_my_script-01",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.delete(
+ deployment_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
+ )
+
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
deployment = await async_client.workers.scripts.deployments.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.workers.scripts.deployments.with_raw_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.workers.scripts.deployments.with_streaming_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"])
+ assert_matches_type(DeploymentGetResponse, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -310,12 +545,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.workers.scripts.deployments.with_raw_response.get(
- script_name="this-is_my_script-01",
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
+ script_name="this-is_my_script-01",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
await async_client.workers.scripts.deployments.with_raw_response.get(
+ deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
script_name="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"):
+ await async_client.workers.scripts.deployments.with_raw_response.get(
+ deployment_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ script_name="this-is_my_script-01",
)
diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py
index 3b9532ec015..49788ae1352 100644
--- a/tests/api_resources/workers/scripts/test_schedules.py
+++ b/tests/api_resources/workers/scripts/test_schedules.py
@@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSchedules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_script_and_version_settings.py b/tests/api_resources/workers/scripts/test_script_and_version_settings.py
index 42dc810c516..9849d452657 100644
--- a/tests/api_resources/workers/scripts/test_script_and_version_settings.py
+++ b/tests/api_resources/workers/scripts/test_script_and_version_settings.py
@@ -178,7 +178,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncScriptAndVersionSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_secrets.py b/tests/api_resources/workers/scripts/test_secrets.py
index eb1ce97513b..eaf7a5eabad 100644
--- a/tests/api_resources/workers/scripts/test_secrets.py
+++ b/tests/api_resources/workers/scripts/test_secrets.py
@@ -343,7 +343,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSecrets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py
index cb624108311..9a07538ecc1 100644
--- a/tests/api_resources/workers/scripts/test_settings.py
+++ b/tests/api_resources/workers/scripts/test_settings.py
@@ -140,7 +140,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_subdomain.py b/tests/api_resources/workers/scripts/test_subdomain.py
index afcaa274663..f2ada9e6d5a 100644
--- a/tests/api_resources/workers/scripts/test_subdomain.py
+++ b/tests/api_resources/workers/scripts/test_subdomain.py
@@ -182,7 +182,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSubdomain:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py
index 7dc3b85f88c..4041a0a60d6 100644
--- a/tests/api_resources/workers/scripts/test_tail.py
+++ b/tests/api_resources/workers/scripts/test_tail.py
@@ -180,7 +180,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTail:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py
index 95df44b4788..ccd8dc4222e 100644
--- a/tests/api_resources/workers/scripts/test_versions.py
+++ b/tests/api_resources/workers/scripts/test_versions.py
@@ -56,6 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"keep_bindings": ["string"],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(VersionCreateResponse, version, path=["response"])
@@ -227,7 +228,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVersions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -263,6 +266,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"keep_bindings": ["string"],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(VersionCreateResponse, version, path=["response"])
diff --git a/tests/api_resources/workers/test_account_settings.py b/tests/api_resources/workers/test_account_settings.py
index 5f96e020275..c158d4a0729 100644
--- a/tests/api_resources/workers/test_account_settings.py
+++ b/tests/api_resources/workers/test_account_settings.py
@@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAccountSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py
index 1bbc559f8f8..324bb802af1 100644
--- a/tests/api_resources/workers/test_domains.py
+++ b/tests/api_resources/workers/test_domains.py
@@ -220,7 +220,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/test_routes.py b/tests/api_resources/workers/test_routes.py
index 19547a324f0..594e8309ae9 100644
--- a/tests/api_resources/workers/test_routes.py
+++ b/tests/api_resources/workers/test_routes.py
@@ -274,7 +274,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRoutes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py
index fc0e0bad871..2f1ee244ac5 100644
--- a/tests/api_resources/workers/test_scripts.py
+++ b/tests/api_resources/workers/test_scripts.py
@@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page",
"run_worker_first": ["string"],
+ "serve_directly": True,
},
"jwt": "jwt",
},
@@ -102,6 +103,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(ScriptUpdateResponse, script, path=["response"])
@@ -297,7 +299,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncScripts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -323,6 +327,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page",
"run_worker_first": ["string"],
+ "serve_directly": True,
},
"jwt": "jwt",
},
@@ -380,6 +385,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(ScriptUpdateResponse, script, path=["response"])
diff --git a/tests/api_resources/workers/test_subdomains.py b/tests/api_resources/workers/test_subdomains.py
index 96da816768c..ab015c6a3e8 100644
--- a/tests/api_resources/workers/test_subdomains.py
+++ b/tests/api_resources/workers/test_subdomains.py
@@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSubdomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py
index df897cae3b7..1b4b109eb1d 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py
@@ -117,7 +117,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncAssetUpload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
index be685ad0e29..8bac33bc665 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
@@ -80,7 +80,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBindings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
index dcdd9ad6275..276ca71f189 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
@@ -47,6 +47,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"body_part": "worker.js",
"main_module": "worker.js",
},
+ files=[b"raw file contents"],
cf_worker_body_part="CF-WORKER-BODY-PART",
cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART",
)
@@ -191,7 +192,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncContent:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -215,6 +218,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"body_part": "worker.js",
"main_module": "worker.js",
},
+ files=[b"raw file contents"],
cf_worker_body_part="CF-WORKER-BODY-PART",
cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART",
)
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py
index bf53cc33b74..ed3745b014c 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py
@@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSecrets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
index cdb0c20388c..77ae0124e66 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
@@ -208,7 +208,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py
index 3723f23e5a4..deeb2779dcb 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py
@@ -223,7 +223,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncTags:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
index 3f82e720e66..3552382d6bd 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
@@ -46,6 +46,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page",
"run_worker_first": ["string"],
+ "serve_directly": True,
},
"jwt": "jwt",
},
@@ -103,6 +104,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(ScriptUpdateResponse, script, path=["response"])
@@ -297,7 +299,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncScripts:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -325,6 +329,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page",
"run_worker_first": ["string"],
+ "serve_directly": True,
},
"jwt": "jwt",
},
@@ -382,6 +387,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
],
"usage_model": "standard",
},
+ files=[b"raw file contents"],
)
assert_matches_type(ScriptUpdateResponse, script, path=["response"])
diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py
index df9749cb2e5..a885e5f370a 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py
@@ -204,7 +204,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncNamespaces:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workflows/instances/test_events.py b/tests/api_resources/workflows/instances/test_events.py
index 8857d0356fd..fa638445ffc 100644
--- a/tests/api_resources/workflows/instances/test_events.py
+++ b/tests/api_resources/workflows/instances/test_events.py
@@ -103,7 +103,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workflows/instances/test_status.py b/tests/api_resources/workflows/instances/test_status.py
index bf69221dc66..5b7e8ff5db9 100644
--- a/tests/api_resources/workflows/instances/test_status.py
+++ b/tests/api_resources/workflows/instances/test_status.py
@@ -85,7 +85,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncStatus:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/workflows/test_instances.py b/tests/api_resources/workflows/test_instances.py
index b13a0879f29..3d589e45ceb 100644
--- a/tests/api_resources/workflows/test_instances.py
+++ b/tests/api_resources/workflows/test_instances.py
@@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
workflow_name="x",
account_id="account_id",
instance_id="instance_id",
+ instance_retention={},
params={},
)
assert_matches_type(InstanceCreateResponse, instance, path=["response"])
@@ -95,6 +96,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
instance = client.workflows.instances.list(
workflow_name="x",
account_id="account_id",
+ cursor="cursor",
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
page=1,
@@ -159,6 +161,7 @@ def test_method_bulk_with_all_params(self, client: Cloudflare) -> None:
body=[
{
"instance_id": "instance_id",
+ "instance_retention": {},
"params": {},
}
],
@@ -267,7 +270,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncInstances:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -283,6 +288,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
workflow_name="x",
account_id="account_id",
instance_id="instance_id",
+ instance_retention={},
params={},
)
assert_matches_type(InstanceCreateResponse, instance, path=["response"])
@@ -340,6 +346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
instance = await async_client.workflows.instances.list(
workflow_name="x",
account_id="account_id",
+ cursor="cursor",
date_end=parse_datetime("2019-12-27T18:11:19.117Z"),
date_start=parse_datetime("2019-12-27T18:11:19.117Z"),
page=1,
@@ -404,6 +411,7 @@ async def test_method_bulk_with_all_params(self, async_client: AsyncCloudflare)
body=[
{
"instance_id": "instance_id",
+ "instance_retention": {},
"params": {},
}
],
diff --git a/tests/api_resources/workflows/test_versions.py b/tests/api_resources/workflows/test_versions.py
index 46b2c9f5466..ecdc89ad65b 100644
--- a/tests/api_resources/workflows/test_versions.py
+++ b/tests/api_resources/workflows/test_versions.py
@@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVersions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/history/test_configs.py b/tests/api_resources/zaraz/history/test_configs.py
index 64707d5d443..bf2943babcd 100644
--- a/tests/api_resources/zaraz/history/test_configs.py
+++ b/tests/api_resources/zaraz/history/test_configs.py
@@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_config.py b/tests/api_resources/zaraz/test_config.py
index 15a39c60cac..73473ea9fa5 100644
--- a/tests/api_resources/zaraz/test_config.py
+++ b/tests/api_resources/zaraz/test_config.py
@@ -399,7 +399,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfig:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_default.py b/tests/api_resources/zaraz/test_default.py
index b0a77bb4a0b..0ecaa604f69 100644
--- a/tests/api_resources/zaraz/test_default.py
+++ b/tests/api_resources/zaraz/test_default.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDefault:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_export.py b/tests/api_resources/zaraz/test_export.py
index 73ea5604505..9f0ca72f17a 100644
--- a/tests/api_resources/zaraz/test_export.py
+++ b/tests/api_resources/zaraz/test_export.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncExport:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_history.py b/tests/api_resources/zaraz/test_history.py
index 7690f5c9b68..e67d1fa7fa3 100644
--- a/tests/api_resources/zaraz/test_history.py
+++ b/tests/api_resources/zaraz/test_history.py
@@ -111,7 +111,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncHistory:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_publish.py b/tests/api_resources/zaraz/test_publish.py
index 0ff472b0f22..893341b58bc 100644
--- a/tests/api_resources/zaraz/test_publish.py
+++ b/tests/api_resources/zaraz/test_publish.py
@@ -64,7 +64,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncPublish:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zaraz/test_workflow.py b/tests/api_resources/zaraz/test_workflow.py
index 52930af6397..10aed6902f3 100644
--- a/tests/api_resources/zaraz/test_workflow.py
+++ b/tests/api_resources/zaraz/test_workflow.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWorkflow:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py
index 0489de97d1d..4043950764e 100755
--- a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py
+++ b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py
@@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUsers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py
index 5ec4f55234f..96b822700df 100644
--- a/tests/api_resources/zero_trust/access/applications/test_cas.py
+++ b/tests/api_resources/zero_trust/access/applications/test_cas.py
@@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCAs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py
index edb59c1c638..747a489d1be 100644
--- a/tests/api_resources/zero_trust/access/applications/test_policies.py
+++ b/tests/api_resources/zero_trust/access/applications/test_policies.py
@@ -439,7 +439,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py
index 561ff4e4dbe..d4517ef3e31 100755
--- a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py
+++ b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py
@@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPolicyTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/applications/test_settings.py b/tests/api_resources/zero_trust/access/applications/test_settings.py
index b9f96bdcbfd..a1bc19b917e 100644
--- a/tests/api_resources/zero_trust/access/applications/test_settings.py
+++ b/tests/api_resources/zero_trust/access/applications/test_settings.py
@@ -160,7 +160,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
index daafd6559ea..668f6fc35b0 100644
--- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
+++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
@@ -86,7 +86,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUserPolicyChecks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py
index bb371f1b93d..65b683707ca 100644
--- a/tests/api_resources/zero_trust/access/certificates/test_settings.py
+++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py
@@ -172,7 +172,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py
index 3eebb5554ba..74205d6a65b 100644
--- a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py
+++ b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py
@@ -478,7 +478,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTargets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py
index 776071ab042..958488c0d33 100644
--- a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py
+++ b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py
@@ -82,7 +82,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUpdates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/logs/test_access_requests.py b/tests/api_resources/zero_trust/access/logs/test_access_requests.py
index 3eafad4f1a6..a083df20054 100644
--- a/tests/api_resources/zero_trust/access/logs/test_access_requests.py
+++ b/tests/api_resources/zero_trust/access/logs/test_access_requests.py
@@ -69,7 +69,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAccessRequests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py
index 3accaf5a932..a2e13edb5a9 100644
--- a/tests/api_resources/zero_trust/access/test_applications.py
+++ b/tests/api_resources/zero_trust/access/test_applications.py
@@ -1188,7 +1188,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -1205,7 +1205,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) ->
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -1319,7 +1319,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -1340,7 +1340,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -1364,7 +1364,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -1378,7 +1378,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2676,7 +2676,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2694,7 +2694,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) ->
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2809,7 +2809,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2831,7 +2831,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2856,7 +2856,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2871,7 +2871,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2886,7 +2886,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None:
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -2909,6 +2909,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
account_id="account_id",
aud="aud",
domain="domain",
+ exact=True,
name="name",
search="search",
)
@@ -3156,7 +3157,9 @@ def test_path_params_revoke_tokens(self, client: Cloudflare) -> None:
class TestAsyncApplications:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -4322,7 +4325,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) ->
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -4339,7 +4342,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -4453,7 +4456,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -4474,7 +4477,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -4498,7 +4501,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -4512,7 +4515,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -5810,7 +5813,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) ->
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -5828,7 +5831,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -5943,7 +5946,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -5965,7 +5968,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -5990,7 +5993,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -6005,7 +6008,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -6020,7 +6023,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar
target_criteria=[
{
"port": 22,
- "protocol": "SSH",
+ "protocol": "RDP",
"target_attributes": {"hostname": ["test-server", "production-server"]},
}
],
@@ -6043,6 +6046,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
account_id="account_id",
aud="aud",
domain="domain",
+ exact=True,
name="name",
search="search",
)
diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py
index c181fbba11f..b824fd1024a 100644
--- a/tests/api_resources/zero_trust/access/test_bookmarks.py
+++ b/tests/api_resources/zero_trust/access/test_bookmarks.py
@@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBookmarks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py
index 8bd7249ed22..bfa0e89b3b5 100644
--- a/tests/api_resources/zero_trust/access/test_certificates.py
+++ b/tests/api_resources/zero_trust/access/test_certificates.py
@@ -355,7 +355,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py
index b21a942f7b8..7693e217603 100644
--- a/tests/api_resources/zero_trust/access/test_custom_pages.py
+++ b/tests/api_resources/zero_trust/access/test_custom_pages.py
@@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomPages:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_gateway_ca.py b/tests/api_resources/zero_trust/access/test_gateway_ca.py
index 723be698029..80604ae6620 100644
--- a/tests/api_resources/zero_trust/access/test_gateway_ca.py
+++ b/tests/api_resources/zero_trust/access/test_gateway_ca.py
@@ -144,7 +144,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
class TestAsyncGatewayCA:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py
index f83be911c0f..fe592c5eb4f 100644
--- a/tests/api_resources/zero_trust/access/test_groups.py
+++ b/tests/api_resources/zero_trust/access/test_groups.py
@@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/test_keys.py b/tests/api_resources/zero_trust/access/test_keys.py
index f0b87f16c0f..b2a7ea7fb3b 100644
--- a/tests/api_resources/zero_trust/access/test_keys.py
+++ b/tests/api_resources/zero_trust/access/test_keys.py
@@ -137,7 +137,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None:
class TestAsyncKeys:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_policies.py b/tests/api_resources/zero_trust/access/test_policies.py
index 5102dd04664..9f15939ac35 100644
--- a/tests/api_resources/zero_trust/access/test_policies.py
+++ b/tests/api_resources/zero_trust/access/test_policies.py
@@ -332,7 +332,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPolicies:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py
index f6980f81209..ad2553a44c6 100644
--- a/tests/api_resources/zero_trust/access/test_service_tokens.py
+++ b/tests/api_resources/zero_trust/access/test_service_tokens.py
@@ -442,7 +442,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None:
class TestAsyncServiceTokens:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py
index 26cebba1a61..9c5aa48bc98 100644
--- a/tests/api_resources/zero_trust/access/test_tags.py
+++ b/tests/api_resources/zero_trust/access/test_tags.py
@@ -253,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncTags:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/test_users.py b/tests/api_resources/zero_trust/access/test_users.py
index ae92054aec0..f87073d2ed5 100644
--- a/tests/api_resources/zero_trust/access/test_users.py
+++ b/tests/api_resources/zero_trust/access/test_users.py
@@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUsers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py
index e0f1db9ea66..d9c41b65972 100644
--- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py
+++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py
@@ -128,7 +128,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncActiveSessions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py
index 697dbe9181f..293eddfd0e4 100644
--- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py
+++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py
@@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncFailedLogins:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
index 9b7d2644d33..5505fe5588a 100644
--- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
+++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLastSeenIdentity:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py
index 3f6f640d871..54c1b30db1a 100644
--- a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py
+++ b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py
@@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncExcludes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py
index f9396cb4b7a..c5a9ef3e156 100644
--- a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py
+++ b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py
@@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFallbackDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py
index 5a978a24fa8..51596f1cd73 100644
--- a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py
+++ b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py
@@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIncludes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py
index 58b38f6c67e..62ddac10409 100644
--- a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py
+++ b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py
@@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py
index d32898c6e0e..51781aace5e 100644
--- a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py
+++ b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py
@@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncExcludes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py
index 13e16b48292..7d81d4d2265 100644
--- a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py
+++ b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py
@@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFallbackDomains:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py
index eaed69ed067..89c4aebae8d 100644
--- a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py
+++ b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py
@@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIncludes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/policies/test_custom.py b/tests/api_resources/zero_trust/devices/policies/test_custom.py
index 29d15b73f25..324311c25b8 100644
--- a/tests/api_resources/zero_trust/devices/policies/test_custom.py
+++ b/tests/api_resources/zero_trust/devices/policies/test_custom.py
@@ -351,7 +351,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustom:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/devices/policies/test_default.py b/tests/api_resources/zero_trust/devices/policies/test_default.py
index aeb1539e130..4e6dce31427 100644
--- a/tests/api_resources/zero_trust/devices/policies/test_default.py
+++ b/tests/api_resources/zero_trust/devices/policies/test_default.py
@@ -132,7 +132,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDefault:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py
index 35efacf4282..02edc0b9b20 100644
--- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py
+++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py
@@ -312,7 +312,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIntegrations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py
index 6f3727f6460..f5d2c2974e5 100644
--- a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py
+++ b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py
@@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncGlobalWARPOverride:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_devices_.py b/tests/api_resources/zero_trust/devices/test_devices_.py
index 94c98cd4bb4..95440abceec 100644
--- a/tests/api_resources/zero_trust/devices/test_devices_.py
+++ b/tests/api_resources/zero_trust/devices/test_devices_.py
@@ -237,7 +237,9 @@ def test_path_params_revoke(self, client: Cloudflare) -> None:
class TestAsyncDevices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
@parametrize
diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py
index 7198475bd23..1bf2479ebe4 100644
--- a/tests/api_resources/zero_trust/devices/test_dex_tests.py
+++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py
@@ -331,7 +331,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDEXTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_fleet_status.py b/tests/api_resources/zero_trust/devices/test_fleet_status.py
index 308864477e0..fa6ed7dbd72 100644
--- a/tests/api_resources/zero_trust/devices/test_fleet_status.py
+++ b/tests/api_resources/zero_trust/devices/test_fleet_status.py
@@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncFleetStatus:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py
index f09f4ba1555..09e1164f0be 100644
--- a/tests/api_resources/zero_trust/devices/test_networks.py
+++ b/tests/api_resources/zero_trust/devices/test_networks.py
@@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncNetworks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py
index d3d41b67877..64cedbbaac8 100644
--- a/tests/api_resources/zero_trust/devices/test_override_codes.py
+++ b/tests/api_resources/zero_trust/devices/test_override_codes.py
@@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncOverrideCodes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
@parametrize
diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py
index 7df5498d5e8..36505a237d1 100644
--- a/tests/api_resources/zero_trust/devices/test_posture.py
+++ b/tests/api_resources/zero_trust/devices/test_posture.py
@@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPosture:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_registrations.py b/tests/api_resources/zero_trust/devices/test_registrations.py
index 544dcf13b36..9a3b5e4cda7 100644
--- a/tests/api_resources/zero_trust/devices/test_registrations.py
+++ b/tests/api_resources/zero_trust/devices/test_registrations.py
@@ -327,7 +327,9 @@ def test_path_params_unrevoke(self, client: Cloudflare) -> None:
class TestAsyncRegistrations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used")
@parametrize
diff --git a/tests/api_resources/zero_trust/devices/test_revoke.py b/tests/api_resources/zero_trust/devices/test_revoke.py
index df8b21c996e..285d2cebc88 100644
--- a/tests/api_resources/zero_trust/devices/test_revoke.py
+++ b/tests/api_resources/zero_trust/devices/test_revoke.py
@@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncRevoke:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_settings.py b/tests/api_resources/zero_trust/devices/test_settings.py
index 194a95ad61f..f4518b03567 100644
--- a/tests/api_resources/zero_trust/devices/test_settings.py
+++ b/tests/api_resources/zero_trust/devices/test_settings.py
@@ -195,7 +195,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/devices/test_unrevoke.py b/tests/api_resources/zero_trust/devices/test_unrevoke.py
index 4155a91a1c4..c48cd42d16c 100644
--- a/tests/api_resources/zero_trust/devices/test_unrevoke.py
+++ b/tests/api_resources/zero_trust/devices/test_unrevoke.py
@@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncUnrevoke:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/commands/test_devices.py b/tests/api_resources/zero_trust/dex/commands/test_devices.py
index be6707c9e2a..d364b9938d9 100644
--- a/tests/api_resources/zero_trust/dex/commands/test_devices.py
+++ b/tests/api_resources/zero_trust/dex/commands/test_devices.py
@@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncDevices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/commands/test_downloads.py b/tests/api_resources/zero_trust/dex/commands/test_downloads.py
index 66711dbdd5a..d91195e566a 100644
--- a/tests/api_resources/zero_trust/dex/commands/test_downloads.py
+++ b/tests/api_resources/zero_trust/dex/commands/test_downloads.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDownloads:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
@pytest.mark.respx(base_url=base_url)
diff --git a/tests/api_resources/zero_trust/dex/commands/test_quota.py b/tests/api_resources/zero_trust/dex/commands/test_quota.py
index 5291e9d3113..c3114be6849 100644
--- a/tests/api_resources/zero_trust/dex/commands/test_quota.py
+++ b/tests/api_resources/zero_trust/dex/commands/test_quota.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncQuota:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py
index c542c152c1b..c77565e0f06 100644
--- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py
+++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py
@@ -98,7 +98,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncDevices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py
index 98fd5fd8ad4..6a6125e8a30 100644
--- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py
+++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py
@@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPercentiles:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py
index 8e4d0db4399..cb35c388539 100644
--- a/tests/api_resources/zero_trust/dex/test_colos.py
+++ b/tests/api_resources/zero_trust/dex/test_colos.py
@@ -75,7 +75,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncColos:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_commands.py b/tests/api_resources/zero_trust/dex/test_commands.py
index 9692c4fde6c..0397c5dd48d 100644
--- a/tests/api_resources/zero_trust/dex/test_commands.py
+++ b/tests/api_resources/zero_trust/dex/test_commands.py
@@ -151,7 +151,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncCommands:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_fleet_status.py b/tests/api_resources/zero_trust/dex/test_fleet_status.py
index db1676eacde..0c858737366 100644
--- a/tests/api_resources/zero_trust/dex/test_fleet_status.py
+++ b/tests/api_resources/zero_trust/dex/test_fleet_status.py
@@ -120,7 +120,9 @@ def test_path_params_over_time(self, client: Cloudflare) -> None:
class TestAsyncFleetStatus:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_live(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py
index 21329525b50..47ab64b6035 100644
--- a/tests/api_resources/zero_trust/dex/test_http_tests.py
+++ b/tests/api_resources/zero_trust/dex/test_http_tests.py
@@ -95,7 +95,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHTTPTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py
index 3c5a325a62c..cee5ea6d397 100644
--- a/tests/api_resources/zero_trust/dex/test_tests.py
+++ b/tests/api_resources/zero_trust/dex/test_tests.py
@@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py
index e9c90169344..65eafd20ede 100644
--- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py
+++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py
@@ -237,7 +237,9 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None:
class TestAsyncTracerouteTests:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/test_warp_change_events.py b/tests/api_resources/zero_trust/dex/test_warp_change_events.py
index 402089c3dc2..fa9309617f8 100644
--- a/tests/api_resources/zero_trust/dex/test_warp_change_events.py
+++ b/tests/api_resources/zero_trust/dex/test_warp_change_events.py
@@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWARPChangeEvents:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py
index 04439705540..6a91c7b68c4 100644
--- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py
+++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py
@@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUniqueDevices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py
index cde7d16b706..ca7f869da0b 100644
--- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py
+++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncNetworkPath:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
index 15c42ee5123..8402e87a1fa 100644
--- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
+++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
@@ -71,9 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
def test_method_edit(self, client: Cloudflare) -> None:
upload = client.zero_trust.dlp.datasets.upload.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
assert_matches_type(Optional[Dataset], upload, path=["response"])
@@ -82,9 +82,9 @@ def test_method_edit(self, client: Cloudflare) -> None:
def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
assert response.is_closed is True
@@ -97,9 +97,9 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.zero_trust.dlp.datasets.upload.with_streaming_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -115,22 +115,24 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="",
- body=b"raw file contents",
)
class TestAsyncUpload:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -185,9 +187,9 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
upload = await async_client.zero_trust.dlp.datasets.upload.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
assert_matches_type(Optional[Dataset], upload, path=["response"])
@@ -196,9 +198,9 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
assert response.is_closed is True
@@ -211,9 +213,9 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -229,15 +231,15 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
version=0,
+ dataset=b"raw file contents",
account_id="account_id",
dataset_id="",
- body=b"raw file contents",
)
diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py
index cb9b3c2c46c..6fa1f18a4ea 100755
--- a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py
+++ b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py
@@ -82,7 +82,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncVersions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py
index 086fcceba69..844eea1e03f 100755
--- a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py
+++ b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py
@@ -22,10 +22,10 @@ class TestEntries:
def test_method_create(self, client: Cloudflare) -> None:
entry = client.zero_trust.dlp.datasets.versions.entries.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
assert_matches_type(Optional[EntryCreateResponse], entry, path=["response"])
@@ -34,10 +34,10 @@ def test_method_create(self, client: Cloudflare) -> None:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
assert response.is_closed is True
@@ -50,10 +50,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.zero_trust.dlp.datasets.versions.entries.with_streaming_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -69,43 +69,45 @@ def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="",
version=0,
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
class TestAsyncEntries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
entry = await async_client.zero_trust.dlp.datasets.versions.entries.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
assert_matches_type(Optional[EntryCreateResponse], entry, path=["response"])
@@ -114,10 +116,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
assert response.is_closed is True
@@ -130,10 +132,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.dlp.datasets.versions.entries.with_streaming_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -149,26 +151,26 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
await async_client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="",
version=0,
- body=b"raw file contents",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
await async_client.zero_trust.dlp.datasets.versions.entries.with_raw_response.create(
entry_id="",
+ dataset_version_entry=b"raw file contents",
account_id="account_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
version=0,
- body=b"raw file contents",
)
diff --git a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py
index 8c0e9f1aaad..a257b620e2a 100644
--- a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py
+++ b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py
@@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncAccountMapping:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/dlp/email/test_rules.py b/tests/api_resources/zero_trust/dlp/email/test_rules.py
index e09032dad07..199e40dfe70 100644
--- a/tests/api_resources/zero_trust/dlp/email/test_rules.py
+++ b/tests/api_resources/zero_trust/dlp/email/test_rules.py
@@ -422,7 +422,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/entries/__init__.py b/tests/api_resources/zero_trust/dlp/entries/__init__.py
new file mode 100644
index 00000000000..fd8019a9a1a
--- /dev/null
+++ b/tests/api_resources/zero_trust/dlp/entries/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/zero_trust/dlp/entries/test_custom.py b/tests/api_resources/zero_trust/dlp/entries/test_custom.py
new file mode 100644
index 00000000000..8b0f13b9860
--- /dev/null
+++ b/tests/api_resources/zero_trust/dlp/entries/test_custom.py
@@ -0,0 +1,697 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, Optional, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.zero_trust.dlp.entries import (
+ CustomCreateResponse,
+ CustomUpdateResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestCustom:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={
+ "regex": "regex",
+ "validation": "luhn",
+ },
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.custom.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = response.parse()
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.custom.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = response.parse()
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_overload_1(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={
+ "regex": "regex",
+ "validation": "luhn",
+ },
+ type="custom",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_path_params_update_overload_1(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_overload_2(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_path_params_update_overload_2(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ type="predefined",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ type="predefined",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_overload_3(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ def test_path_params_update_overload_3(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ type="integration",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ type="integration",
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ custom = client.zero_trust.dlp.entries.custom.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, custom, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = response.parse()
+ assert_matches_type(object, custom, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.custom.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = response.parse()
+ assert_matches_type(object, custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
+
+
+class TestAsyncCustom:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={
+ "regex": "regex",
+ "validation": "luhn",
+ },
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ name="name",
+ pattern={"regex": "regex"},
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={
+ "regex": "regex",
+ "validation": "luhn",
+ },
+ type="custom",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ name="name",
+ pattern={"regex": "regex"},
+ type="custom",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="predefined",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ type="predefined",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ type="predefined",
+ )
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ enabled=True,
+ )
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ type="integration",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = await response.parse()
+ assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate 422 error in prism test")
+ @parametrize
+ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ type="integration",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ type="integration",
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ custom = await async_client.zero_trust.dlp.entries.custom.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, custom, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ custom = await response.parse()
+ assert_matches_type(object, custom, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ custom = await response.parse()
+ assert_matches_type(object, custom, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.custom.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
diff --git a/tests/api_resources/zero_trust/dlp/entries/test_integration.py b/tests/api_resources/zero_trust/dlp/entries/test_integration.py
new file mode 100644
index 00000000000..8b1aadcb469
--- /dev/null
+++ b/tests/api_resources/zero_trust/dlp/entries/test_integration.py
@@ -0,0 +1,341 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, Optional, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.zero_trust.dlp.entries import (
+ IntegrationCreateResponse,
+ IntegrationUpdateResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestIntegration:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ integration = client.zero_trust.dlp.entries.integration.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ integration = client.zero_trust.dlp.entries.integration.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.integration.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = response.parse()
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.integration.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = response.parse()
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.integration.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Cloudflare) -> None:
+ integration = client.zero_trust.dlp.entries.integration.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = response.parse()
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.integration.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = response.parse()
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ enabled=True,
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ integration = client.zero_trust.dlp.entries.integration.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, integration, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = response.parse()
+ assert_matches_type(object, integration, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.integration.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = response.parse()
+ assert_matches_type(object, integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
+
+
+class TestAsyncIntegration:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ integration = await async_client.zero_trust.dlp.entries.integration.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ integration = await async_client.zero_trust.dlp.entries.integration.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = await response.parse()
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = await response.parse()
+ assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.integration.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
+ integration = await async_client.zero_trust.dlp.entries.integration.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = await response.parse()
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = await response.parse()
+ assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ enabled=True,
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.integration.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ integration = await async_client.zero_trust.dlp.entries.integration.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, integration, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ integration = await response.parse()
+ assert_matches_type(object, integration, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ integration = await response.parse()
+ assert_matches_type(object, integration, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.integration.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
diff --git a/tests/api_resources/zero_trust/dlp/entries/test_predefined.py b/tests/api_resources/zero_trust/dlp/entries/test_predefined.py
new file mode 100644
index 00000000000..66df7764e69
--- /dev/null
+++ b/tests/api_resources/zero_trust/dlp/entries/test_predefined.py
@@ -0,0 +1,341 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, Optional, cast
+
+import pytest
+
+from cloudflare import Cloudflare, AsyncCloudflare
+from tests.utils import assert_matches_type
+from cloudflare.types.zero_trust.dlp.entries import (
+ PredefinedCreateResponse,
+ PredefinedUpdateResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestPredefined:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.entries.predefined.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.entries.predefined.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.predefined.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = response.parse()
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.predefined.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = response.parse()
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.predefined.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.entries.predefined.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = response.parse()
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.predefined.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = response.parse()
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ enabled=True,
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.entries.predefined.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.entries.predefined.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
+
+
+class TestAsyncPredefined:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.entries.predefined.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.entries.predefined.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = await response.parse()
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.create(
+ account_id="account_id",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = await response.parse()
+ assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.predefined.with_raw_response.create(
+ account_id="",
+ enabled=True,
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.entries.predefined.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = await response.parse()
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ enabled=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = await response.parse()
+ assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ enabled=True,
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.predefined.with_raw_response.update(
+ entry_id="",
+ account_id="account_id",
+ enabled=True,
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.entries.predefined.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = await response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = await response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"):
+ await async_client.zero_trust.dlp.entries.predefined.with_raw_response.delete(
+ entry_id="",
+ account_id="account_id",
+ )
diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py
index b2c3d4b3c8c..3cbbf67e3c4 100644
--- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py
+++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py
@@ -308,7 +308,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustom:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py
index 3b8f9b5b28d..85ae091403c 100644
--- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py
+++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py
@@ -17,6 +17,70 @@
class TestPredefined:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.profiles.predefined.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.profiles.predefined.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ai_context_enabled=True,
+ allowed_match_count=5,
+ confidence_threshold="confidence_threshold",
+ context_awareness={
+ "enabled": True,
+ "skip": {"files": True},
+ },
+ entries=[
+ {
+ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "enabled": True,
+ }
+ ],
+ ocr_enabled=True,
+ )
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.profiles.predefined.with_raw_response.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = response.parse()
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.profiles.predefined.with_streaming_response.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = response.parse()
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.profiles.predefined.with_raw_response.create(
+ account_id="",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
predefined = client.zero_trust.dlp.profiles.predefined.update(
@@ -31,7 +95,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="account_id",
ai_context_enabled=True,
- allowed_match_count=0,
+ allowed_match_count=5,
confidence_threshold="confidence_threshold",
context_awareness={
"enabled": True,
@@ -87,6 +151,54 @@ def test_path_params_update(self, client: Cloudflare) -> None:
account_id="account_id",
)
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ predefined = client.zero_trust.dlp.profiles.predefined.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.zero_trust.dlp.profiles.predefined.with_streaming_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
+ client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="",
+ account_id="account_id",
+ )
+
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
predefined = client.zero_trust.dlp.profiles.predefined.get(
@@ -137,7 +249,73 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPredefined:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.profiles.predefined.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.profiles.predefined.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ai_context_enabled=True,
+ allowed_match_count=5,
+ confidence_threshold="confidence_threshold",
+ context_awareness={
+ "enabled": True,
+ "skip": {"files": True},
+ },
+ entries=[
+ {
+ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "enabled": True,
+ }
+ ],
+ ocr_enabled=True,
+ )
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = await response.parse()
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.create(
+ account_id="account_id",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = await response.parse()
+ assert_matches_type(Optional[Profile], predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.create(
+ account_id="",
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@@ -153,7 +331,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="account_id",
ai_context_enabled=True,
- allowed_match_count=0,
+ allowed_match_count=5,
confidence_threshold="confidence_threshold",
context_awareness={
"enabled": True,
@@ -209,6 +387,54 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
account_id="account_id",
)
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ predefined = await async_client.zero_trust.dlp.profiles.predefined.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ predefined = await response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ predefined = await response.parse()
+ assert_matches_type(object, predefined, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
+ await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.delete(
+ profile_id="",
+ account_id="account_id",
+ )
+
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
predefined = await async_client.zero_trust.dlp.profiles.predefined.get(
diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py
index bba64c26030..6c5abd035ac 100644
--- a/tests/api_resources/zero_trust/dlp/test_datasets.py
+++ b/tests/api_resources/zero_trust/dlp/test_datasets.py
@@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDatasets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/test_entries.py b/tests/api_resources/zero_trust/dlp/test_entries.py
index d0a651e7f92..ab3097d2258 100644
--- a/tests/api_resources/zero_trust/dlp/test_entries.py
+++ b/tests/api_resources/zero_trust/dlp/test_entries.py
@@ -446,7 +446,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncEntries:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/test_limits.py b/tests/api_resources/zero_trust/dlp/test_limits.py
index ca7e470cfd6..1b728920c2c 100755
--- a/tests/api_resources/zero_trust/dlp/test_limits.py
+++ b/tests/api_resources/zero_trust/dlp/test_limits.py
@@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncLimits:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/test_patterns.py b/tests/api_resources/zero_trust/dlp/test_patterns.py
index f9bd0319a32..92f8176ec56 100644
--- a/tests/api_resources/zero_trust/dlp/test_patterns.py
+++ b/tests/api_resources/zero_trust/dlp/test_patterns.py
@@ -70,7 +70,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None:
class TestAsyncPatterns:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_validate(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/test_payload_logs.py b/tests/api_resources/zero_trust/dlp/test_payload_logs.py
index 2d9c15c0be9..b868687bae1 100644
--- a/tests/api_resources/zero_trust/dlp/test_payload_logs.py
+++ b/tests/api_resources/zero_trust/dlp/test_payload_logs.py
@@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPayloadLogs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py
index 186567d9299..33177649778 100644
--- a/tests/api_resources/zero_trust/dlp/test_profiles.py
+++ b/tests/api_resources/zero_trust/dlp/test_profiles.py
@@ -114,7 +114,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncProfiles:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py
index b5a8ec58cd0..37b130fd4c0 100644
--- a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py
+++ b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py
@@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomCertificate:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py
index 9fcc52d42a2..5b17241871f 100644
--- a/tests/api_resources/zero_trust/gateway/lists/test_items.py
+++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py
@@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncItems:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_app_types.py b/tests/api_resources/zero_trust/gateway/test_app_types.py
index 166d36defcd..f39d2bdec9c 100644
--- a/tests/api_resources/zero_trust/gateway/test_app_types.py
+++ b/tests/api_resources/zero_trust/gateway/test_app_types.py
@@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncAppTypes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py
index 55ce02105b1..453b20dae93 100644
--- a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py
+++ b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py
@@ -137,7 +137,9 @@ def test_path_params_rotate_seed(self, client: Cloudflare) -> None:
class TestAsyncAuditSSHSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_categories.py b/tests/api_resources/zero_trust/gateway/test_categories.py
index 42d6ae3b4db..f03cd27897c 100644
--- a/tests/api_resources/zero_trust/gateway/test_categories.py
+++ b/tests/api_resources/zero_trust/gateway/test_categories.py
@@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncCategories:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py
index 5cbd3f90415..86e44845741 100644
--- a/tests/api_resources/zero_trust/gateway/test_certificates.py
+++ b/tests/api_resources/zero_trust/gateway/test_certificates.py
@@ -313,7 +313,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py
index 9368b1e530d..afd784449bc 100644
--- a/tests/api_resources/zero_trust/gateway/test_configurations.py
+++ b/tests/api_resources/zero_trust/gateway/test_configurations.py
@@ -45,7 +45,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"support_url": "support_url",
},
},
- "app_control_settings": {"enabled": False},
"block_page": {
"background_color": "background_color",
"enabled": True,
@@ -73,6 +72,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"extended_email_matching": {"enabled": True},
"fips": {"tls": True},
"host_selector": {"enabled": False},
+ "inspection": {"mode": "static"},
"protocol_detection": {"enabled": True},
"sandbox": {
"enabled": True,
@@ -138,7 +138,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"support_url": "support_url",
},
},
- "app_control_settings": {"enabled": False},
"block_page": {
"background_color": "background_color",
"enabled": True,
@@ -166,6 +165,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"extended_email_matching": {"enabled": True},
"fips": {"tls": True},
"host_selector": {"enabled": False},
+ "inspection": {"mode": "static"},
"protocol_detection": {"enabled": True},
"sandbox": {
"enabled": True,
@@ -247,7 +247,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigurations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@@ -273,7 +275,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"support_url": "support_url",
},
},
- "app_control_settings": {"enabled": False},
"block_page": {
"background_color": "background_color",
"enabled": True,
@@ -301,6 +302,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"extended_email_matching": {"enabled": True},
"fips": {"tls": True},
"host_selector": {"enabled": False},
+ "inspection": {"mode": "static"},
"protocol_detection": {"enabled": True},
"sandbox": {
"enabled": True,
@@ -366,7 +368,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"support_url": "support_url",
},
},
- "app_control_settings": {"enabled": False},
"block_page": {
"background_color": "background_color",
"enabled": True,
@@ -394,6 +395,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"extended_email_matching": {"enabled": True},
"fips": {"tls": True},
"host_selector": {"enabled": False},
+ "inspection": {"mode": "static"},
"protocol_detection": {"enabled": True},
"sandbox": {
"enabled": True,
diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py
index 4c81584d3e3..b9e375ba154 100644
--- a/tests/api_resources/zero_trust/gateway/test_lists.py
+++ b/tests/api_resources/zero_trust/gateway/test_lists.py
@@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLists:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py
index 0a629a61f6e..b53c7d4be82 100644
--- a/tests/api_resources/zero_trust/gateway/test_locations.py
+++ b/tests/api_resources/zero_trust/gateway/test_locations.py
@@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLocations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_logging.py b/tests/api_resources/zero_trust/gateway/test_logging.py
index 7c780cb3d9f..b2965923156 100644
--- a/tests/api_resources/zero_trust/gateway/test_logging.py
+++ b/tests/api_resources/zero_trust/gateway/test_logging.py
@@ -117,7 +117,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncLogging:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py
index 4e8f3d0db64..defe1467d67 100644
--- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py
+++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py
@@ -258,7 +258,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncProxyEndpoints:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py
index c5c5073136e..f7da7864799 100644
--- a/tests/api_resources/zero_trust/gateway/test_rules.py
+++ b/tests/api_resources/zero_trust/gateway/test_rules.py
@@ -47,7 +47,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
identity='any(identity.groups.name[*] in {"finance"})',
precedence=0,
rule_settings={
- "add_headers": {"foo": "string"},
+ "add_headers": {
+ "My-Next-Header": ["foo", "bar"],
+ "X-Custom-Header-Name": ["somecustomvalue"],
+ },
"allow_child_bypass": False,
"audit_ssh": {"command_logging": False},
"biso_admin_controls": {
@@ -207,7 +210,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
identity='any(identity.groups.name[*] in {"finance"})',
precedence=0,
rule_settings={
- "add_headers": {"foo": "string"},
+ "add_headers": {
+ "My-Next-Header": ["foo", "bar"],
+ "X-Custom-Header-Name": ["somecustomvalue"],
+ },
"allow_child_bypass": False,
"audit_ssh": {"command_logging": False},
"biso_admin_controls": {
@@ -534,7 +540,9 @@ def test_path_params_reset_expiration(self, client: Cloudflare) -> None:
class TestAsyncRules:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@@ -562,7 +570,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
identity='any(identity.groups.name[*] in {"finance"})',
precedence=0,
rule_settings={
- "add_headers": {"foo": "string"},
+ "add_headers": {
+ "My-Next-Header": ["foo", "bar"],
+ "X-Custom-Header-Name": ["somecustomvalue"],
+ },
"allow_child_bypass": False,
"audit_ssh": {"command_logging": False},
"biso_admin_controls": {
@@ -722,7 +733,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
identity='any(identity.groups.name[*] in {"finance"})',
precedence=0,
rule_settings={
- "add_headers": {"foo": "string"},
+ "add_headers": {
+ "My-Next-Header": ["foo", "bar"],
+ "X-Custom-Header-Name": ["somecustomvalue"],
+ },
"allow_child_bypass": False,
"audit_ssh": {"command_logging": False},
"biso_admin_controls": {
diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py
index 36c7768d104..d02e38c40b4 100644
--- a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py
+++ b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py
@@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncGroups:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py
index 8c2ccc6de8c..3bfcf13c4f5 100644
--- a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py
+++ b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py
@@ -81,7 +81,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncUsers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py
index f171b36a709..57b3495217c 100644
--- a/tests/api_resources/zero_trust/networks/routes/test_ips.py
+++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py
@@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIPs:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py
index ce1e6053a32..465079d2ace 100644
--- a/tests/api_resources/zero_trust/networks/routes/test_networks.py
+++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py
@@ -217,7 +217,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncNetworks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py
index 367f7785d4b..27a5af44aad 100644
--- a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py
+++ b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py
@@ -72,7 +72,9 @@ def test_path_params_update(self, client: Cloudflare) -> None:
class TestAsyncCloudflareSource:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py
index 88876d04d01..8c2f63e0532 100644
--- a/tests/api_resources/zero_trust/networks/test_routes.py
+++ b/tests/api_resources/zero_trust/networks/test_routes.py
@@ -292,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRoutes:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/test_subnets.py b/tests/api_resources/zero_trust/networks/test_subnets.py
index 8e7f03de8e2..e8d64025ff2 100644
--- a/tests/api_resources/zero_trust/networks/test_subnets.py
+++ b/tests/api_resources/zero_trust/networks/test_subnets.py
@@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncSubnets:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py
index b846dfe89ed..554ac67960b 100644
--- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py
+++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py
@@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncVirtualNetworks:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/organizations/test_doh.py b/tests/api_resources/zero_trust/organizations/test_doh.py
index 58ac94ae30a..49e33e57776 100644
--- a/tests/api_resources/zero_trust/organizations/test_doh.py
+++ b/tests/api_resources/zero_trust/organizations/test_doh.py
@@ -104,7 +104,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDOH:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py
index 3e0087721b2..84ee250e1d7 100644
--- a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py
+++ b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py
@@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncReferences:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py
index 1e3527df1cc..3c6ca23a906 100644
--- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py
+++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py
@@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncBehaviours:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py
index 5ec6ae4e5ba..0584e0e27df 100644
--- a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py
+++ b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py
@@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIntegrations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py
index acf625187e5..b4ca1529021 100644
--- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py
+++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py
@@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSummary:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/test_connectivity_settings.py b/tests/api_resources/zero_trust/test_connectivity_settings.py
index 310f4319091..15836a2f91c 100644
--- a/tests/api_resources/zero_trust/test_connectivity_settings.py
+++ b/tests/api_resources/zero_trust/test_connectivity_settings.py
@@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConnectivitySettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py
index b6548ab51ef..fa02515657c 100644
--- a/tests/api_resources/zero_trust/test_devices.py
+++ b/tests/api_resources/zero_trust/test_devices.py
@@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncDevices:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/test_gateway.py b/tests/api_resources/zero_trust/test_gateway.py
index 4f68a4f6c2c..c796464f9e9 100644
--- a/tests/api_resources/zero_trust/test_gateway.py
+++ b/tests/api_resources/zero_trust/test_gateway.py
@@ -95,7 +95,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncGateway:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py
index fc69af496c7..f2e7458d904 100644
--- a/tests/api_resources/zero_trust/test_identity_providers.py
+++ b/tests/api_resources/zero_trust/test_identity_providers.py
@@ -2798,7 +2798,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncIdentityProviders:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py
index e900ad0d293..67c7718fd65 100644
--- a/tests/api_resources/zero_trust/test_organizations.py
+++ b/tests/api_resources/zero_trust/test_organizations.py
@@ -298,7 +298,9 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None:
class TestAsyncOrganizations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py
index 18653b789e8..9a8252864e0 100644
--- a/tests/api_resources/zero_trust/test_risk_scoring.py
+++ b/tests/api_resources/zero_trust/test_risk_scoring.py
@@ -115,7 +115,9 @@ def test_path_params_reset(self, client: Cloudflare) -> None:
class TestAsyncRiskScoring:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/test_seats.py b/tests/api_resources/zero_trust/test_seats.py
index b424abaee04..afd583e5546 100644
--- a/tests/api_resources/zero_trust/test_seats.py
+++ b/tests/api_resources/zero_trust/test_seats.py
@@ -90,7 +90,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
class TestAsyncSeats:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py
index b723b2b3327..eedc25523bc 100644
--- a/tests/api_resources/zero_trust/test_tunnels.py
+++ b/tests/api_resources/zero_trust/test_tunnels.py
@@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None:
class TestAsyncTunnels:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py
index 2aa511ecfd1..0ccbba7e0ed 100644
--- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py
+++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py
@@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConfigurations:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py
index 359c067b8af..76559a92398 100644
--- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py
+++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py
@@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConnections:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py
index a18b48bb4d3..2b3d6203843 100644
--- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py
+++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py
@@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncConnectors:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py
index 366d43ed8eb..60cc2e6707e 100644
--- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py
+++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py
@@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None:
class TestAsyncManagement:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py
index bcd08c85974..afc44019f79 100644
--- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py
+++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncToken:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py
index 95c3ae6b27d..28740d8ed81 100644
--- a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py
+++ b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py
@@ -289,7 +289,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCloudflared:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py
index 593001744cc..dee06560f20 100644
--- a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py
+++ b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py
@@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncWARPConnector:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py
index 998afc6848e..2a2d98cc44d 100644
--- a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py
+++ b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py
@@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncToken:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_activation_check.py b/tests/api_resources/zones/test_activation_check.py
index a78a1d1567b..267737f406d 100644
--- a/tests/api_resources/zones/test_activation_check.py
+++ b/tests/api_resources/zones/test_activation_check.py
@@ -57,7 +57,9 @@ def test_path_params_trigger(self, client: Cloudflare) -> None:
class TestAsyncActivationCheck:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_trigger(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_custom_nameservers.py b/tests/api_resources/zones/test_custom_nameservers.py
index e3c7d509f44..48ba893c07a 100644
--- a/tests/api_resources/zones/test_custom_nameservers.py
+++ b/tests/api_resources/zones/test_custom_nameservers.py
@@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncCustomNameservers:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py
index b34e5066342..70446eb4e59 100644
--- a/tests/api_resources/zones/test_holds.py
+++ b/tests/api_resources/zones/test_holds.py
@@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncHolds:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_plans.py b/tests/api_resources/zones/test_plans.py
index 4cd474090ce..216f4430f91 100644
--- a/tests/api_resources/zones/test_plans.py
+++ b/tests/api_resources/zones/test_plans.py
@@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncPlans:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_rate_plans.py b/tests/api_resources/zones/test_rate_plans.py
index 656e6512dd1..d80b1b53cf1 100644
--- a/tests/api_resources/zones/test_rate_plans.py
+++ b/tests/api_resources/zones/test_rate_plans.py
@@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncRatePlans:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py
index e09e254556c..63985d634a6 100644
--- a/tests/api_resources/zones/test_settings.py
+++ b/tests/api_resources/zones/test_settings.py
@@ -184,7 +184,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSettings:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py
index f99e737ef56..00bd212c993 100644
--- a/tests/api_resources/zones/test_subscriptions.py
+++ b/tests/api_resources/zones/test_subscriptions.py
@@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None:
class TestAsyncSubscriptions:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/conftest.py b/tests/conftest.py
index 9ec5ce03747..4e9cf86222e 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -6,10 +6,12 @@
import logging
from typing import TYPE_CHECKING, Iterator, AsyncIterator
+import httpx
import pytest
from pytest_asyncio import is_async_test
-from cloudflare import Cloudflare, AsyncCloudflare
+from cloudflare import Cloudflare, AsyncCloudflare, DefaultAioHttpClient
+from cloudflare._utils import is_dict
if TYPE_CHECKING:
from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage]
@@ -27,6 +29,19 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None:
for async_test in pytest_asyncio_tests:
async_test.add_marker(session_scope_marker, append=False)
+ # We skip tests that use both the aiohttp client and respx_mock as respx_mock
+ # doesn't support custom transports.
+ for item in items:
+ if "async_client" not in item.fixturenames or "respx_mock" not in item.fixturenames:
+ continue
+
+ if not hasattr(item, "callspec"):
+ continue
+
+ async_client_param = item.callspec.params.get("async_client")
+ if is_dict(async_client_param) and async_client_param.get("http_client") == "aiohttp":
+ item.add_marker(pytest.mark.skip(reason="aiohttp client is not compatible with respx_mock"))
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -48,11 +63,29 @@ def client(request: FixtureRequest) -> Iterator[Cloudflare]:
@pytest.fixture(scope="session")
async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncCloudflare]:
- strict = getattr(request, "param", True)
- if not isinstance(strict, bool):
- raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}")
+ param = getattr(request, "param", True)
+
+ # defaults
+ strict = True
+ http_client: None | httpx.AsyncClient = None
+
+ if isinstance(param, bool):
+ strict = param
+ elif is_dict(param):
+ strict = param.get("strict", True)
+ assert isinstance(strict, bool)
+
+ http_client_type = param.get("http_client", "httpx")
+ if http_client_type == "aiohttp":
+ http_client = DefaultAioHttpClient()
+ else:
+ raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict")
async with AsyncCloudflare(
- base_url=base_url, api_key=api_key, api_email=api_email, _strict_response_validation=strict
+ base_url=base_url,
+ api_key=api_key,
+ api_email=api_email,
+ _strict_response_validation=strict,
+ http_client=http_client,
) as client:
yield client
diff --git a/tests/test_client.py b/tests/test_client.py
index 71aea28019c..ec0f1378fee 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -23,9 +23,7 @@
from cloudflare import Cloudflare, AsyncCloudflare, APIResponseValidationError
from cloudflare._types import Omit
-from cloudflare._utils import maybe_transform
from cloudflare._models import BaseModel, FinalRequestOptions
-from cloudflare._constants import RAW_RESPONSE_HEADER
from cloudflare._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError
from cloudflare._base_client import (
DEFAULT_TIMEOUT,
@@ -35,7 +33,6 @@
DefaultAsyncHttpxClient,
make_request_options,
)
-from cloudflare.types.zones.zone_create_params import ZoneCreateParams
from .utils import update_env
@@ -207,6 +204,7 @@ def test_copy_signature(self) -> None:
copy_param = copy_signature.parameters.get(name)
assert copy_param is not None, f"copy() signature is missing the {name} param"
+ @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12")
def test_copy_build_request(self) -> None:
options = FinalRequestOptions(method="get", url="/foo")
@@ -523,7 +521,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, client: Cloudflare) -> None:
request = client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
@@ -893,44 +891,21 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str
@mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
@pytest.mark.respx(base_url=base_url)
- def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
+ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None:
respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error"))
with pytest.raises(APITimeoutError):
- self.client.post(
- "/zones",
- body=cast(
- object,
- maybe_transform(
- dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"),
- ZoneCreateParams,
- ),
- ),
- cast_to=httpx.Response,
- options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
- )
+ client.zones.with_streaming_response.create(account={}, name="example.com").__enter__()
assert _get_open_connections(self.client) == 0
@mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
@pytest.mark.respx(base_url=base_url)
- def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
+ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None:
respx_mock.post("/zones").mock(return_value=httpx.Response(500))
with pytest.raises(APIStatusError):
- self.client.post(
- "/zones",
- body=cast(
- object,
- maybe_transform(
- dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"),
- ZoneCreateParams,
- ),
- ),
- cast_to=httpx.Response,
- options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
- )
-
+ client.zones.with_streaming_response.create(account={}, name="example.com").__enter__()
assert _get_open_connections(self.client) == 0
@pytest.mark.parametrize("failures_before_success", [0, 2, 4])
@@ -1211,6 +1186,7 @@ def test_copy_signature(self) -> None:
copy_param = copy_signature.parameters.get(name)
assert copy_param is not None, f"copy() signature is missing the {name} param"
+ @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12")
def test_copy_build_request(self) -> None:
options = FinalRequestOptions(method="get", url="/foo")
@@ -1529,7 +1505,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, async_client: AsyncCloudflare) -> None:
request = async_client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
@@ -1821,44 +1797,25 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte
@mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
@pytest.mark.respx(base_url=base_url)
- async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
+ async def test_retrying_timeout_errors_doesnt_leak(
+ self, respx_mock: MockRouter, async_client: AsyncCloudflare
+ ) -> None:
respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error"))
with pytest.raises(APITimeoutError):
- await self.client.post(
- "/zones",
- body=cast(
- object,
- maybe_transform(
- dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"),
- ZoneCreateParams,
- ),
- ),
- cast_to=httpx.Response,
- options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
- )
+ await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__()
assert _get_open_connections(self.client) == 0
@mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
@pytest.mark.respx(base_url=base_url)
- async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
+ async def test_retrying_status_errors_doesnt_leak(
+ self, respx_mock: MockRouter, async_client: AsyncCloudflare
+ ) -> None:
respx_mock.post("/zones").mock(return_value=httpx.Response(500))
with pytest.raises(APIStatusError):
- await self.client.post(
- "/zones",
- body=cast(
- object,
- maybe_transform(
- dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"),
- ZoneCreateParams,
- ),
- ),
- cast_to=httpx.Response,
- options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
- )
-
+ await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__()
assert _get_open_connections(self.client) == 0
@pytest.mark.parametrize("failures_before_success", [0, 2, 4])
diff --git a/tests/test_models.py b/tests/test_models.py
index 62aff02359d..a35be11534d 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -1,5 +1,5 @@
import json
-from typing import Any, Dict, List, Union, Optional, cast
+from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast
from datetime import datetime, timezone
from typing_extensions import Literal, Annotated, TypeAliasType
@@ -889,3 +889,75 @@ class ModelB(BaseModel):
)
assert isinstance(m, ModelB)
+
+
+def test_nested_discriminated_union() -> None:
+ class InnerType1(BaseModel):
+ type: Literal["type_1"]
+
+ class InnerModel(BaseModel):
+ inner_value: str
+
+ class InnerType2(BaseModel):
+ type: Literal["type_2"]
+ some_inner_model: InnerModel
+
+ class Type1(BaseModel):
+ base_type: Literal["base_type_1"]
+ value: Annotated[
+ Union[
+ InnerType1,
+ InnerType2,
+ ],
+ PropertyInfo(discriminator="type"),
+ ]
+
+ class Type2(BaseModel):
+ base_type: Literal["base_type_2"]
+
+ T = Annotated[
+ Union[
+ Type1,
+ Type2,
+ ],
+ PropertyInfo(discriminator="base_type"),
+ ]
+
+ model = construct_type(
+ type_=T,
+ value={
+ "base_type": "base_type_1",
+ "value": {
+ "type": "type_2",
+ },
+ },
+ )
+ assert isinstance(model, Type1)
+ assert isinstance(model.value, InnerType2)
+
+
+@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now")
+def test_extra_properties() -> None:
+ class Item(BaseModel):
+ prop: int
+
+ class Model(BaseModel):
+ __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ other: str
+
+ if TYPE_CHECKING:
+
+ def __getattr__(self, attr: str) -> Item: ...
+
+ model = construct_type(
+ type_=Model,
+ value={
+ "a": {"prop": 1},
+ "other": "foo",
+ },
+ )
+ assert isinstance(model, Model)
+ assert model.a.prop == 1
+ assert isinstance(model.a, Item)
+ assert model.other == "foo"