diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 16cf8465fca..000aebe6c2d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -97,7 +97,6 @@ jobs:
run: ./scripts/bootstrap
- name: Run tests
- continue-on-error: true
run: ./scripts/test
env:
UV_PYTHON: ">=3.9.0"
@@ -105,7 +104,6 @@ jobs:
examples:
timeout-minutes: 10
name: examples
- continue-on-error: true
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml
index d52da5d5f55..3a4894a9f32 100644
--- a/.github/workflows/detect-breaking-changes.yml
+++ b/.github/workflows/detect-breaking-changes.yml
@@ -9,6 +9,7 @@ jobs:
detect_breaking_changes:
runs-on: 'ubuntu-latest'
name: detect-breaking-changes
+ if: false
permissions:
contents: read
steps:
@@ -28,12 +29,10 @@ jobs:
- name: Install dependencies
run: uv sync --all-extras
- name: Detect removed symbols
- continue-on-error: true
run: |
uv run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}"
- name: Detect breaking changes
- continue-on-error: true
run: |
# Try to check out previous versions of the breaking change detection script. This ensures that
# we still detect breaking changes when entire files and their tests are removed.
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
index 8631c071446..5d3e356c4f2 100644
--- a/.github/workflows/publish-pypi.yml
+++ b/.github/workflows/publish-pypi.yml
@@ -11,8 +11,6 @@ on:
jobs:
publish:
name: publish
- permissions:
- contents: read
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index 2966355f4f3..41be236b980 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -13,8 +13,6 @@ concurrency:
jobs:
release_doctor:
name: release doctor
- permissions:
- contents: read
runs-on: ubuntu-latest
timeout-minutes: 2
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
index b7edd0d6ad7..4fdad87e311 100644
--- a/.github/workflows/semgrep.yml
+++ b/.github/workflows/semgrep.yml
@@ -6,8 +6,6 @@ name: Semgrep config
jobs:
semgrep:
name: semgrep/ci
- permissions:
- contents: read
runs-on: ubuntu-latest
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml
index d5102f68719..883eebba725 100644
--- a/.github/workflows/sync-labels.yml
+++ b/.github/workflows/sync-labels.yml
@@ -8,8 +8,6 @@ on:
- .github/labels.yml
jobs:
build:
- permissions:
- issues: write # action-label-syncer creates/updates repo labels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b29b3b64d1d..2c9fce78b18 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "5.2.0"
+ ".": "5.0.0-beta.2"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 2ce5fc6a7a9..0b4fa52a51f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 2277
+configured_endpoints: 2284
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
-openapi_spec_hash: c0d553c22ef1e807dd815f71023050f4
-config_hash: 245f966442f3af14c23b79cbfdf06161
+openapi_spec_hash: 26772c26b37d468fb9752aa22ea815b9
+config_hash: 873a029df6d61c21b0ec8b6da9e67ce4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 039de814780..76f06d9abbc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,216 +1,5 @@
# Changelog
-## 5.2.0 (2026-05-21)
-
-Full Changelog: [v5.1.0...v5.2.0](https://github.com/cloudflare/cloudflare-python/compare/v5.1.0...v5.2.0)
-
-### Features
-
-* **ai_gateway:** update generated types and methods ([4923bbb](https://github.com/cloudflare/cloudflare-python/commit/4923bbb97bb42db7e8a6ae54cfa29d2e5bd99d47))
-* **ai_security:** add ai_security resource ([29cb585](https://github.com/cloudflare/cloudflare-python/commit/29cb58506942df30e0cb087f2d7f211a53360d05))
-* **cache:** update generated types and methods ([b7ae845](https://github.com/cloudflare/cloudflare-python/commit/b7ae845ad230f7db0aebfa30f84e6c7c0266278d))
-* **ddos_protection:** add ddos_protection resource ([87f7e95](https://github.com/cloudflare/cloudflare-python/commit/87f7e95e47142d94642fa3ae865559b6c3af989b))
-* **load_balancers:** update generated types and methods ([bb6815d](https://github.com/cloudflare/cloudflare-python/commit/bb6815d0212081da8f2e0e834d6d30e5fce78c41))
-* **r2:** update generated types and methods ([72d2149](https://github.com/cloudflare/cloudflare-python/commit/72d2149e5b7905c4caf266dbefffa626eb4c2d13))
-* **radar:** update generated types and methods ([fb2f0c4](https://github.com/cloudflare/cloudflare-python/commit/fb2f0c41d93bf66b8fff170e460ab79d19fc9fbb))
-* **secrets_store:** update generated types and methods ([636414f](https://github.com/cloudflare/cloudflare-python/commit/636414fc201aba49dc31e544f024a67a1e7b5082))
-* **workers_for_platforms:** update generated types and methods ([7bfed3c](https://github.com/cloudflare/cloudflare-python/commit/7bfed3ced962e765b884e68ae4c1c48e56e1b6b5))
-* **workers:** update generated types and methods ([0bdb685](https://github.com/cloudflare/cloudflare-python/commit/0bdb6858af43a110a91a5d770b69367aca922117))
-* **zero_trust:** update generated types and methods ([aeff7d5](https://github.com/cloudflare/cloudflare-python/commit/aeff7d56432a1f6844b310f9ce7fca9ac09da5e5))
-
-
-### Chores
-
-* **acm:** update generated types and methods ([8b03b3d](https://github.com/cloudflare/cloudflare-python/commit/8b03b3dc081c0fa7cf6bbaca188927379c418b93))
-* **ai:** update generated types and methods ([2f6bdf7](https://github.com/cloudflare/cloudflare-python/commit/2f6bdf7476969dad83fe85c0ae493d7b3f4fa58c))
-* **api_gateway:** update generated types and methods ([5b79a34](https://github.com/cloudflare/cloudflare-python/commit/5b79a34891fe355456e1decebcf462ac1e171ff5))
-* **cloudforce_one:** update generated types and methods ([fc72368](https://github.com/cloudflare/cloudflare-python/commit/fc723685b90eafb8a2f232c72e6f03dd4ad2f823))
-* **d1:** update generated types and methods ([6a05b68](https://github.com/cloudflare/cloudflare-python/commit/6a05b682b6b8a3d1bc64440de52a17d4e8df9034))
-* **email_security:** update generated types and methods ([c89d1ce](https://github.com/cloudflare/cloudflare-python/commit/c89d1ceeb880ff26c06707731b17e4f2e7041b3d))
-* **intel:** update generated types and methods ([b097e5d](https://github.com/cloudflare/cloudflare-python/commit/b097e5d93a5a3c2626088a2132d75625755c2141))
-* **logpush:** update generated types and methods ([f26713b](https://github.com/cloudflare/cloudflare-python/commit/f26713be3354fc403b062b15d0c191fadec283d0))
-* **resource_sharing:** update generated types and methods ([792bf24](https://github.com/cloudflare/cloudflare-python/commit/792bf248ba72dfc93e5bc4b79734475ece24d52b))
-* restore version ([9f99d4b](https://github.com/cloudflare/cloudflare-python/commit/9f99d4b9d86612713073afd9144de0512df6442b))
-* sync shared codegen files from staging-next ([fbb556c](https://github.com/cloudflare/cloudflare-python/commit/fbb556c19cb25f308ba43c94959c669b772f6663))
-
-## 5.1.0 (2026-05-06)
-
-Full Changelog: [v5.0.0...v5.1.0](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0...v5.1.0)
-
-### Features
-
-* **security_center:** add `audit_logs`, `classification`, and `context` sub-resources to insights ([ed7d261](https://github.com/cloudflare/cloudflare-python/commit/ed7d261e6))
-* **zero_trust:** add `deployment_groups` sub-resource to devices ([7121a55](https://github.com/cloudflare/cloudflare-python/commit/7121a55d3))
-* **aisearch:** update generated types and methods ([54b87759](https://github.com/cloudflare/cloudflare-python/commit/54b87759b))
-* **email_security:** update generated types and methods ([23a979df](https://github.com/cloudflare/cloudflare-python/commit/23a979df2))
-* **radar:** update generated types and methods ([b48274ef](https://github.com/cloudflare/cloudflare-python/commit/b48274ef7))
-* **zones:** update generated types and methods ([f0a54099](https://github.com/cloudflare/cloudflare-python/commit/f0a540997))
-
-#### Security Center - New Insights Sub-Resources
-
-**AuditLogs** (`client.security_center.insights.audit_logs`)
-
-- `list(*, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListResponse]`
-- `list_by_insight(issue_id, *, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListByInsightResponse]`
-
-New types:
-```python
-from cloudflare.types.security_center.insights import (
- AuditLogListResponse,
- AuditLogListByInsightResponse,
-)
-```
-
-**Classification** (`client.security_center.insights.classification`)
-
-- `update(issue_id, *, account_id, zone_id, **params) -> ClassificationUpdateResponse`
-
-New types:
-```python
-from cloudflare.types.security_center.insights import ClassificationUpdateResponse
-```
-
-**Context** (`client.security_center.insights.context`)
-
-- `get(issue_id, *, account_id) -> Optional[ContextGetResponse]`
-
-New types:
-```python
-from cloudflare.types.security_center.insights import ContextGetResponse
-```
-
-#### Zero Trust - Device Deployment Groups
-
-New sub-resource `client.zero_trust.devices.deployment_groups`:
-
-- `create(*, account_id, **params) -> DeploymentGroup`
-- `list(*, account_id, **params) -> SyncV4PagePaginationArray[DeploymentGroup]`
-- `delete(group_id, *, account_id) -> DeploymentGroupDeleteResponse`
-- `edit(group_id, *, account_id, **params) -> DeploymentGroup`
-- `get(group_id, *, account_id) -> DeploymentGroup`
-
-New types:
-```python
-from cloudflare.types.zero_trust.devices import DeploymentGroup, DeploymentGroupDeleteResponse
-```
-
-## 5.0.0 (2026-04-30)
-
-Full Changelog: [v4.3.1...v5.0.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0)
-
-This is a major release of the Cloudflare Python SDK. It drops support for
-Python 3.8, adds 11 new API services, introduces optional aiohttp backend
-support for improved async concurrency, and includes hundreds of type and
-method updates across the entire API surface.
-
-Please review the breaking changes below before upgrading. A migration guide
-is available at [docs/migration-guides/v5.0.0-migration-guide.md](./docs/migration-guides/v5.0.0-migration-guide.md).
-
----
-
-#### Breaking Changes
-
-- **Python 3.8 is no longer supported.** The minimum required version is now Python 3.9. ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
-- **`typing-extensions` minimum version bumped** from `>=4.10` to `>=4.14`.
-
-Additionally, the following resources have breaking changes:
-
-- `abusereports`
-- `acm.totaltls`
-- `apigateway.configurations`
-- `cloudforceone.threatevents`
-- `d1.database`
-- `intel.indicatorfeeds`
-- `logpush.edge`
-- `origintlsclientauth.hostnames`
-- `queues.consumers`
-- `radar.bgp`
-- `rulesets.rules`
-- `schemavalidation.schemas`
-- `snippets`
-- `zerotrust.dlp`
-- `zerotrust.networks`
-
-See the [v5.0.0 Migration Guide](./docs/migration-guides/v5.0.0-migration-guide.md) for upgrade instructions and resource-specific guidance.
-
----
-
-#### Features
-
-* **aiohttp backend support:** The async client now supports an optional `aiohttp` HTTP backend for improved concurrency performance. Install with `pip install cloudflare[aiohttp]` and use `DefaultAioHttpClient()` as the `http_client` parameter.
-* **Python 3.13 and 3.14 support** added as tested classifiers.
-
-##### New Services
-
-The following top-level resources are new in this release:
-
-* **AISearch** (`aisearch`): AI-powered search capabilities
-* **Connectivity** (`connectivity`): Connectivity testing and diagnostics
-* **EmailSending** (`email_sending`): Email send and send_raw endpoints
-* **Fraud** (`fraud`): Fraud detection and prevention
-* **GoogleTagGateway** (`google_tag_gateway`): Google Tag Gateway management
-* **Organizations** (`organizations`): Organization audit logs and management
-* **R2DataCatalog** (`r2_data_catalog`): R2 Data Catalog operations
-* **RealtimeKit** (`realtime_kit`): Realtime communication (Calls/TURN)
-* **ResourceTagging** (`resource_tagging`): Resource tagging and labeling
-* **TokenValidation** (`token_validation`): Token validation configuration and rules
-* **VulnerabilityScanner** (`vulnerability_scanner`): Vulnerability scanning, credential sets, and target environments
-
-##### New Endpoints on Existing Services
-
-* **accounts:** update generated types and methods
-* **api_gateway:** add labels endpoints (WAM-1196)
-* **billing:** add billable usage PayGo endpoint
-* **brand_protection:** add v2 endpoints
-* **browser_rendering:** add devtools methods (BRAPI-1051)
-* **cache:** add origin cloud regions resource
-* **custom_origin_trust_store:** enable custom origin trust store
-* **dns:** add dns_records/usage endpoints (DNS-12466)
-* **email_security:** add phishguard reports endpoint
-* **iam:** add user_groups and user_group_members resources
-* **radar:** add Botnet Threat Feed and Post-Quantum endpoints
-* **workers:** add Observability Destinations resources (WO-989)
-* **zero_trust:** add Access Users endpoint (AUTH-7071), DEX rules, Device IP Profile, Device Subnet, WARP Connector connections and failover endpoints, WARP Subnet endpoints, Gateway PAC files (GIN-1439)
-* **zones:** add zone environments endpoints
-
-##### Updated Services
-
-Nearly every existing service received type and method updates through
-composite API spec refreshes. Notable updates include:
-
-* **email_security:** remove deprecated type definitions
-* **radar:** restructured to use per-resource api.md sub-files (no client path changes)
-* **workers_for_platforms:** update generated types
-* **r2:** update generated types
-* **fraud:** update generated types and methods
-
-
-#### Bug Fixes
-
-* **_models:** add `polymorphic_serialization` parameter to `model_dump` overrides ([342b5a8](https://github.com/cloudflare/cloudflare-python/commit/342b5a84daaf5c09e3e1612809d956d916a43621))
-* **pipelines:** add `BaseModel` base to response `SchemaFieldStruct`/`SchemaFieldList` stubs ([d33af8b](https://github.com/cloudflare/cloudflare-python/commit/d33af8b5d5c1705fde4ae73efdbe3bfe3ba321df))
-* **dlp:** add missing `model_rebuild`/`update_forward_refs` for `SharedEntryCustomEntry` classes ([25ec10c](https://github.com/cloudflare/cloudflare-python/commit/25ec10c814d138f8dea08a79f9984b70abb58477))
-* **workers:** make `RunQueryParametersNeedleValue` a `BaseModel` with `arbitrary_types_allowed` ([6b7efbc](https://github.com/cloudflare/cloudflare-python/commit/6b7efbc51e6189ba18225c57637015f050060683))
-* **stream:** remove duplicate `notification_url` field in webhook response types ([fc9fb2f](https://github.com/cloudflare/cloudflare-python/commit/fc9fb2f895c5de968f67c62bb599a6792be9fa8f))
-* resolve pre-existing codegen type errors ([fed88d6](https://github.com/cloudflare/cloudflare-python/commit/fed88d6c5a5e482a9de595a1431915320fa11d23))
-* **radar:** fix `type: ignore[call-arg]` placement for mypy compatibility ([fac9404](https://github.com/cloudflare/cloudflare-python/commit/fac9404ebfa1eb5383a3d3c54f49e4120eb8cd11))
-* fix broken reference for the queues `consumer` model ([3f5cf39](https://github.com/cloudflare/cloudflare-python/commit/3f5cf39405b6b38fc594ce348d93a6e7da92c276))
-
-
-#### Chores
-
-* **build:** migrate from rye to uv for project management ([2f283c2](https://github.com/cloudflare/cloudflare-python/commit/2f283c29584b49e7c000f5e04aa5edc62db36ab9))
-* **ci:** pin single Python version and pydantic v2 for test runs ([86676bc](https://github.com/cloudflare/cloudflare-python/commit/86676bca670d38d5947041bc5677138640dd6d92))
-* **typing:** add mypy configuration with strict mode ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
-* **api:** 80+ composite API spec updates across the release cycle
-
-
-#### Documentation
-
-* add Authentication section to README ([70d934a](https://github.com/cloudflare/cloudflare-python/commit/70d934abd91cfa8f8444e0651ac97012c1d0edcf))
-* add aiohttp backend usage instructions to README
-* add MCP server integration badges (Cursor, VS Code)
-
## 5.0.0-beta.2 (2026-04-20)
Full Changelog: [v5.0.0-beta.1...v5.0.0-beta.2](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0-beta.1...v5.0.0-beta.2)
diff --git a/README.md b/README.md
index f5c382875fc..6b81dde75a4 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ The REST API documentation can be found on [developers.cloudflare.com](https://d
```sh
# install from PyPI
-pip install cloudflare
+pip install --pre cloudflare
```
## Usage
@@ -90,7 +90,7 @@ You can enable this by installing `aiohttp`:
```sh
# install from PyPI
-pip install cloudflare[aiohttp]
+pip install --pre cloudflare[aiohttp]
```
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
diff --git a/api.md b/api.md
index 1ec8327b574..56fe1491c45 100644
--- a/api.md
+++ b/api.md
@@ -117,6 +117,8 @@ from cloudflare.types import (
# [Addressing](src/cloudflare/resources/addressing/api.md)
+# [DLS](src/cloudflare/resources/dls/api.md)
+
# [AuditLogs](src/cloudflare/resources/audit_logs/api.md)
# [Billing](src/cloudflare/resources/billing/api.md)
diff --git a/pyproject.toml b/pyproject.toml
index e82a503ac6f..a79b693633d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
-version = "5.2.0"
+version = "5.0.0-beta.2"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index 5fd56334cd3..29b035563b7 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -39,6 +39,7 @@
kv,
r2,
acm,
+ dls,
dns,
iam,
ips,
@@ -148,6 +149,7 @@
from .resources.kv.kv import KVResource, AsyncKVResource
from .resources.r2.r2 import R2Resource, AsyncR2Resource
from .resources.acm.acm import ACMResource, AsyncACMResource
+ from .resources.dls.dls import DLSResource, AsyncDLSResource
from .resources.dns.dns import DNSResource, AsyncDNSResource
from .resources.iam.iam import IAMResource, AsyncIAMResource
from .resources.ips.ips import IPsResource, AsyncIPsResource
@@ -651,6 +653,12 @@ def addressing(self) -> AddressingResource:
return AddressingResource(self)
+ @cached_property
+ def dls(self) -> DLSResource:
+ from .resources.dls import DLSResource
+
+ return DLSResource(self)
+
@cached_property
def audit_logs(self) -> AuditLogsResource:
from .resources.audit_logs import AuditLogsResource
@@ -1553,6 +1561,12 @@ def addressing(self) -> AsyncAddressingResource:
return AsyncAddressingResource(self)
+ @cached_property
+ def dls(self) -> AsyncDLSResource:
+ from .resources.dls import AsyncDLSResource
+
+ return AsyncDLSResource(self)
+
@cached_property
def audit_logs(self) -> AsyncAuditLogsResource:
from .resources.audit_logs import AsyncAuditLogsResource
@@ -2383,6 +2397,12 @@ def addressing(self) -> addressing.AddressingResourceWithRawResponse:
return AddressingResourceWithRawResponse(self._client.addressing)
+ @cached_property
+ def dls(self) -> dls.DLSResourceWithRawResponse:
+ from .resources.dls import DLSResourceWithRawResponse
+
+ return DLSResourceWithRawResponse(self._client.dls)
+
@cached_property
def audit_logs(self) -> audit_logs.AuditLogsResourceWithRawResponse:
from .resources.audit_logs import AuditLogsResourceWithRawResponse
@@ -3040,6 +3060,12 @@ def addressing(self) -> addressing.AsyncAddressingResourceWithRawResponse:
return AsyncAddressingResourceWithRawResponse(self._client.addressing)
+ @cached_property
+ def dls(self) -> dls.AsyncDLSResourceWithRawResponse:
+ from .resources.dls import AsyncDLSResourceWithRawResponse
+
+ return AsyncDLSResourceWithRawResponse(self._client.dls)
+
@cached_property
def audit_logs(self) -> audit_logs.AsyncAuditLogsResourceWithRawResponse:
from .resources.audit_logs import AsyncAuditLogsResourceWithRawResponse
@@ -3697,6 +3723,12 @@ def addressing(self) -> addressing.AddressingResourceWithStreamingResponse:
return AddressingResourceWithStreamingResponse(self._client.addressing)
+ @cached_property
+ def dls(self) -> dls.DLSResourceWithStreamingResponse:
+ from .resources.dls import DLSResourceWithStreamingResponse
+
+ return DLSResourceWithStreamingResponse(self._client.dls)
+
@cached_property
def audit_logs(self) -> audit_logs.AuditLogsResourceWithStreamingResponse:
from .resources.audit_logs import AuditLogsResourceWithStreamingResponse
@@ -4356,6 +4388,12 @@ def addressing(self) -> addressing.AsyncAddressingResourceWithStreamingResponse:
return AsyncAddressingResourceWithStreamingResponse(self._client.addressing)
+ @cached_property
+ def dls(self) -> dls.AsyncDLSResourceWithStreamingResponse:
+ from .resources.dls import AsyncDLSResourceWithStreamingResponse
+
+ return AsyncDLSResourceWithStreamingResponse(self._client.dls)
+
@cached_property
def audit_logs(self) -> audit_logs.AsyncAuditLogsResourceWithStreamingResponse:
from .resources.audit_logs import AsyncAuditLogsResourceWithStreamingResponse
diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py
index 465d42d86ea..f204e83c6ac 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__ = "5.2.0" # x-release-please-version
+__version__ = "5.0.0-beta.2" # x-release-please-version
diff --git a/src/cloudflare/resources/addressing/__init__.py b/src/cloudflare/resources/addressing/__init__.py
index 7abbb395744..662ac0127d3 100644
--- a/src/cloudflare/resources/addressing/__init__.py
+++ b/src/cloudflare/resources/addressing/__init__.py
@@ -40,22 +40,8 @@
LOADocumentsResourceWithStreamingResponse,
AsyncLOADocumentsResourceWithStreamingResponse,
)
-from .regional_hostnames import (
- RegionalHostnamesResource,
- AsyncRegionalHostnamesResource,
- RegionalHostnamesResourceWithRawResponse,
- AsyncRegionalHostnamesResourceWithRawResponse,
- RegionalHostnamesResourceWithStreamingResponse,
- AsyncRegionalHostnamesResourceWithStreamingResponse,
-)
__all__ = [
- "RegionalHostnamesResource",
- "AsyncRegionalHostnamesResource",
- "RegionalHostnamesResourceWithRawResponse",
- "AsyncRegionalHostnamesResourceWithRawResponse",
- "RegionalHostnamesResourceWithStreamingResponse",
- "AsyncRegionalHostnamesResourceWithStreamingResponse",
"ServicesResource",
"AsyncServicesResource",
"ServicesResourceWithRawResponse",
diff --git a/src/cloudflare/resources/addressing/addressing.py b/src/cloudflare/resources/addressing/addressing.py
index 2ddc2d78362..0acf8ff9b20 100644
--- a/src/cloudflare/resources/addressing/addressing.py
+++ b/src/cloudflare/resources/addressing/addressing.py
@@ -36,23 +36,11 @@
AddressMapsResourceWithStreamingResponse,
AsyncAddressMapsResourceWithStreamingResponse,
)
-from .regional_hostnames.regional_hostnames import (
- RegionalHostnamesResource,
- AsyncRegionalHostnamesResource,
- RegionalHostnamesResourceWithRawResponse,
- AsyncRegionalHostnamesResourceWithRawResponse,
- RegionalHostnamesResourceWithStreamingResponse,
- AsyncRegionalHostnamesResourceWithStreamingResponse,
-)
__all__ = ["AddressingResource", "AsyncAddressingResource"]
class AddressingResource(SyncAPIResource):
- @cached_property
- def regional_hostnames(self) -> RegionalHostnamesResource:
- return RegionalHostnamesResource(self._client)
-
@cached_property
def services(self) -> ServicesResource:
return ServicesResource(self._client)
@@ -90,10 +78,6 @@ def with_streaming_response(self) -> AddressingResourceWithStreamingResponse:
class AsyncAddressingResource(AsyncAPIResource):
- @cached_property
- def regional_hostnames(self) -> AsyncRegionalHostnamesResource:
- return AsyncRegionalHostnamesResource(self._client)
-
@cached_property
def services(self) -> AsyncServicesResource:
return AsyncServicesResource(self._client)
@@ -134,10 +118,6 @@ class AddressingResourceWithRawResponse:
def __init__(self, addressing: AddressingResource) -> None:
self._addressing = addressing
- @cached_property
- def regional_hostnames(self) -> RegionalHostnamesResourceWithRawResponse:
- return RegionalHostnamesResourceWithRawResponse(self._addressing.regional_hostnames)
-
@cached_property
def services(self) -> ServicesResourceWithRawResponse:
return ServicesResourceWithRawResponse(self._addressing.services)
@@ -159,10 +139,6 @@ class AsyncAddressingResourceWithRawResponse:
def __init__(self, addressing: AsyncAddressingResource) -> None:
self._addressing = addressing
- @cached_property
- def regional_hostnames(self) -> AsyncRegionalHostnamesResourceWithRawResponse:
- return AsyncRegionalHostnamesResourceWithRawResponse(self._addressing.regional_hostnames)
-
@cached_property
def services(self) -> AsyncServicesResourceWithRawResponse:
return AsyncServicesResourceWithRawResponse(self._addressing.services)
@@ -184,10 +160,6 @@ class AddressingResourceWithStreamingResponse:
def __init__(self, addressing: AddressingResource) -> None:
self._addressing = addressing
- @cached_property
- def regional_hostnames(self) -> RegionalHostnamesResourceWithStreamingResponse:
- return RegionalHostnamesResourceWithStreamingResponse(self._addressing.regional_hostnames)
-
@cached_property
def services(self) -> ServicesResourceWithStreamingResponse:
return ServicesResourceWithStreamingResponse(self._addressing.services)
@@ -209,10 +181,6 @@ class AsyncAddressingResourceWithStreamingResponse:
def __init__(self, addressing: AsyncAddressingResource) -> None:
self._addressing = addressing
- @cached_property
- def regional_hostnames(self) -> AsyncRegionalHostnamesResourceWithStreamingResponse:
- return AsyncRegionalHostnamesResourceWithStreamingResponse(self._addressing.regional_hostnames)
-
@cached_property
def services(self) -> AsyncServicesResourceWithStreamingResponse:
return AsyncServicesResourceWithStreamingResponse(self._addressing.services)
diff --git a/src/cloudflare/resources/addressing/api.md b/src/cloudflare/resources/addressing/api.md
index 0e7c10008bd..12fed5eee5d 100644
--- a/src/cloudflare/resources/addressing/api.md
+++ b/src/cloudflare/resources/addressing/api.md
@@ -1,39 +1,5 @@
# Addressing
-## RegionalHostnames
-
-Types:
-
-```python
-from cloudflare.types.addressing import (
- RegionalHostnameCreateResponse,
- RegionalHostnameListResponse,
- RegionalHostnameDeleteResponse,
- RegionalHostnameEditResponse,
- RegionalHostnameGetResponse,
-)
-```
-
-Methods:
-
-- client.addressing.regional_hostnames.create(\*, zone_id, \*\*params) -> Optional[RegionalHostnameCreateResponse]
-- client.addressing.regional_hostnames.list(\*, zone_id) -> SyncSinglePage[RegionalHostnameListResponse]
-- client.addressing.regional_hostnames.delete(hostname, \*, zone_id) -> RegionalHostnameDeleteResponse
-- client.addressing.regional_hostnames.edit(hostname, \*, zone_id, \*\*params) -> Optional[RegionalHostnameEditResponse]
-- client.addressing.regional_hostnames.get(hostname, \*, zone_id) -> Optional[RegionalHostnameGetResponse]
-
-### Regions
-
-Types:
-
-```python
-from cloudflare.types.addressing.regional_hostnames import RegionListResponse
-```
-
-Methods:
-
-- client.addressing.regional_hostnames.regions.list(\*, account_id) -> SyncSinglePage[RegionListResponse]
-
## Services
Types:
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/__init__.py b/src/cloudflare/resources/addressing/regional_hostnames/__init__.py
deleted file mode 100644
index b81e8f7c300..00000000000
--- a/src/cloudflare/resources/addressing/regional_hostnames/__init__.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .regions import (
- RegionsResource,
- AsyncRegionsResource,
- RegionsResourceWithRawResponse,
- AsyncRegionsResourceWithRawResponse,
- RegionsResourceWithStreamingResponse,
- AsyncRegionsResourceWithStreamingResponse,
-)
-from .regional_hostnames import (
- RegionalHostnamesResource,
- AsyncRegionalHostnamesResource,
- RegionalHostnamesResourceWithRawResponse,
- AsyncRegionalHostnamesResourceWithRawResponse,
- RegionalHostnamesResourceWithStreamingResponse,
- AsyncRegionalHostnamesResourceWithStreamingResponse,
-)
-
-__all__ = [
- "RegionsResource",
- "AsyncRegionsResource",
- "RegionsResourceWithRawResponse",
- "AsyncRegionsResourceWithRawResponse",
- "RegionsResourceWithStreamingResponse",
- "AsyncRegionsResourceWithStreamingResponse",
- "RegionalHostnamesResource",
- "AsyncRegionalHostnamesResource",
- "RegionalHostnamesResourceWithRawResponse",
- "AsyncRegionalHostnamesResourceWithRawResponse",
- "RegionalHostnamesResourceWithStreamingResponse",
- "AsyncRegionalHostnamesResourceWithStreamingResponse",
-]
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regions.py b/src/cloudflare/resources/addressing/regional_hostnames/regions.py
deleted file mode 100644
index ec9ea7806d7..00000000000
--- a/src/cloudflare/resources/addressing/regional_hostnames/regions.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import httpx
-
-from ...._types import Body, Query, Headers, NotGiven, not_given
-from ...._utils import path_template
-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 ....pagination import SyncSinglePage, AsyncSinglePage
-from ...._base_client import AsyncPaginator, make_request_options
-from ....types.addressing.regional_hostnames.region_list_response import RegionListResponse
-
-__all__ = ["RegionsResource", "AsyncRegionsResource"]
-
-
-class RegionsResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> RegionsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the 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 RegionsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> RegionsResourceWithStreamingResponse:
- """
- 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 RegionsResourceWithStreamingResponse(self)
-
- 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,
- ) -> SyncSinglePage[RegionListResponse]:
- """
- List all Regional Services regions available for use by this account.
-
- 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_api_list(
- path_template("/accounts/{account_id}/addressing/regional_hostnames/regions", account_id=account_id),
- page=SyncSinglePage[RegionListResponse],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- model=RegionListResponse,
- )
-
-
-class AsyncRegionsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncRegionsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the 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 AsyncRegionsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncRegionsResourceWithStreamingResponse:
- """
- 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 AsyncRegionsResourceWithStreamingResponse(self)
-
- 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,
- ) -> AsyncPaginator[RegionListResponse, AsyncSinglePage[RegionListResponse]]:
- """
- List all Regional Services regions available for use by this account.
-
- 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_api_list(
- path_template("/accounts/{account_id}/addressing/regional_hostnames/regions", account_id=account_id),
- page=AsyncSinglePage[RegionListResponse],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- model=RegionListResponse,
- )
-
-
-class RegionsResourceWithRawResponse:
- def __init__(self, regions: RegionsResource) -> None:
- self._regions = regions
-
- self.list = to_raw_response_wrapper(
- regions.list,
- )
-
-
-class AsyncRegionsResourceWithRawResponse:
- def __init__(self, regions: AsyncRegionsResource) -> None:
- self._regions = regions
-
- self.list = async_to_raw_response_wrapper(
- regions.list,
- )
-
-
-class RegionsResourceWithStreamingResponse:
- def __init__(self, regions: RegionsResource) -> None:
- self._regions = regions
-
- self.list = to_streamed_response_wrapper(
- regions.list,
- )
-
-
-class AsyncRegionsResourceWithStreamingResponse:
- def __init__(self, regions: AsyncRegionsResource) -> None:
- self._regions = regions
-
- self.list = async_to_streamed_response_wrapper(
- regions.list,
- )
diff --git a/src/cloudflare/resources/billing/api.md b/src/cloudflare/resources/billing/api.md
index 1580ce478f0..980000f578f 100644
--- a/src/cloudflare/resources/billing/api.md
+++ b/src/cloudflare/resources/billing/api.md
@@ -17,9 +17,10 @@ Methods:
Types:
```python
-from cloudflare.types.billing import UsagePaygoResponse
+from cloudflare.types.billing import UsageGetResponse, UsagePaygoResponse
```
Methods:
-- client.billing.usage.paygo(\*, account_id, \*\*params) -> UsagePaygoResponse
+- client.billing.usage.get(\*, account_id, \*\*params) -> UsageGetResponse
+- client.billing.usage.paygo(\*, account_id, \*\*params) -> UsagePaygoResponse
diff --git a/src/cloudflare/resources/billing/usage.py b/src/cloudflare/resources/billing/usage.py
index 0071a8d4315..0e768d35b22 100644
--- a/src/cloudflare/resources/billing/usage.py
+++ b/src/cloudflare/resources/billing/usage.py
@@ -19,7 +19,8 @@
)
from ..._wrappers import ResultWrapper
from ..._base_client import make_request_options
-from ...types.billing import usage_paygo_params
+from ...types.billing import usage_get_params, usage_paygo_params
+from ...types.billing.usage_get_response import UsageGetResponse
from ...types.billing.usage_paygo_response import UsagePaygoResponse
__all__ = ["UsageResource", "AsyncUsageResource"]
@@ -45,6 +46,79 @@ def with_streaming_response(self) -> UsageResourceWithStreamingResponse:
"""
return UsageResourceWithStreamingResponse(self)
+ def get(
+ self,
+ *,
+ account_id: str,
+ from_: Union[str, date] | Omit = omit,
+ metric: str | Omit = omit,
+ to: Union[str, date] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> UsageGetResponse:
+ """
+ Returns cost and usage data for a single Cloudflare account, aligned with the
+ [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and
+ Usage dataset specification.
+
+ Each record represents one billable metric for one account on one day. This
+ includes all metered usage, including usage that falls within free-tier
+ allowances and may result in zero cost.
+
+ **Note:** Cost and pricing fields are not yet populated and will be absent from
+ responses until billing integration is complete.
+
+ When `from` and `to` are omitted, defaults to the start of the current month
+ through today. The maximum date range is 31 days.
+
+ Args:
+ account_id: Represents a Cloudflare resource identifier tag.
+
+ from_: Start date for the usage query (ISO 8601). Required if `to` is set. When omitted
+ along with `to`, defaults to the start of the current month. Filters by charge
+ period (when consumption happened), not billing period. The maximum date range
+ is 31 days.
+
+ metric: Filter results by billable metric id (e.g., workers_standard_requests).
+
+ to: End date for the usage query (ISO 8601). Required if `from` is set. When omitted
+ along with `from`, defaults to today. Filters by charge period (when consumption
+ happened), not billing period. The maximum date range is 31 days.
+
+ 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(
+ path_template("/accounts/{account_id}/billable/usage", account_id=account_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "from_": from_,
+ "metric": metric,
+ "to": to,
+ },
+ usage_get_params.UsageGetParams,
+ ),
+ post_parser=ResultWrapper[UsageGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UsageGetResponse], ResultWrapper[UsageGetResponse]),
+ )
+
def paygo(
self,
*,
@@ -68,9 +142,9 @@ def paygo(
Args:
account_id: Represents a Cloudflare resource identifier tag.
- from_: Defines the start date for the usage query (e.g., 2025-02-01).
+ from_: Start date for the usage query (ISO 8601).
- to: Defines the end date for the usage query (e.g., 2025-03-01).
+ to: End date for the usage query (ISO 8601).
extra_headers: Send extra headers
@@ -83,7 +157,7 @@ def paygo(
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get(
- path_template("/accounts/{account_id}/billing/usage/paygo", account_id=account_id),
+ path_template("/accounts/{account_id}/paygo-usage", account_id=account_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -122,6 +196,79 @@ def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse:
"""
return AsyncUsageResourceWithStreamingResponse(self)
+ async def get(
+ self,
+ *,
+ account_id: str,
+ from_: Union[str, date] | Omit = omit,
+ metric: str | Omit = omit,
+ to: Union[str, date] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> UsageGetResponse:
+ """
+ Returns cost and usage data for a single Cloudflare account, aligned with the
+ [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and
+ Usage dataset specification.
+
+ Each record represents one billable metric for one account on one day. This
+ includes all metered usage, including usage that falls within free-tier
+ allowances and may result in zero cost.
+
+ **Note:** Cost and pricing fields are not yet populated and will be absent from
+ responses until billing integration is complete.
+
+ When `from` and `to` are omitted, defaults to the start of the current month
+ through today. The maximum date range is 31 days.
+
+ Args:
+ account_id: Represents a Cloudflare resource identifier tag.
+
+ from_: Start date for the usage query (ISO 8601). Required if `to` is set. When omitted
+ along with `to`, defaults to the start of the current month. Filters by charge
+ period (when consumption happened), not billing period. The maximum date range
+ is 31 days.
+
+ metric: Filter results by billable metric id (e.g., workers_standard_requests).
+
+ to: End date for the usage query (ISO 8601). Required if `from` is set. When omitted
+ along with `from`, defaults to today. Filters by charge period (when consumption
+ happened), not billing period. The maximum date range is 31 days.
+
+ 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(
+ path_template("/accounts/{account_id}/billable/usage", account_id=account_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "from_": from_,
+ "metric": metric,
+ "to": to,
+ },
+ usage_get_params.UsageGetParams,
+ ),
+ post_parser=ResultWrapper[UsageGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UsageGetResponse], ResultWrapper[UsageGetResponse]),
+ )
+
async def paygo(
self,
*,
@@ -145,9 +292,9 @@ async def paygo(
Args:
account_id: Represents a Cloudflare resource identifier tag.
- from_: Defines the start date for the usage query (e.g., 2025-02-01).
+ from_: Start date for the usage query (ISO 8601).
- to: Defines the end date for the usage query (e.g., 2025-03-01).
+ to: End date for the usage query (ISO 8601).
extra_headers: Send extra headers
@@ -160,7 +307,7 @@ async def paygo(
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._get(
- path_template("/accounts/{account_id}/billing/usage/paygo", account_id=account_id),
+ path_template("/accounts/{account_id}/paygo-usage", account_id=account_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -183,6 +330,9 @@ class UsageResourceWithRawResponse:
def __init__(self, usage: UsageResource) -> None:
self._usage = usage
+ self.get = to_raw_response_wrapper(
+ usage.get,
+ )
self.paygo = to_raw_response_wrapper(
usage.paygo,
)
@@ -192,6 +342,9 @@ class AsyncUsageResourceWithRawResponse:
def __init__(self, usage: AsyncUsageResource) -> None:
self._usage = usage
+ self.get = async_to_raw_response_wrapper(
+ usage.get,
+ )
self.paygo = async_to_raw_response_wrapper(
usage.paygo,
)
@@ -201,6 +354,9 @@ class UsageResourceWithStreamingResponse:
def __init__(self, usage: UsageResource) -> None:
self._usage = usage
+ self.get = to_streamed_response_wrapper(
+ usage.get,
+ )
self.paygo = to_streamed_response_wrapper(
usage.paygo,
)
@@ -210,6 +366,9 @@ class AsyncUsageResourceWithStreamingResponse:
def __init__(self, usage: AsyncUsageResource) -> None:
self._usage = usage
+ self.get = async_to_streamed_response_wrapper(
+ usage.get,
+ )
self.paygo = async_to_streamed_response_wrapper(
usage.paygo,
)
diff --git a/src/cloudflare/resources/custom_certificates/custom_certificates.py b/src/cloudflare/resources/custom_certificates/custom_certificates.py
index 3ea0b10468a..77e733d4d89 100644
--- a/src/cloudflare/resources/custom_certificates/custom_certificates.py
+++ b/src/cloudflare/resources/custom_certificates/custom_certificates.py
@@ -71,12 +71,12 @@ def create(
*,
zone_id: str,
certificate: str,
- private_key: str,
bundle_method: BundleMethod | Omit = omit,
custom_csr_id: str | Omit = omit,
deploy: Literal["staging", "production"] | Omit = omit,
geo_restrictions: GeoRestrictionsParam | Omit = omit,
policy: str | Omit = omit,
+ private_key: str | Omit = omit,
type: Literal["legacy_custom", "sni_custom"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -93,8 +93,6 @@ def create(
certificate: The zone's SSL certificate or certificate and the intermediate(s).
- private_key: The zone's private key.
-
bundle_method: A ubiquitous bundle has the highest probability of being verified everywhere,
even by clients using outdated or unusual trust stores. An optimal bundle uses
the shortest chain and newest intermediates. And the force bundle verifies the
@@ -124,6 +122,9 @@ def create(
"policy_restrictions" in requests. Responses return this field as
"policy_restrictions".
+ private_key: The zone's private key. Not required if custom_csr_id is provided, in which case
+ the private key is retrieved from the CSR record held by Cloudflare.
+
type: The type 'legacy_custom' enables support for legacy clients which do not include
SNI in the TLS handshake.
@@ -142,12 +143,12 @@ def create(
body=maybe_transform(
{
"certificate": certificate,
- "private_key": private_key,
"bundle_method": bundle_method,
"custom_csr_id": custom_csr_id,
"deploy": deploy,
"geo_restrictions": geo_restrictions,
"policy": policy,
+ "private_key": private_key,
"type": type,
},
custom_certificate_create_params.CustomCertificateCreateParams,
@@ -338,7 +339,8 @@ def edit(
"policy_restrictions" in requests. Responses return this field as
"policy_restrictions".
- private_key: The zone's private key.
+ private_key: The zone's private key. Not required if custom_csr_id is provided, in which case
+ the private key is retrieved from the CSR record held by Cloudflare.
extra_headers: Send extra headers
@@ -464,12 +466,12 @@ async def create(
*,
zone_id: str,
certificate: str,
- private_key: str,
bundle_method: BundleMethod | Omit = omit,
custom_csr_id: str | Omit = omit,
deploy: Literal["staging", "production"] | Omit = omit,
geo_restrictions: GeoRestrictionsParam | Omit = omit,
policy: str | Omit = omit,
+ private_key: str | Omit = omit,
type: Literal["legacy_custom", "sni_custom"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -486,8 +488,6 @@ async def create(
certificate: The zone's SSL certificate or certificate and the intermediate(s).
- private_key: The zone's private key.
-
bundle_method: A ubiquitous bundle has the highest probability of being verified everywhere,
even by clients using outdated or unusual trust stores. An optimal bundle uses
the shortest chain and newest intermediates. And the force bundle verifies the
@@ -517,6 +517,9 @@ async def create(
"policy_restrictions" in requests. Responses return this field as
"policy_restrictions".
+ private_key: The zone's private key. Not required if custom_csr_id is provided, in which case
+ the private key is retrieved from the CSR record held by Cloudflare.
+
type: The type 'legacy_custom' enables support for legacy clients which do not include
SNI in the TLS handshake.
@@ -535,12 +538,12 @@ async def create(
body=await async_maybe_transform(
{
"certificate": certificate,
- "private_key": private_key,
"bundle_method": bundle_method,
"custom_csr_id": custom_csr_id,
"deploy": deploy,
"geo_restrictions": geo_restrictions,
"policy": policy,
+ "private_key": private_key,
"type": type,
},
custom_certificate_create_params.CustomCertificateCreateParams,
@@ -731,7 +734,8 @@ async def edit(
"policy_restrictions" in requests. Responses return this field as
"policy_restrictions".
- private_key: The zone's private key.
+ private_key: The zone's private key. Not required if custom_csr_id is provided, in which case
+ the private key is retrieved from the CSR record held by Cloudflare.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/dls/__init__.py b/src/cloudflare/resources/dls/__init__.py
new file mode 100644
index 00000000000..c6cb50941b3
--- /dev/null
+++ b/src/cloudflare/resources/dls/__init__.py
@@ -0,0 +1,47 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .dls import (
+ DLSResource,
+ AsyncDLSResource,
+ DLSResourceWithRawResponse,
+ AsyncDLSResourceWithRawResponse,
+ DLSResourceWithStreamingResponse,
+ AsyncDLSResourceWithStreamingResponse,
+)
+from .regions import (
+ RegionsResource,
+ AsyncRegionsResource,
+ RegionsResourceWithRawResponse,
+ AsyncRegionsResourceWithRawResponse,
+ RegionsResourceWithStreamingResponse,
+ AsyncRegionsResourceWithStreamingResponse,
+)
+from .regional_services import (
+ RegionalServicesResource,
+ AsyncRegionalServicesResource,
+ RegionalServicesResourceWithRawResponse,
+ AsyncRegionalServicesResourceWithRawResponse,
+ RegionalServicesResourceWithStreamingResponse,
+ AsyncRegionalServicesResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "RegionsResource",
+ "AsyncRegionsResource",
+ "RegionsResourceWithRawResponse",
+ "AsyncRegionsResourceWithRawResponse",
+ "RegionsResourceWithStreamingResponse",
+ "AsyncRegionsResourceWithStreamingResponse",
+ "RegionalServicesResource",
+ "AsyncRegionalServicesResource",
+ "RegionalServicesResourceWithRawResponse",
+ "AsyncRegionalServicesResourceWithRawResponse",
+ "RegionalServicesResourceWithStreamingResponse",
+ "AsyncRegionalServicesResourceWithStreamingResponse",
+ "DLSResource",
+ "AsyncDLSResource",
+ "DLSResourceWithRawResponse",
+ "AsyncDLSResourceWithRawResponse",
+ "DLSResourceWithStreamingResponse",
+ "AsyncDLSResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/dls/api.md b/src/cloudflare/resources/dls/api.md
new file mode 100644
index 00000000000..ed0fce17373
--- /dev/null
+++ b/src/cloudflare/resources/dls/api.md
@@ -0,0 +1,38 @@
+# DLS
+
+## Regions
+
+Types:
+
+```python
+from cloudflare.types.dls import RegionListResponse, RegionGetResponse
+```
+
+Methods:
+
+- client.dls.regions.list(\*, account_id, \*\*params) -> SyncCursorPagination[RegionListResponse]
+- client.dls.regions.get(region_id, \*, account_id) -> RegionGetResponse
+
+## RegionalServices
+
+### PrefixBindings
+
+Types:
+
+```python
+from cloudflare.types.dls.regional_services import (
+ PrefixBindingCreateResponse,
+ PrefixBindingListResponse,
+ PrefixBindingDeleteResponse,
+ PrefixBindingEditResponse,
+ PrefixBindingGetResponse,
+)
+```
+
+Methods:
+
+- client.dls.regional_services.prefix_bindings.create(\*, account_id, \*\*params) -> PrefixBindingCreateResponse
+- client.dls.regional_services.prefix_bindings.list(\*, account_id, \*\*params) -> SyncCursorPagination[PrefixBindingListResponse]
+- client.dls.regional_services.prefix_bindings.delete(binding_id, \*, account_id) -> PrefixBindingDeleteResponse
+- client.dls.regional_services.prefix_bindings.edit(binding_id, \*, account_id, \*\*params) -> PrefixBindingEditResponse
+- client.dls.regional_services.prefix_bindings.get(binding_id, \*, account_id) -> PrefixBindingGetResponse
diff --git a/src/cloudflare/resources/dls/dls.py b/src/cloudflare/resources/dls/dls.py
new file mode 100644
index 00000000000..68ed7ad27ab
--- /dev/null
+++ b/src/cloudflare/resources/dls/dls.py
@@ -0,0 +1,134 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .regions import (
+ RegionsResource,
+ AsyncRegionsResource,
+ RegionsResourceWithRawResponse,
+ AsyncRegionsResourceWithRawResponse,
+ RegionsResourceWithStreamingResponse,
+ AsyncRegionsResourceWithStreamingResponse,
+)
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from .regional_services.regional_services import (
+ RegionalServicesResource,
+ AsyncRegionalServicesResource,
+ RegionalServicesResourceWithRawResponse,
+ AsyncRegionalServicesResourceWithRawResponse,
+ RegionalServicesResourceWithStreamingResponse,
+ AsyncRegionalServicesResourceWithStreamingResponse,
+)
+
+__all__ = ["DLSResource", "AsyncDLSResource"]
+
+
+class DLSResource(SyncAPIResource):
+ @cached_property
+ def regions(self) -> RegionsResource:
+ return RegionsResource(self._client)
+
+ @cached_property
+ def regional_services(self) -> RegionalServicesResource:
+ return RegionalServicesResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> DLSResourceWithRawResponse:
+ """
+ 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 DLSResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> DLSResourceWithStreamingResponse:
+ """
+ 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 DLSResourceWithStreamingResponse(self)
+
+
+class AsyncDLSResource(AsyncAPIResource):
+ @cached_property
+ def regions(self) -> AsyncRegionsResource:
+ return AsyncRegionsResource(self._client)
+
+ @cached_property
+ def regional_services(self) -> AsyncRegionalServicesResource:
+ return AsyncRegionalServicesResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncDLSResourceWithRawResponse:
+ """
+ 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 AsyncDLSResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncDLSResourceWithStreamingResponse:
+ """
+ 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 AsyncDLSResourceWithStreamingResponse(self)
+
+
+class DLSResourceWithRawResponse:
+ def __init__(self, dls: DLSResource) -> None:
+ self._dls = dls
+
+ @cached_property
+ def regions(self) -> RegionsResourceWithRawResponse:
+ return RegionsResourceWithRawResponse(self._dls.regions)
+
+ @cached_property
+ def regional_services(self) -> RegionalServicesResourceWithRawResponse:
+ return RegionalServicesResourceWithRawResponse(self._dls.regional_services)
+
+
+class AsyncDLSResourceWithRawResponse:
+ def __init__(self, dls: AsyncDLSResource) -> None:
+ self._dls = dls
+
+ @cached_property
+ def regions(self) -> AsyncRegionsResourceWithRawResponse:
+ return AsyncRegionsResourceWithRawResponse(self._dls.regions)
+
+ @cached_property
+ def regional_services(self) -> AsyncRegionalServicesResourceWithRawResponse:
+ return AsyncRegionalServicesResourceWithRawResponse(self._dls.regional_services)
+
+
+class DLSResourceWithStreamingResponse:
+ def __init__(self, dls: DLSResource) -> None:
+ self._dls = dls
+
+ @cached_property
+ def regions(self) -> RegionsResourceWithStreamingResponse:
+ return RegionsResourceWithStreamingResponse(self._dls.regions)
+
+ @cached_property
+ def regional_services(self) -> RegionalServicesResourceWithStreamingResponse:
+ return RegionalServicesResourceWithStreamingResponse(self._dls.regional_services)
+
+
+class AsyncDLSResourceWithStreamingResponse:
+ def __init__(self, dls: AsyncDLSResource) -> None:
+ self._dls = dls
+
+ @cached_property
+ def regions(self) -> AsyncRegionsResourceWithStreamingResponse:
+ return AsyncRegionsResourceWithStreamingResponse(self._dls.regions)
+
+ @cached_property
+ def regional_services(self) -> AsyncRegionalServicesResourceWithStreamingResponse:
+ return AsyncRegionalServicesResourceWithStreamingResponse(self._dls.regional_services)
diff --git a/src/cloudflare/resources/dls/regional_services/__init__.py b/src/cloudflare/resources/dls/regional_services/__init__.py
new file mode 100644
index 00000000000..6e24035560d
--- /dev/null
+++ b/src/cloudflare/resources/dls/regional_services/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .prefix_bindings import (
+ PrefixBindingsResource,
+ AsyncPrefixBindingsResource,
+ PrefixBindingsResourceWithRawResponse,
+ AsyncPrefixBindingsResourceWithRawResponse,
+ PrefixBindingsResourceWithStreamingResponse,
+ AsyncPrefixBindingsResourceWithStreamingResponse,
+)
+from .regional_services import (
+ RegionalServicesResource,
+ AsyncRegionalServicesResource,
+ RegionalServicesResourceWithRawResponse,
+ AsyncRegionalServicesResourceWithRawResponse,
+ RegionalServicesResourceWithStreamingResponse,
+ AsyncRegionalServicesResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "PrefixBindingsResource",
+ "AsyncPrefixBindingsResource",
+ "PrefixBindingsResourceWithRawResponse",
+ "AsyncPrefixBindingsResourceWithRawResponse",
+ "PrefixBindingsResourceWithStreamingResponse",
+ "AsyncPrefixBindingsResourceWithStreamingResponse",
+ "RegionalServicesResource",
+ "AsyncRegionalServicesResource",
+ "RegionalServicesResourceWithRawResponse",
+ "AsyncRegionalServicesResourceWithRawResponse",
+ "RegionalServicesResourceWithStreamingResponse",
+ "AsyncRegionalServicesResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py b/src/cloudflare/resources/dls/regional_services/prefix_bindings.py
similarity index 50%
rename from src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
rename to src/cloudflare/resources/dls/regional_services/prefix_bindings.py
index 7145a5da939..e5e92a4b096 100644
--- a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
+++ b/src/cloudflare/resources/dls/regional_services/prefix_bindings.py
@@ -2,18 +2,10 @@
from __future__ import annotations
-from typing import Type, Optional, cast
+from typing import Type, cast
import httpx
-from .regions import (
- RegionsResource,
- AsyncRegionsResource,
- RegionsResourceWithRawResponse,
- AsyncRegionsResourceWithRawResponse,
- RegionsResourceWithStreamingResponse,
- AsyncRegionsResourceWithStreamingResponse,
-)
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import path_template, maybe_transform, async_maybe_transform
from ...._compat import cached_property
@@ -25,72 +17,65 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
-from ....pagination import SyncSinglePage, AsyncSinglePage
+from ....pagination import SyncCursorPagination, AsyncCursorPagination
from ...._base_client import AsyncPaginator, make_request_options
-from ....types.addressing import regional_hostname_edit_params, regional_hostname_create_params
-from ....types.addressing.regional_hostname_get_response import RegionalHostnameGetResponse
-from ....types.addressing.regional_hostname_edit_response import RegionalHostnameEditResponse
-from ....types.addressing.regional_hostname_list_response import RegionalHostnameListResponse
-from ....types.addressing.regional_hostname_create_response import RegionalHostnameCreateResponse
-from ....types.addressing.regional_hostname_delete_response import RegionalHostnameDeleteResponse
+from ....types.dls.regional_services import (
+ prefix_binding_edit_params,
+ prefix_binding_list_params,
+ prefix_binding_create_params,
+)
+from ....types.dls.regional_services.prefix_binding_get_response import PrefixBindingGetResponse
+from ....types.dls.regional_services.prefix_binding_edit_response import PrefixBindingEditResponse
+from ....types.dls.regional_services.prefix_binding_list_response import PrefixBindingListResponse
+from ....types.dls.regional_services.prefix_binding_create_response import PrefixBindingCreateResponse
+from ....types.dls.regional_services.prefix_binding_delete_response import PrefixBindingDeleteResponse
-__all__ = ["RegionalHostnamesResource", "AsyncRegionalHostnamesResource"]
+__all__ = ["PrefixBindingsResource", "AsyncPrefixBindingsResource"]
-class RegionalHostnamesResource(SyncAPIResource):
+class PrefixBindingsResource(SyncAPIResource):
@cached_property
- def regions(self) -> RegionsResource:
- return RegionsResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> RegionalHostnamesResourceWithRawResponse:
+ def with_raw_response(self) -> PrefixBindingsResourceWithRawResponse:
"""
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 RegionalHostnamesResourceWithRawResponse(self)
+ return PrefixBindingsResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> RegionalHostnamesResourceWithStreamingResponse:
+ def with_streaming_response(self) -> PrefixBindingsResourceWithStreamingResponse:
"""
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 RegionalHostnamesResourceWithStreamingResponse(self)
+ return PrefixBindingsResourceWithStreamingResponse(self)
def create(
self,
*,
- zone_id: str,
- hostname: str,
+ account_id: int,
+ cidr: str,
+ prefix_id: str,
region_key: str,
- routing: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameCreateResponse]:
- """Create a new Regional Hostname entry.
-
- Cloudflare will only use data centers that
- are physically located within the chosen region to decrypt and service HTTPS
- traffic. Learn more about
- [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
+ ) -> PrefixBindingCreateResponse:
+ """
+ Create a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ cidr: IP prefix in CIDR notation to bind.
- region_key: Identifying key for the region
+ prefix_id: The ID of the parent IP prefix that contains the CIDR.
- routing: Configure which routing method to use for the regional hostname
+ region_key: Region key from managed regions (e.g., "us", "eu").
extra_headers: Send extra headers
@@ -100,44 +85,45 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._post(
- path_template("/zones/{zone_id}/addressing/regional_hostnames", zone_id=zone_id),
+ path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
body=maybe_transform(
{
- "hostname": hostname,
+ "cidr": cidr,
+ "prefix_id": prefix_id,
"region_key": region_key,
- "routing": routing,
},
- regional_hostname_create_params.RegionalHostnameCreateParams,
+ prefix_binding_create_params.PrefixBindingCreateParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingCreateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameCreateResponse]], ResultWrapper[RegionalHostnameCreateResponse]),
+ cast_to=cast(Type[PrefixBindingCreateResponse], ResultWrapper[PrefixBindingCreateResponse]),
)
def list(
self,
*,
- zone_id: str,
+ account_id: int,
+ cursor: str | Omit = omit,
+ per_page: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameListResponse]:
+ ) -> SyncCursorPagination[PrefixBindingListResponse]:
"""
- List all Regional Hostnames within a zone.
+ List DLS prefix bindings for an account
Args:
- zone_id: Identifier.
+ cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
+ value from a previous response to fetch the next page.
extra_headers: Send extra headers
@@ -147,37 +133,42 @@ def list(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
- path_template("/zones/{zone_id}/addressing/regional_hostnames", zone_id=zone_id),
- page=SyncSinglePage[RegionalHostnameListResponse],
+ path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
+ page=SyncCursorPagination[PrefixBindingListResponse],
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(
+ {
+ "cursor": cursor,
+ "per_page": per_page,
+ },
+ prefix_binding_list_params.PrefixBindingListParams,
+ ),
),
- model=RegionalHostnameListResponse,
+ model=PrefixBindingListResponse,
)
def delete(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> RegionalHostnameDeleteResponse:
+ ) -> PrefixBindingDeleteResponse:
"""
- Delete the region configuration for a specific Regional Hostname.
+ Delete a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ binding_id: Unique identifier for the prefix binding.
extra_headers: Send extra headers
@@ -187,25 +178,25 @@ def delete(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return self._delete(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=RegionalHostnameDeleteResponse,
+ cast_to=PrefixBindingDeleteResponse,
)
def edit(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
region_key: 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.
@@ -213,19 +204,14 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> Optional[RegionalHostnameEditResponse]:
- """Update the configuration for a specific Regional Hostname.
-
- Only the region_key
- of a hostname is mutable.
+ ) -> PrefixBindingEditResponse:
+ """
+ Update a DLS prefix binding
Args:
- zone_id: Identifier.
+ binding_id: Unique identifier for the prefix binding.
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
-
- region_key: Identifying key for the region
+ region_key: New region key to assign (e.g., "us", "eu", "cfcanary").
extra_headers: Send extra headers
@@ -235,45 +221,42 @@ def edit(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return self._patch(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
- body=maybe_transform({"region_key": region_key}, regional_hostname_edit_params.RegionalHostnameEditParams),
+ body=maybe_transform({"region_key": region_key}, prefix_binding_edit_params.PrefixBindingEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameEditResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingEditResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameEditResponse]], ResultWrapper[RegionalHostnameEditResponse]),
+ cast_to=cast(Type[PrefixBindingEditResponse], ResultWrapper[PrefixBindingEditResponse]),
)
def get(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameGetResponse]:
+ ) -> PrefixBindingGetResponse:
"""
- Fetch the configuration for a specific Regional Hostname, within a zone.
+ Get a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ binding_id: Unique identifier for the prefix binding.
extra_headers: Send extra headers
@@ -283,79 +266,68 @@ def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return self._get(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameGetResponse]], ResultWrapper[RegionalHostnameGetResponse]),
+ cast_to=cast(Type[PrefixBindingGetResponse], ResultWrapper[PrefixBindingGetResponse]),
)
-class AsyncRegionalHostnamesResource(AsyncAPIResource):
+class AsyncPrefixBindingsResource(AsyncAPIResource):
@cached_property
- def regions(self) -> AsyncRegionsResource:
- return AsyncRegionsResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncRegionalHostnamesResourceWithRawResponse:
+ def with_raw_response(self) -> AsyncPrefixBindingsResourceWithRawResponse:
"""
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 AsyncRegionalHostnamesResourceWithRawResponse(self)
+ return AsyncPrefixBindingsResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncRegionalHostnamesResourceWithStreamingResponse:
+ def with_streaming_response(self) -> AsyncPrefixBindingsResourceWithStreamingResponse:
"""
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 AsyncRegionalHostnamesResourceWithStreamingResponse(self)
+ return AsyncPrefixBindingsResourceWithStreamingResponse(self)
async def create(
self,
*,
- zone_id: str,
- hostname: str,
+ account_id: int,
+ cidr: str,
+ prefix_id: str,
region_key: str,
- routing: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameCreateResponse]:
- """Create a new Regional Hostname entry.
-
- Cloudflare will only use data centers that
- are physically located within the chosen region to decrypt and service HTTPS
- traffic. Learn more about
- [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
+ ) -> PrefixBindingCreateResponse:
+ """
+ Create a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ cidr: IP prefix in CIDR notation to bind.
- region_key: Identifying key for the region
+ prefix_id: The ID of the parent IP prefix that contains the CIDR.
- routing: Configure which routing method to use for the regional hostname
+ region_key: Region key from managed regions (e.g., "us", "eu").
extra_headers: Send extra headers
@@ -365,44 +337,45 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return await self._post(
- path_template("/zones/{zone_id}/addressing/regional_hostnames", zone_id=zone_id),
+ path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
body=await async_maybe_transform(
{
- "hostname": hostname,
+ "cidr": cidr,
+ "prefix_id": prefix_id,
"region_key": region_key,
- "routing": routing,
},
- regional_hostname_create_params.RegionalHostnameCreateParams,
+ prefix_binding_create_params.PrefixBindingCreateParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingCreateResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameCreateResponse]], ResultWrapper[RegionalHostnameCreateResponse]),
+ cast_to=cast(Type[PrefixBindingCreateResponse], ResultWrapper[PrefixBindingCreateResponse]),
)
def list(
self,
*,
- zone_id: str,
+ account_id: int,
+ cursor: str | Omit = omit,
+ per_page: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameListResponse, AsyncSinglePage[RegionalHostnameListResponse]]:
+ ) -> AsyncPaginator[PrefixBindingListResponse, AsyncCursorPagination[PrefixBindingListResponse]]:
"""
- List all Regional Hostnames within a zone.
+ List DLS prefix bindings for an account
Args:
- zone_id: Identifier.
+ cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
+ value from a previous response to fetch the next page.
extra_headers: Send extra headers
@@ -412,37 +385,42 @@ def list(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
- path_template("/zones/{zone_id}/addressing/regional_hostnames", zone_id=zone_id),
- page=AsyncSinglePage[RegionalHostnameListResponse],
+ path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
+ page=AsyncCursorPagination[PrefixBindingListResponse],
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(
+ {
+ "cursor": cursor,
+ "per_page": per_page,
+ },
+ prefix_binding_list_params.PrefixBindingListParams,
+ ),
),
- model=RegionalHostnameListResponse,
+ model=PrefixBindingListResponse,
)
async def delete(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> RegionalHostnameDeleteResponse:
+ ) -> PrefixBindingDeleteResponse:
"""
- Delete the region configuration for a specific Regional Hostname.
+ Delete a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ binding_id: Unique identifier for the prefix binding.
extra_headers: Send extra headers
@@ -452,25 +430,25 @@ async def delete(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return await self._delete(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=RegionalHostnameDeleteResponse,
+ cast_to=PrefixBindingDeleteResponse,
)
async def edit(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
region_key: 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.
@@ -478,19 +456,14 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> Optional[RegionalHostnameEditResponse]:
- """Update the configuration for a specific Regional Hostname.
-
- Only the region_key
- of a hostname is mutable.
+ ) -> PrefixBindingEditResponse:
+ """
+ Update a DLS prefix binding
Args:
- zone_id: Identifier.
+ binding_id: Unique identifier for the prefix binding.
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
-
- region_key: Identifying key for the region
+ region_key: New region key to assign (e.g., "us", "eu", "cfcanary").
extra_headers: Send extra headers
@@ -500,47 +473,44 @@ async def edit(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return await self._patch(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
body=await async_maybe_transform(
- {"region_key": region_key}, regional_hostname_edit_params.RegionalHostnameEditParams
+ {"region_key": region_key}, prefix_binding_edit_params.PrefixBindingEditParams
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameEditResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingEditResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameEditResponse]], ResultWrapper[RegionalHostnameEditResponse]),
+ cast_to=cast(Type[PrefixBindingEditResponse], ResultWrapper[PrefixBindingEditResponse]),
)
async def get(
self,
- hostname: str,
+ binding_id: str,
*,
- zone_id: str,
+ account_id: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionalHostnameGetResponse]:
+ ) -> PrefixBindingGetResponse:
"""
- Fetch the configuration for a specific Regional Hostname, within a zone.
+ Get a DLS prefix binding
Args:
- zone_id: Identifier.
-
- hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
- supported for one level, e.g `*.example.com`
+ binding_id: Unique identifier for the prefix binding.
extra_headers: Send extra headers
@@ -550,120 +520,104 @@ async def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
- if not zone_id:
- raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- if not hostname:
- raise ValueError(f"Expected a non-empty value for `hostname` but received {hostname!r}")
+ if not binding_id:
+ raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
return await self._get(
path_template(
- "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", zone_id=zone_id, hostname=hostname
+ "/accounts/{account_id}/dls/regional_services/prefix_bindings/{binding_id}",
+ account_id=account_id,
+ binding_id=binding_id,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[RegionalHostnameGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[PrefixBindingGetResponse]._unwrapper,
),
- cast_to=cast(Type[Optional[RegionalHostnameGetResponse]], ResultWrapper[RegionalHostnameGetResponse]),
+ cast_to=cast(Type[PrefixBindingGetResponse], ResultWrapper[PrefixBindingGetResponse]),
)
-class RegionalHostnamesResourceWithRawResponse:
- def __init__(self, regional_hostnames: RegionalHostnamesResource) -> None:
- self._regional_hostnames = regional_hostnames
+class PrefixBindingsResourceWithRawResponse:
+ def __init__(self, prefix_bindings: PrefixBindingsResource) -> None:
+ self._prefix_bindings = prefix_bindings
self.create = to_raw_response_wrapper(
- regional_hostnames.create,
+ prefix_bindings.create,
)
self.list = to_raw_response_wrapper(
- regional_hostnames.list,
+ prefix_bindings.list,
)
self.delete = to_raw_response_wrapper(
- regional_hostnames.delete,
+ prefix_bindings.delete,
)
self.edit = to_raw_response_wrapper(
- regional_hostnames.edit,
+ prefix_bindings.edit,
)
self.get = to_raw_response_wrapper(
- regional_hostnames.get,
+ prefix_bindings.get,
)
- @cached_property
- def regions(self) -> RegionsResourceWithRawResponse:
- return RegionsResourceWithRawResponse(self._regional_hostnames.regions)
-
-class AsyncRegionalHostnamesResourceWithRawResponse:
- def __init__(self, regional_hostnames: AsyncRegionalHostnamesResource) -> None:
- self._regional_hostnames = regional_hostnames
+class AsyncPrefixBindingsResourceWithRawResponse:
+ def __init__(self, prefix_bindings: AsyncPrefixBindingsResource) -> None:
+ self._prefix_bindings = prefix_bindings
self.create = async_to_raw_response_wrapper(
- regional_hostnames.create,
+ prefix_bindings.create,
)
self.list = async_to_raw_response_wrapper(
- regional_hostnames.list,
+ prefix_bindings.list,
)
self.delete = async_to_raw_response_wrapper(
- regional_hostnames.delete,
+ prefix_bindings.delete,
)
self.edit = async_to_raw_response_wrapper(
- regional_hostnames.edit,
+ prefix_bindings.edit,
)
self.get = async_to_raw_response_wrapper(
- regional_hostnames.get,
+ prefix_bindings.get,
)
- @cached_property
- def regions(self) -> AsyncRegionsResourceWithRawResponse:
- return AsyncRegionsResourceWithRawResponse(self._regional_hostnames.regions)
-
-class RegionalHostnamesResourceWithStreamingResponse:
- def __init__(self, regional_hostnames: RegionalHostnamesResource) -> None:
- self._regional_hostnames = regional_hostnames
+class PrefixBindingsResourceWithStreamingResponse:
+ def __init__(self, prefix_bindings: PrefixBindingsResource) -> None:
+ self._prefix_bindings = prefix_bindings
self.create = to_streamed_response_wrapper(
- regional_hostnames.create,
+ prefix_bindings.create,
)
self.list = to_streamed_response_wrapper(
- regional_hostnames.list,
+ prefix_bindings.list,
)
self.delete = to_streamed_response_wrapper(
- regional_hostnames.delete,
+ prefix_bindings.delete,
)
self.edit = to_streamed_response_wrapper(
- regional_hostnames.edit,
+ prefix_bindings.edit,
)
self.get = to_streamed_response_wrapper(
- regional_hostnames.get,
+ prefix_bindings.get,
)
- @cached_property
- def regions(self) -> RegionsResourceWithStreamingResponse:
- return RegionsResourceWithStreamingResponse(self._regional_hostnames.regions)
-
-class AsyncRegionalHostnamesResourceWithStreamingResponse:
- def __init__(self, regional_hostnames: AsyncRegionalHostnamesResource) -> None:
- self._regional_hostnames = regional_hostnames
+class AsyncPrefixBindingsResourceWithStreamingResponse:
+ def __init__(self, prefix_bindings: AsyncPrefixBindingsResource) -> None:
+ self._prefix_bindings = prefix_bindings
self.create = async_to_streamed_response_wrapper(
- regional_hostnames.create,
+ prefix_bindings.create,
)
self.list = async_to_streamed_response_wrapper(
- regional_hostnames.list,
+ prefix_bindings.list,
)
self.delete = async_to_streamed_response_wrapper(
- regional_hostnames.delete,
+ prefix_bindings.delete,
)
self.edit = async_to_streamed_response_wrapper(
- regional_hostnames.edit,
+ prefix_bindings.edit,
)
self.get = async_to_streamed_response_wrapper(
- regional_hostnames.get,
+ prefix_bindings.get,
)
-
- @cached_property
- def regions(self) -> AsyncRegionsResourceWithStreamingResponse:
- return AsyncRegionsResourceWithStreamingResponse(self._regional_hostnames.regions)
diff --git a/src/cloudflare/resources/dls/regional_services/regional_services.py b/src/cloudflare/resources/dls/regional_services/regional_services.py
new file mode 100644
index 00000000000..2d51eeec48f
--- /dev/null
+++ b/src/cloudflare/resources/dls/regional_services/regional_services.py
@@ -0,0 +1,102 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from .prefix_bindings import (
+ PrefixBindingsResource,
+ AsyncPrefixBindingsResource,
+ PrefixBindingsResourceWithRawResponse,
+ AsyncPrefixBindingsResourceWithRawResponse,
+ PrefixBindingsResourceWithStreamingResponse,
+ AsyncPrefixBindingsResourceWithStreamingResponse,
+)
+
+__all__ = ["RegionalServicesResource", "AsyncRegionalServicesResource"]
+
+
+class RegionalServicesResource(SyncAPIResource):
+ @cached_property
+ def prefix_bindings(self) -> PrefixBindingsResource:
+ return PrefixBindingsResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> RegionalServicesResourceWithRawResponse:
+ """
+ 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 RegionalServicesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> RegionalServicesResourceWithStreamingResponse:
+ """
+ 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 RegionalServicesResourceWithStreamingResponse(self)
+
+
+class AsyncRegionalServicesResource(AsyncAPIResource):
+ @cached_property
+ def prefix_bindings(self) -> AsyncPrefixBindingsResource:
+ return AsyncPrefixBindingsResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncRegionalServicesResourceWithRawResponse:
+ """
+ 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 AsyncRegionalServicesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncRegionalServicesResourceWithStreamingResponse:
+ """
+ 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 AsyncRegionalServicesResourceWithStreamingResponse(self)
+
+
+class RegionalServicesResourceWithRawResponse:
+ def __init__(self, regional_services: RegionalServicesResource) -> None:
+ self._regional_services = regional_services
+
+ @cached_property
+ def prefix_bindings(self) -> PrefixBindingsResourceWithRawResponse:
+ return PrefixBindingsResourceWithRawResponse(self._regional_services.prefix_bindings)
+
+
+class AsyncRegionalServicesResourceWithRawResponse:
+ def __init__(self, regional_services: AsyncRegionalServicesResource) -> None:
+ self._regional_services = regional_services
+
+ @cached_property
+ def prefix_bindings(self) -> AsyncPrefixBindingsResourceWithRawResponse:
+ return AsyncPrefixBindingsResourceWithRawResponse(self._regional_services.prefix_bindings)
+
+
+class RegionalServicesResourceWithStreamingResponse:
+ def __init__(self, regional_services: RegionalServicesResource) -> None:
+ self._regional_services = regional_services
+
+ @cached_property
+ def prefix_bindings(self) -> PrefixBindingsResourceWithStreamingResponse:
+ return PrefixBindingsResourceWithStreamingResponse(self._regional_services.prefix_bindings)
+
+
+class AsyncRegionalServicesResourceWithStreamingResponse:
+ def __init__(self, regional_services: AsyncRegionalServicesResource) -> None:
+ self._regional_services = regional_services
+
+ @cached_property
+ def prefix_bindings(self) -> AsyncPrefixBindingsResourceWithStreamingResponse:
+ return AsyncPrefixBindingsResourceWithStreamingResponse(self._regional_services.prefix_bindings)
diff --git a/src/cloudflare/resources/dls/regions.py b/src/cloudflare/resources/dls/regions.py
new file mode 100644
index 00000000000..76effd62dce
--- /dev/null
+++ b/src/cloudflare/resources/dls/regions.py
@@ -0,0 +1,299 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, cast
+from typing_extensions import Literal
+
+import httpx
+
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import path_template, 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 ...types.dls import region_list_params
+from ...pagination import SyncCursorPagination, AsyncCursorPagination
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.dls.region_get_response import RegionGetResponse
+from ...types.dls.region_list_response import RegionListResponse
+
+__all__ = ["RegionsResource", "AsyncRegionsResource"]
+
+
+class RegionsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> RegionsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the 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 RegionsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> RegionsResourceWithStreamingResponse:
+ """
+ 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 RegionsResourceWithStreamingResponse(self)
+
+ def list(
+ self,
+ *,
+ account_id: int,
+ cursor: str | Omit = omit,
+ per_page: int | Omit = omit,
+ type: Literal["managed", "custom"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> SyncCursorPagination[RegionListResponse]:
+ """
+ List DLS regions for an account
+
+ Args:
+ cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
+ value from a previous response to fetch the next page.
+
+ type: Filter regions by type. Omit to return all regions.
+
+ 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(
+ path_template("/accounts/{account_id}/dls/regions", account_id=account_id),
+ page=SyncCursorPagination[RegionListResponse],
+ 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,
+ "type": type,
+ },
+ region_list_params.RegionListParams,
+ ),
+ ),
+ model=RegionListResponse,
+ )
+
+ def get(
+ self,
+ region_id: str,
+ *,
+ account_id: int,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> RegionGetResponse:
+ """
+ Get a DLS region
+
+ Args:
+ region_id: UUID of the region (custom or managed) or region_key of a managed region.
+
+ 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 region_id:
+ raise ValueError(f"Expected a non-empty value for `region_id` but received {region_id!r}")
+ return self._get(
+ path_template("/accounts/{account_id}/dls/regions/{region_id}", account_id=account_id, region_id=region_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[RegionGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[RegionGetResponse], ResultWrapper[RegionGetResponse]),
+ )
+
+
+class AsyncRegionsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncRegionsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the 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 AsyncRegionsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncRegionsResourceWithStreamingResponse:
+ """
+ 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 AsyncRegionsResourceWithStreamingResponse(self)
+
+ def list(
+ self,
+ *,
+ account_id: int,
+ cursor: str | Omit = omit,
+ per_page: int | Omit = omit,
+ type: Literal["managed", "custom"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RegionListResponse, AsyncCursorPagination[RegionListResponse]]:
+ """
+ List DLS regions for an account
+
+ Args:
+ cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
+ value from a previous response to fetch the next page.
+
+ type: Filter regions by type. Omit to return all regions.
+
+ 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(
+ path_template("/accounts/{account_id}/dls/regions", account_id=account_id),
+ page=AsyncCursorPagination[RegionListResponse],
+ 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,
+ "type": type,
+ },
+ region_list_params.RegionListParams,
+ ),
+ ),
+ model=RegionListResponse,
+ )
+
+ async def get(
+ self,
+ region_id: str,
+ *,
+ account_id: int,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> RegionGetResponse:
+ """
+ Get a DLS region
+
+ Args:
+ region_id: UUID of the region (custom or managed) or region_key of a managed region.
+
+ 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 region_id:
+ raise ValueError(f"Expected a non-empty value for `region_id` but received {region_id!r}")
+ return await self._get(
+ path_template("/accounts/{account_id}/dls/regions/{region_id}", account_id=account_id, region_id=region_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[RegionGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[RegionGetResponse], ResultWrapper[RegionGetResponse]),
+ )
+
+
+class RegionsResourceWithRawResponse:
+ def __init__(self, regions: RegionsResource) -> None:
+ self._regions = regions
+
+ self.list = to_raw_response_wrapper(
+ regions.list,
+ )
+ self.get = to_raw_response_wrapper(
+ regions.get,
+ )
+
+
+class AsyncRegionsResourceWithRawResponse:
+ def __init__(self, regions: AsyncRegionsResource) -> None:
+ self._regions = regions
+
+ self.list = async_to_raw_response_wrapper(
+ regions.list,
+ )
+ self.get = async_to_raw_response_wrapper(
+ regions.get,
+ )
+
+
+class RegionsResourceWithStreamingResponse:
+ def __init__(self, regions: RegionsResource) -> None:
+ self._regions = regions
+
+ self.list = to_streamed_response_wrapper(
+ regions.list,
+ )
+ self.get = to_streamed_response_wrapper(
+ regions.get,
+ )
+
+
+class AsyncRegionsResourceWithStreamingResponse:
+ def __init__(self, regions: AsyncRegionsResource) -> None:
+ self._regions = regions
+
+ self.list = async_to_streamed_response_wrapper(
+ regions.list,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ regions.get,
+ )
diff --git a/src/cloudflare/resources/email_security/investigate/investigate.py b/src/cloudflare/resources/email_security/investigate/investigate.py
index 670b270d291..4df6c5ecba1 100644
--- a/src/cloudflare/resources/email_security/investigate/investigate.py
+++ b/src/cloudflare/resources/email_security/investigate/investigate.py
@@ -136,7 +136,6 @@ def list(
self,
*,
account_id: str,
- action_log: bool | Omit = omit,
alert_id: str | Omit = omit,
cursor: str | Omit = omit,
delivery_status: Literal["delivered", "moved", "quarantined", "rejected", "deferred", "bounced", "queued"]
@@ -168,8 +167,6 @@ def list(
Args:
account_id: Identifier.
- action_log: Whether to include the message action log in the response.
-
delivery_status: Delivery status to filter by.
detections_only: Whether to include only detections in search results.
@@ -210,7 +207,6 @@ def list(
timeout=timeout,
query=maybe_transform(
{
- "action_log": action_log,
"alert_id": alert_id,
"cursor": cursor,
"delivery_status": delivery_status,
@@ -343,7 +339,6 @@ def list(
self,
*,
account_id: str,
- action_log: bool | Omit = omit,
alert_id: str | Omit = omit,
cursor: str | Omit = omit,
delivery_status: Literal["delivered", "moved", "quarantined", "rejected", "deferred", "bounced", "queued"]
@@ -375,8 +370,6 @@ def list(
Args:
account_id: Identifier.
- action_log: Whether to include the message action log in the response.
-
delivery_status: Delivery status to filter by.
detections_only: Whether to include only detections in search results.
@@ -417,7 +410,6 @@ def list(
timeout=timeout,
query=maybe_transform(
{
- "action_log": action_log,
"alert_id": alert_id,
"cursor": cursor,
"delivery_status": delivery_status,
diff --git a/src/cloudflare/resources/email_sending/email_sending.py b/src/cloudflare/resources/email_sending/email_sending.py
index 825a217d6f3..ec16a873dba 100644
--- a/src/cloudflare/resources/email_sending/email_sending.py
+++ b/src/cloudflare/resources/email_sending/email_sending.py
@@ -98,11 +98,13 @@ def send(
headers: Custom email headers as key-value pairs.
- html: HTML body of the email. At least one of text or html must be provided.
+ html: HTML body of the email. At least one of text or html must be provided
+ (non-empty).
reply_to: Reply-to address. Either a plain string or an object with address and name.
- text: Plain text body of the email. At least one of text or html must be provided.
+ text: Plain text body of the email. At least one of text or html must be provided
+ (non-empty).
extra_headers: Send extra headers
@@ -266,11 +268,13 @@ async def send(
headers: Custom email headers as key-value pairs.
- html: HTML body of the email. At least one of text or html must be provided.
+ html: HTML body of the email. At least one of text or html must be provided
+ (non-empty).
reply_to: Reply-to address. Either a plain string or an object with address and name.
- text: Plain text body of the email. At least one of text or html must be provided.
+ text: Plain text body of the email. At least one of text or html must be provided
+ (non-empty).
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/intel/sinkholes.py b/src/cloudflare/resources/intel/sinkholes.py
index 487453569a4..eb68faa9e48 100644
--- a/src/cloudflare/resources/intel/sinkholes.py
+++ b/src/cloudflare/resources/intel/sinkholes.py
@@ -53,10 +53,10 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Sinkhole]:
"""
- List sinkholes owned by this account
+ Lists sinkholes owned by the account for redirecting malicious traffic.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -110,10 +110,10 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Sinkhole, AsyncSinglePage[Sinkhole]]:
"""
- List sinkholes owned by this account
+ Lists sinkholes owned by the account for redirecting malicious traffic.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/load_balancers/monitor_groups.py b/src/cloudflare/resources/load_balancers/monitor_groups.py
deleted file mode 100644
index 97990a78f5c..00000000000
--- a/src/cloudflare/resources/load_balancers/monitor_groups.py
+++ /dev/null
@@ -1,789 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Type, Iterable, cast
-
-import httpx
-
-from ..._types import Body, Query, Headers, NotGiven, not_given
-from ..._utils import path_template, 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 ...pagination import SyncSinglePage, AsyncSinglePage
-from ..._base_client import AsyncPaginator, make_request_options
-from ...types.load_balancers import monitor_group_edit_params, monitor_group_create_params, monitor_group_update_params
-from ...types.load_balancers.monitor_group import MonitorGroup
-
-__all__ = ["MonitorGroupsResource", "AsyncMonitorGroupsResource"]
-
-
-class MonitorGroupsResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> MonitorGroupsResourceWithRawResponse:
- """
- 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 MonitorGroupsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> MonitorGroupsResourceWithStreamingResponse:
- """
- 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 MonitorGroupsResourceWithStreamingResponse(self)
-
- def create(
- self,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_create_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Create a new monitor group.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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(
- path_template("/accounts/{account_id}/load_balancers/monitor_groups", account_id=account_id),
- body=maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_create_params.MonitorGroupCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- def update(
- self,
- monitor_group_id: str,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_update_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Modify a configured monitor group.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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 monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return self._put(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- body=maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_update_params.MonitorGroupUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- 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,
- ) -> SyncSinglePage[MonitorGroup]:
- """
- List configured monitor groups.
-
- 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_api_list(
- path_template("/accounts/{account_id}/load_balancers/monitor_groups", account_id=account_id),
- page=SyncSinglePage[MonitorGroup],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- model=MonitorGroup,
- )
-
- def delete(
- self,
- monitor_group_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,
- ) -> MonitorGroup:
- """
- Delete a configured monitor group.
-
- 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}")
- if not monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return self._delete(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- def edit(
- self,
- monitor_group_id: str,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_edit_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Apply changes to an existing monitor group, overwriting the supplied properties.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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 monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return self._patch(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- body=maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_edit_params.MonitorGroupEditParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- def get(
- self,
- monitor_group_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,
- ) -> MonitorGroup:
- """
- Fetch a single configured monitor group.
-
- 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}")
- if not monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return self._get(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
-
-class AsyncMonitorGroupsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncMonitorGroupsResourceWithRawResponse:
- """
- 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 AsyncMonitorGroupsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncMonitorGroupsResourceWithStreamingResponse:
- """
- 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 AsyncMonitorGroupsResourceWithStreamingResponse(self)
-
- async def create(
- self,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_create_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Create a new monitor group.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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(
- path_template("/accounts/{account_id}/load_balancers/monitor_groups", account_id=account_id),
- body=await async_maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_create_params.MonitorGroupCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- async def update(
- self,
- monitor_group_id: str,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_update_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Modify a configured monitor group.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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 monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return await self._put(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- body=await async_maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_update_params.MonitorGroupUpdateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- 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,
- ) -> AsyncPaginator[MonitorGroup, AsyncSinglePage[MonitorGroup]]:
- """
- List configured monitor groups.
-
- 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_api_list(
- path_template("/accounts/{account_id}/load_balancers/monitor_groups", account_id=account_id),
- page=AsyncSinglePage[MonitorGroup],
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- model=MonitorGroup,
- )
-
- async def delete(
- self,
- monitor_group_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,
- ) -> MonitorGroup:
- """
- Delete a configured monitor group.
-
- 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}")
- if not monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return await self._delete(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- async def edit(
- self,
- monitor_group_id: str,
- *,
- account_id: str,
- id: str,
- description: str,
- members: Iterable[monitor_group_edit_params.Member],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> MonitorGroup:
- """
- Apply changes to an existing monitor group, overwriting the supplied properties.
-
- Args:
- account_id: Identifier.
-
- id: The ID of the Monitor Group to use for checking the health of origins within
- this pool.
-
- description: A short description of the monitor group
-
- members: List of monitors in this group
-
- 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 monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return await self._patch(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- body=await async_maybe_transform(
- {
- "id": id,
- "description": description,
- "members": members,
- },
- monitor_group_edit_params.MonitorGroupEditParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
- async def get(
- self,
- monitor_group_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,
- ) -> MonitorGroup:
- """
- Fetch a single configured monitor group.
-
- 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}")
- if not monitor_group_id:
- raise ValueError(f"Expected a non-empty value for `monitor_group_id` but received {monitor_group_id!r}")
- return await self._get(
- path_template(
- "/accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}",
- account_id=account_id,
- monitor_group_id=monitor_group_id,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[MonitorGroup]._unwrapper,
- ),
- cast_to=cast(Type[MonitorGroup], ResultWrapper[MonitorGroup]),
- )
-
-
-class MonitorGroupsResourceWithRawResponse:
- def __init__(self, monitor_groups: MonitorGroupsResource) -> None:
- self._monitor_groups = monitor_groups
-
- self.create = to_raw_response_wrapper(
- monitor_groups.create,
- )
- self.update = to_raw_response_wrapper(
- monitor_groups.update,
- )
- self.list = to_raw_response_wrapper(
- monitor_groups.list,
- )
- self.delete = to_raw_response_wrapper(
- monitor_groups.delete,
- )
- self.edit = to_raw_response_wrapper(
- monitor_groups.edit,
- )
- self.get = to_raw_response_wrapper(
- monitor_groups.get,
- )
-
-
-class AsyncMonitorGroupsResourceWithRawResponse:
- def __init__(self, monitor_groups: AsyncMonitorGroupsResource) -> None:
- self._monitor_groups = monitor_groups
-
- self.create = async_to_raw_response_wrapper(
- monitor_groups.create,
- )
- self.update = async_to_raw_response_wrapper(
- monitor_groups.update,
- )
- self.list = async_to_raw_response_wrapper(
- monitor_groups.list,
- )
- self.delete = async_to_raw_response_wrapper(
- monitor_groups.delete,
- )
- self.edit = async_to_raw_response_wrapper(
- monitor_groups.edit,
- )
- self.get = async_to_raw_response_wrapper(
- monitor_groups.get,
- )
-
-
-class MonitorGroupsResourceWithStreamingResponse:
- def __init__(self, monitor_groups: MonitorGroupsResource) -> None:
- self._monitor_groups = monitor_groups
-
- self.create = to_streamed_response_wrapper(
- monitor_groups.create,
- )
- self.update = to_streamed_response_wrapper(
- monitor_groups.update,
- )
- self.list = to_streamed_response_wrapper(
- monitor_groups.list,
- )
- self.delete = to_streamed_response_wrapper(
- monitor_groups.delete,
- )
- self.edit = to_streamed_response_wrapper(
- monitor_groups.edit,
- )
- self.get = to_streamed_response_wrapper(
- monitor_groups.get,
- )
-
-
-class AsyncMonitorGroupsResourceWithStreamingResponse:
- def __init__(self, monitor_groups: AsyncMonitorGroupsResource) -> None:
- self._monitor_groups = monitor_groups
-
- self.create = async_to_streamed_response_wrapper(
- monitor_groups.create,
- )
- self.update = async_to_streamed_response_wrapper(
- monitor_groups.update,
- )
- self.list = async_to_streamed_response_wrapper(
- monitor_groups.list,
- )
- self.delete = async_to_streamed_response_wrapper(
- monitor_groups.delete,
- )
- self.edit = async_to_streamed_response_wrapper(
- monitor_groups.edit,
- )
- self.get = async_to_streamed_response_wrapper(
- monitor_groups.get,
- )
diff --git a/src/cloudflare/resources/organizations/__init__.py b/src/cloudflare/resources/organizations/__init__.py
index f5b031a84f0..cdac5a06e21 100644
--- a/src/cloudflare/resources/organizations/__init__.py
+++ b/src/cloudflare/resources/organizations/__init__.py
@@ -8,6 +8,14 @@
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
+from .billing import (
+ BillingResource,
+ AsyncBillingResource,
+ BillingResourceWithRawResponse,
+ AsyncBillingResourceWithRawResponse,
+ BillingResourceWithStreamingResponse,
+ AsyncBillingResourceWithStreamingResponse,
+)
from .organizations import (
OrganizationsResource,
AsyncOrganizationsResource,
@@ -38,6 +46,12 @@
"AsyncLogsResourceWithRawResponse",
"LogsResourceWithStreamingResponse",
"AsyncLogsResourceWithStreamingResponse",
+ "BillingResource",
+ "AsyncBillingResource",
+ "BillingResourceWithRawResponse",
+ "AsyncBillingResourceWithRawResponse",
+ "BillingResourceWithStreamingResponse",
+ "AsyncBillingResourceWithStreamingResponse",
"OrganizationsResource",
"AsyncOrganizationsResource",
"OrganizationsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/organizations/api.md b/src/cloudflare/resources/organizations/api.md
index 86142be6ffa..06e98685f43 100644
--- a/src/cloudflare/resources/organizations/api.md
+++ b/src/cloudflare/resources/organizations/api.md
@@ -40,3 +40,17 @@ from cloudflare.types.organizations.logs import AuditListResponse
Methods:
- client.organizations.logs.audit.list(organization_id, \*\*params) -> SyncCursorPaginationAfter[AuditListResponse]
+
+## Billing
+
+### Usage
+
+Types:
+
+```python
+from cloudflare.types.organizations.billing import UsageGetResponse
+```
+
+Methods:
+
+- client.organizations.billing.usage.get(organization_id, \*\*params) -> UsageGetResponse
diff --git a/src/cloudflare/resources/organizations/billing/__init__.py b/src/cloudflare/resources/organizations/billing/__init__.py
new file mode 100644
index 00000000000..5cc237113e9
--- /dev/null
+++ b/src/cloudflare/resources/organizations/billing/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .usage import (
+ UsageResource,
+ AsyncUsageResource,
+ UsageResourceWithRawResponse,
+ AsyncUsageResourceWithRawResponse,
+ UsageResourceWithStreamingResponse,
+ AsyncUsageResourceWithStreamingResponse,
+)
+from .billing import (
+ BillingResource,
+ AsyncBillingResource,
+ BillingResourceWithRawResponse,
+ AsyncBillingResourceWithRawResponse,
+ BillingResourceWithStreamingResponse,
+ AsyncBillingResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "UsageResource",
+ "AsyncUsageResource",
+ "UsageResourceWithRawResponse",
+ "AsyncUsageResourceWithRawResponse",
+ "UsageResourceWithStreamingResponse",
+ "AsyncUsageResourceWithStreamingResponse",
+ "BillingResource",
+ "AsyncBillingResource",
+ "BillingResourceWithRawResponse",
+ "AsyncBillingResourceWithRawResponse",
+ "BillingResourceWithStreamingResponse",
+ "AsyncBillingResourceWithStreamingResponse",
+]
diff --git a/src/cloudflare/resources/organizations/billing/billing.py b/src/cloudflare/resources/organizations/billing/billing.py
new file mode 100644
index 00000000000..2c3407f5185
--- /dev/null
+++ b/src/cloudflare/resources/organizations/billing/billing.py
@@ -0,0 +1,102 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .usage import (
+ UsageResource,
+ AsyncUsageResource,
+ UsageResourceWithRawResponse,
+ AsyncUsageResourceWithRawResponse,
+ UsageResourceWithStreamingResponse,
+ AsyncUsageResourceWithStreamingResponse,
+)
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+
+__all__ = ["BillingResource", "AsyncBillingResource"]
+
+
+class BillingResource(SyncAPIResource):
+ @cached_property
+ def usage(self) -> UsageResource:
+ return UsageResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> BillingResourceWithRawResponse:
+ """
+ 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 BillingResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BillingResourceWithStreamingResponse:
+ """
+ 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 BillingResourceWithStreamingResponse(self)
+
+
+class AsyncBillingResource(AsyncAPIResource):
+ @cached_property
+ def usage(self) -> AsyncUsageResource:
+ return AsyncUsageResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncBillingResourceWithRawResponse:
+ """
+ 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 AsyncBillingResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBillingResourceWithStreamingResponse:
+ """
+ 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 AsyncBillingResourceWithStreamingResponse(self)
+
+
+class BillingResourceWithRawResponse:
+ def __init__(self, billing: BillingResource) -> None:
+ self._billing = billing
+
+ @cached_property
+ def usage(self) -> UsageResourceWithRawResponse:
+ return UsageResourceWithRawResponse(self._billing.usage)
+
+
+class AsyncBillingResourceWithRawResponse:
+ def __init__(self, billing: AsyncBillingResource) -> None:
+ self._billing = billing
+
+ @cached_property
+ def usage(self) -> AsyncUsageResourceWithRawResponse:
+ return AsyncUsageResourceWithRawResponse(self._billing.usage)
+
+
+class BillingResourceWithStreamingResponse:
+ def __init__(self, billing: BillingResource) -> None:
+ self._billing = billing
+
+ @cached_property
+ def usage(self) -> UsageResourceWithStreamingResponse:
+ return UsageResourceWithStreamingResponse(self._billing.usage)
+
+
+class AsyncBillingResourceWithStreamingResponse:
+ def __init__(self, billing: AsyncBillingResource) -> None:
+ self._billing = billing
+
+ @cached_property
+ def usage(self) -> AsyncUsageResourceWithStreamingResponse:
+ return AsyncUsageResourceWithStreamingResponse(self._billing.usage)
diff --git a/src/cloudflare/resources/organizations/billing/usage.py b/src/cloudflare/resources/organizations/billing/usage.py
new file mode 100644
index 00000000000..925cfc598aa
--- /dev/null
+++ b/src/cloudflare/resources/organizations/billing/usage.py
@@ -0,0 +1,251 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Type, Union, cast
+from datetime import date
+
+import httpx
+
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, 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.organizations.billing import usage_get_params
+from ....types.organizations.billing.usage_get_response import UsageGetResponse
+
+__all__ = ["UsageResource", "AsyncUsageResource"]
+
+
+class UsageResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> UsageResourceWithRawResponse:
+ """
+ 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 UsageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> UsageResourceWithStreamingResponse:
+ """
+ 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 UsageResourceWithStreamingResponse(self)
+
+ def get(
+ self,
+ organization_id: str,
+ *,
+ from_: Union[str, date] | Omit = omit,
+ metric: str | Omit = omit,
+ to: Union[str, date] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> UsageGetResponse:
+ """
+ Returns cost and usage data for all accounts within an organization, aligned
+ with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/)
+ Cost and Usage dataset specification.
+
+ Each record represents one billable metric for one account on one day. This
+ includes all metered usage, including usage that falls within free-tier
+ allowances and may result in zero cost. The response includes usage for every
+ account belonging to the specified organization.
+
+ **Note:** Cost and pricing fields are not yet populated and will be absent from
+ responses until billing integration is complete.
+
+ When `from` and `to` are omitted, defaults to the start of the current month
+ through today. The maximum date range is 31 days.
+
+ Args:
+ organization_id: Represents a Cloudflare resource identifier tag.
+
+ from_: Start date for the usage query (ISO 8601). Required if `to` is set. When omitted
+ along with `to`, defaults to the start of the current month. Filters by charge
+ period (when consumption happened), not billing period. The maximum date range
+ is 31 days.
+
+ metric: Filter results by billable metric id (e.g., workers_standard_requests).
+
+ to: End date for the usage query (ISO 8601). Required if `from` is set. When omitted
+ along with `from`, defaults to today. Filters by charge period (when consumption
+ happened), not billing period. The maximum date range is 31 days.
+
+ 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 organization_id:
+ raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}")
+ return self._get(
+ path_template("/organizations/{organization_id}/billable/usage", organization_id=organization_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "from_": from_,
+ "metric": metric,
+ "to": to,
+ },
+ usage_get_params.UsageGetParams,
+ ),
+ post_parser=ResultWrapper[UsageGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UsageGetResponse], ResultWrapper[UsageGetResponse]),
+ )
+
+
+class AsyncUsageResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncUsageResourceWithRawResponse:
+ """
+ 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 AsyncUsageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse:
+ """
+ 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 AsyncUsageResourceWithStreamingResponse(self)
+
+ async def get(
+ self,
+ organization_id: str,
+ *,
+ from_: Union[str, date] | Omit = omit,
+ metric: str | Omit = omit,
+ to: Union[str, date] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> UsageGetResponse:
+ """
+ Returns cost and usage data for all accounts within an organization, aligned
+ with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/)
+ Cost and Usage dataset specification.
+
+ Each record represents one billable metric for one account on one day. This
+ includes all metered usage, including usage that falls within free-tier
+ allowances and may result in zero cost. The response includes usage for every
+ account belonging to the specified organization.
+
+ **Note:** Cost and pricing fields are not yet populated and will be absent from
+ responses until billing integration is complete.
+
+ When `from` and `to` are omitted, defaults to the start of the current month
+ through today. The maximum date range is 31 days.
+
+ Args:
+ organization_id: Represents a Cloudflare resource identifier tag.
+
+ from_: Start date for the usage query (ISO 8601). Required if `to` is set. When omitted
+ along with `to`, defaults to the start of the current month. Filters by charge
+ period (when consumption happened), not billing period. The maximum date range
+ is 31 days.
+
+ metric: Filter results by billable metric id (e.g., workers_standard_requests).
+
+ to: End date for the usage query (ISO 8601). Required if `from` is set. When omitted
+ along with `from`, defaults to today. Filters by charge period (when consumption
+ happened), not billing period. The maximum date range is 31 days.
+
+ 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 organization_id:
+ raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}")
+ return await self._get(
+ path_template("/organizations/{organization_id}/billable/usage", organization_id=organization_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "from_": from_,
+ "metric": metric,
+ "to": to,
+ },
+ usage_get_params.UsageGetParams,
+ ),
+ post_parser=ResultWrapper[UsageGetResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[UsageGetResponse], ResultWrapper[UsageGetResponse]),
+ )
+
+
+class UsageResourceWithRawResponse:
+ def __init__(self, usage: UsageResource) -> None:
+ self._usage = usage
+
+ self.get = to_raw_response_wrapper(
+ usage.get,
+ )
+
+
+class AsyncUsageResourceWithRawResponse:
+ def __init__(self, usage: AsyncUsageResource) -> None:
+ self._usage = usage
+
+ self.get = async_to_raw_response_wrapper(
+ usage.get,
+ )
+
+
+class UsageResourceWithStreamingResponse:
+ def __init__(self, usage: UsageResource) -> None:
+ self._usage = usage
+
+ self.get = to_streamed_response_wrapper(
+ usage.get,
+ )
+
+
+class AsyncUsageResourceWithStreamingResponse:
+ def __init__(self, usage: AsyncUsageResource) -> None:
+ self._usage = usage
+
+ self.get = async_to_streamed_response_wrapper(
+ usage.get,
+ )
diff --git a/src/cloudflare/resources/organizations/organization_profile.py b/src/cloudflare/resources/organizations/organization_profile.py
index 1bf721d9640..f6a0f1945d9 100644
--- a/src/cloudflare/resources/organizations/organization_profile.py
+++ b/src/cloudflare/resources/organizations/organization_profile.py
@@ -62,7 +62,7 @@ def update(
) -> None:
"""Modify organization profile.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -108,7 +108,7 @@ def get(
) -> Result:
"""Get an organizations profile if it exists.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -173,7 +173,7 @@ async def update(
) -> None:
"""Modify organization profile.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -219,7 +219,7 @@ async def get(
) -> Result:
"""Get an organizations profile if it exists.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
diff --git a/src/cloudflare/resources/organizations/organizations.py b/src/cloudflare/resources/organizations/organizations.py
index cf995f8d278..34a6d36cb0c 100644
--- a/src/cloudflare/resources/organizations/organizations.py
+++ b/src/cloudflare/resources/organizations/organizations.py
@@ -27,6 +27,14 @@
from ..._wrappers import ResultWrapper
from ...pagination import SyncSinglePage, AsyncSinglePage
from ..._base_client import AsyncPaginator, make_request_options
+from .billing.billing import (
+ BillingResource,
+ AsyncBillingResource,
+ BillingResourceWithRawResponse,
+ AsyncBillingResourceWithRawResponse,
+ BillingResourceWithStreamingResponse,
+ AsyncBillingResourceWithStreamingResponse,
+)
from .organization_profile import (
OrganizationProfileResource,
AsyncOrganizationProfileResource,
@@ -51,6 +59,10 @@ def organization_profile(self) -> OrganizationProfileResource:
def logs(self) -> LogsResource:
return LogsResource(self._client)
+ @cached_property
+ def billing(self) -> BillingResource:
+ return BillingResource(self._client)
+
@cached_property
def with_raw_response(self) -> OrganizationsResourceWithRawResponse:
"""
@@ -85,7 +97,7 @@ def create(
) -> Organization:
"""Create a new organization for a user.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -133,7 +145,7 @@ def update(
) -> Organization:
"""Modify organization.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -186,7 +198,7 @@ def list(
"""Retrieve a list of organizations a particular user has access to.
(Currently in
- Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
Args:
id: Only return organizations with the specified IDs (ex. id=foo&id=bar). Send
@@ -246,7 +258,7 @@ def delete(
The organization MUST be empty before deleting. It must
not contain any sub-organizations, accounts, members or users. (Currently in
- Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
Args:
extra_headers: Send extra headers
@@ -284,7 +296,7 @@ def get(
) -> Organization:
"""Retrieve the details of a certain organization.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -320,6 +332,10 @@ def organization_profile(self) -> AsyncOrganizationProfileResource:
def logs(self) -> AsyncLogsResource:
return AsyncLogsResource(self._client)
+ @cached_property
+ def billing(self) -> AsyncBillingResource:
+ return AsyncBillingResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse:
"""
@@ -354,7 +370,7 @@ async def create(
) -> Organization:
"""Create a new organization for a user.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -402,7 +418,7 @@ async def update(
) -> Organization:
"""Modify organization.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -455,7 +471,7 @@ def list(
"""Retrieve a list of organizations a particular user has access to.
(Currently in
- Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
Args:
id: Only return organizations with the specified IDs (ex. id=foo&id=bar). Send
@@ -515,7 +531,7 @@ async def delete(
The organization MUST be empty before deleting. It must
not contain any sub-organizations, accounts, members or users. (Currently in
- Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
Args:
extra_headers: Send extra headers
@@ -553,7 +569,7 @@ async def get(
) -> Organization:
"""Retrieve the details of a certain organization.
- (Currently in Closed Beta - see
+ (Currently in Public Beta - see
https://developers.cloudflare.com/fundamentals/organizations/)
Args:
@@ -608,6 +624,10 @@ def organization_profile(self) -> OrganizationProfileResourceWithRawResponse:
def logs(self) -> LogsResourceWithRawResponse:
return LogsResourceWithRawResponse(self._organizations.logs)
+ @cached_property
+ def billing(self) -> BillingResourceWithRawResponse:
+ return BillingResourceWithRawResponse(self._organizations.billing)
+
class AsyncOrganizationsResourceWithRawResponse:
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
@@ -637,6 +657,10 @@ def organization_profile(self) -> AsyncOrganizationProfileResourceWithRawRespons
def logs(self) -> AsyncLogsResourceWithRawResponse:
return AsyncLogsResourceWithRawResponse(self._organizations.logs)
+ @cached_property
+ def billing(self) -> AsyncBillingResourceWithRawResponse:
+ return AsyncBillingResourceWithRawResponse(self._organizations.billing)
+
class OrganizationsResourceWithStreamingResponse:
def __init__(self, organizations: OrganizationsResource) -> None:
@@ -666,6 +690,10 @@ def organization_profile(self) -> OrganizationProfileResourceWithStreamingRespon
def logs(self) -> LogsResourceWithStreamingResponse:
return LogsResourceWithStreamingResponse(self._organizations.logs)
+ @cached_property
+ def billing(self) -> BillingResourceWithStreamingResponse:
+ return BillingResourceWithStreamingResponse(self._organizations.billing)
+
class AsyncOrganizationsResourceWithStreamingResponse:
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
@@ -694,3 +722,7 @@ def organization_profile(self) -> AsyncOrganizationProfileResourceWithStreamingR
@cached_property
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
return AsyncLogsResourceWithStreamingResponse(self._organizations.logs)
+
+ @cached_property
+ def billing(self) -> AsyncBillingResourceWithStreamingResponse:
+ return AsyncBillingResourceWithStreamingResponse(self._organizations.billing)
diff --git a/src/cloudflare/resources/radar/bgp/ips.py b/src/cloudflare/resources/radar/bgp/ips.py
deleted file mode 100644
index ed5d5aa4891..00000000000
--- a/src/cloudflare/resources/radar/bgp/ips.py
+++ /dev/null
@@ -1,268 +0,0 @@
-# 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 Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
-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.bgp import ip_timeseries_params
-from ....types.radar.bgp.ip_timeseries_response import IPTimeseriesResponse
-
-__all__ = ["IPsResource", "AsyncIPsResource"]
-
-
-class IPsResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> IPsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the 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 IPsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> IPsResourceWithStreamingResponse:
- """
- 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 IPsResourceWithStreamingResponse(self)
-
- def timeseries(
- self,
- *,
- asn: SequenceNotStr[str] | Omit = omit,
- date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
- date_range: SequenceNotStr[str] | Omit = omit,
- date_start: SequenceNotStr[Union[str, datetime]] | Omit = omit,
- format: Literal["JSON", "CSV"] | Omit = omit,
- include_delay: bool | Omit = omit,
- ip_version: List[Literal["IPv4", "IPv6"]] | Omit = omit,
- location: SequenceNotStr[str] | Omit = omit,
- name: SequenceNotStr[str] | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> IPTimeseriesResponse:
- """
- Retrieves time series data for the announced IP space count, represented as the
- number of IPv4 /24s and IPv6 /48s, for a given ASN.
-
- Args:
- 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.
-
- 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.
-
- include_delay: Includes data delay meta information.
-
- ip_version: Filters results by IP version (Ipv4 vs. IPv6).
-
- location: Filters results by location. Specify a comma-separated list of alpha-2 location
- codes.
-
- 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/bgp/ips/timeseries",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "asn": asn,
- "date_end": date_end,
- "date_range": date_range,
- "date_start": date_start,
- "format": format,
- "include_delay": include_delay,
- "ip_version": ip_version,
- "location": location,
- "name": name,
- },
- ip_timeseries_params.IPTimeseriesParams,
- ),
- post_parser=ResultWrapper[IPTimeseriesResponse]._unwrapper,
- ),
- cast_to=cast(Type[IPTimeseriesResponse], ResultWrapper[IPTimeseriesResponse]),
- )
-
-
-class AsyncIPsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncIPsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the 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 AsyncIPsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncIPsResourceWithStreamingResponse:
- """
- 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 AsyncIPsResourceWithStreamingResponse(self)
-
- async def timeseries(
- self,
- *,
- asn: SequenceNotStr[str] | Omit = omit,
- date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
- date_range: SequenceNotStr[str] | Omit = omit,
- date_start: SequenceNotStr[Union[str, datetime]] | Omit = omit,
- format: Literal["JSON", "CSV"] | Omit = omit,
- include_delay: bool | Omit = omit,
- ip_version: List[Literal["IPv4", "IPv6"]] | Omit = omit,
- location: SequenceNotStr[str] | Omit = omit,
- name: SequenceNotStr[str] | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
- ) -> IPTimeseriesResponse:
- """
- Retrieves time series data for the announced IP space count, represented as the
- number of IPv4 /24s and IPv6 /48s, for a given ASN.
-
- Args:
- 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.
-
- 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.
-
- include_delay: Includes data delay meta information.
-
- ip_version: Filters results by IP version (Ipv4 vs. IPv6).
-
- location: Filters results by location. Specify a comma-separated list of alpha-2 location
- codes.
-
- 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/bgp/ips/timeseries",
- 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,
- "date_end": date_end,
- "date_range": date_range,
- "date_start": date_start,
- "format": format,
- "include_delay": include_delay,
- "ip_version": ip_version,
- "location": location,
- "name": name,
- },
- ip_timeseries_params.IPTimeseriesParams,
- ),
- post_parser=ResultWrapper[IPTimeseriesResponse]._unwrapper,
- ),
- cast_to=cast(Type[IPTimeseriesResponse], ResultWrapper[IPTimeseriesResponse]),
- )
-
-
-class IPsResourceWithRawResponse:
- def __init__(self, ips: IPsResource) -> None:
- self._ips = ips
-
- self.timeseries = to_raw_response_wrapper(
- ips.timeseries,
- )
-
-
-class AsyncIPsResourceWithRawResponse:
- def __init__(self, ips: AsyncIPsResource) -> None:
- self._ips = ips
-
- self.timeseries = async_to_raw_response_wrapper(
- ips.timeseries,
- )
-
-
-class IPsResourceWithStreamingResponse:
- def __init__(self, ips: IPsResource) -> None:
- self._ips = ips
-
- self.timeseries = to_streamed_response_wrapper(
- ips.timeseries,
- )
-
-
-class AsyncIPsResourceWithStreamingResponse:
- def __init__(self, ips: AsyncIPsResource) -> None:
- self._ips = ips
-
- self.timeseries = async_to_streamed_response_wrapper(
- ips.timeseries,
- )
diff --git a/src/cloudflare/resources/radar/http/http.py b/src/cloudflare/resources/radar/http/http.py
index 03688a8f98c..d516392ed4a 100644
--- a/src/cloudflare/resources/radar/http/http.py
+++ b/src/cloudflare/resources/radar/http/http.py
@@ -117,6 +117,7 @@ def summary_v2(
"BOT_CLASS",
"BROWSER",
"BROWSER_FAMILY",
+ "CONTENT_TYPE",
"DEVICE_TYPE",
"HTTP_PROTOCOL",
"HTTP_VERSION",
@@ -130,6 +131,27 @@ def summary_v2(
api_traffic: List[Literal["API", "NON_API"]] | Omit = omit,
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -169,6 +191,8 @@ def summary_v2(
bot_class: Filters results by bot class. Refer to
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
+ content_type: Filters results by content type category.
+
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.
@@ -232,6 +256,7 @@ def summary_v2(
"api_traffic": api_traffic,
"asn": asn,
"bot_class": bot_class,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
@@ -263,6 +288,27 @@ def timeseries(
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -306,6 +352,8 @@ def timeseries(
browser_family: Filters results by browser family.
+ content_type: Filters results by content type category.
+
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.
@@ -368,6 +416,7 @@ def timeseries(
"asn": asn,
"bot_class": bot_class,
"browser_family": browser_family,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
@@ -400,6 +449,7 @@ def timeseries_groups_v2(
"BOT_CLASS",
"BROWSER",
"BROWSER_FAMILY",
+ "CONTENT_TYPE",
"DEVICE_TYPE",
"HTTP_PROTOCOL",
"HTTP_VERSION",
@@ -414,6 +464,27 @@ def timeseries_groups_v2(
api_traffic: List[Literal["API", "NON_API"]] | Omit = omit,
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -458,6 +529,8 @@ def timeseries_groups_v2(
bot_class: Filters results by bot class. Refer to
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
+ content_type: Filters results by content type category.
+
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.
@@ -525,6 +598,7 @@ def timeseries_groups_v2(
"api_traffic": api_traffic,
"asn": asn,
"bot_class": bot_class,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
@@ -599,6 +673,7 @@ async def summary_v2(
"BOT_CLASS",
"BROWSER",
"BROWSER_FAMILY",
+ "CONTENT_TYPE",
"DEVICE_TYPE",
"HTTP_PROTOCOL",
"HTTP_VERSION",
@@ -612,6 +687,27 @@ async def summary_v2(
api_traffic: List[Literal["API", "NON_API"]] | Omit = omit,
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -651,6 +747,8 @@ async def summary_v2(
bot_class: Filters results by bot class. Refer to
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
+ content_type: Filters results by content type category.
+
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.
@@ -714,6 +812,7 @@ async def summary_v2(
"api_traffic": api_traffic,
"asn": asn,
"bot_class": bot_class,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
@@ -745,6 +844,27 @@ async def timeseries(
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -788,6 +908,8 @@ async def timeseries(
browser_family: Filters results by browser family.
+ content_type: Filters results by content type category.
+
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.
@@ -850,6 +972,7 @@ async def timeseries(
"asn": asn,
"bot_class": bot_class,
"browser_family": browser_family,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
@@ -882,6 +1005,7 @@ async def timeseries_groups_v2(
"BOT_CLASS",
"BROWSER",
"BROWSER_FAMILY",
+ "CONTENT_TYPE",
"DEVICE_TYPE",
"HTTP_PROTOCOL",
"HTTP_VERSION",
@@ -896,6 +1020,27 @@ async def timeseries_groups_v2(
api_traffic: List[Literal["API", "NON_API"]] | Omit = omit,
asn: SequenceNotStr[str] | Omit = omit,
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
+ content_type: List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ]
+ | Omit = omit,
continent: SequenceNotStr[str] | Omit = omit,
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
date_range: SequenceNotStr[str] | Omit = omit,
@@ -940,6 +1085,8 @@ async def timeseries_groups_v2(
bot_class: Filters results by bot class. Refer to
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
+ content_type: Filters results by content type category.
+
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.
@@ -1007,6 +1154,7 @@ async def timeseries_groups_v2(
"api_traffic": api_traffic,
"asn": asn,
"bot_class": bot_class,
+ "content_type": content_type,
"continent": continent,
"date_end": date_end,
"date_range": date_range,
diff --git a/src/cloudflare/resources/realtime_kit/api.md b/src/cloudflare/resources/realtime_kit/api.md
index 0f7eb303012..ac8ee9d1a55 100644
--- a/src/cloudflare/resources/realtime_kit/api.md
+++ b/src/cloudflare/resources/realtime_kit/api.md
@@ -10,7 +10,7 @@ from cloudflare.types.realtime_kit import AppGetResponse, AppPostResponse
Methods:
-- client.realtime_kit.apps.get(\*, account_id) -> AppGetResponse
+- client.realtime_kit.apps.get(\*, account_id, \*\*params) -> AppGetResponse
- client.realtime_kit.apps.post(\*, account_id, \*\*params) -> AppPostResponse
## Meetings
@@ -175,6 +175,7 @@ from cloudflare.types.realtime_kit import (
LivestreamGetActiveLivestreamsForLivestreamIDResponse,
LivestreamGetAllLivestreamsResponse,
LivestreamGetLivestreamAnalyticsCompleteResponse,
+ LivestreamGetLivestreamAnalyticsDaywiseResponse,
LivestreamGetLivestreamSessionDetailsForSessionIDResponse,
LivestreamGetLivestreamSessionForLivestreamIDResponse,
LivestreamGetMeetingActiveLivestreamsResponse,
@@ -190,6 +191,7 @@ Methods:
- client.realtime_kit.livestreams.get_active_livestreams_for_livestream_id(livestream_id, \*, account_id, app_id) -> LivestreamGetActiveLivestreamsForLivestreamIDResponse
- client.realtime_kit.livestreams.get_all_livestreams(app_id, \*, account_id, \*\*params) -> LivestreamGetAllLivestreamsResponse
- client.realtime_kit.livestreams.get_livestream_analytics_complete(app_id, \*, account_id, \*\*params) -> LivestreamGetLivestreamAnalyticsCompleteResponse
+- client.realtime_kit.livestreams.get_livestream_analytics_daywise(app_id, \*, account_id, \*\*params) -> LivestreamGetLivestreamAnalyticsDaywiseResponse
- client.realtime_kit.livestreams.get_livestream_session_details_for_session_id(livestream_session_id, \*, account_id, app_id) -> LivestreamGetLivestreamSessionDetailsForSessionIDResponse
- client.realtime_kit.livestreams.get_livestream_session_for_livestream_id(livestream_id, \*, account_id, app_id, \*\*params) -> LivestreamGetLivestreamSessionForLivestreamIDResponse
- client.realtime_kit.livestreams.get_meeting_active_livestreams(meeting_id, \*, account_id, app_id) -> LivestreamGetMeetingActiveLivestreamsResponse
diff --git a/src/cloudflare/resources/realtime_kit/apps.py b/src/cloudflare/resources/realtime_kit/apps.py
index 1d030d18f9f..f9e0c7167e5 100644
--- a/src/cloudflare/resources/realtime_kit/apps.py
+++ b/src/cloudflare/resources/realtime_kit/apps.py
@@ -2,9 +2,11 @@
from __future__ import annotations
+from typing_extensions import Literal
+
import httpx
-from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -15,7 +17,7 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
-from ...types.realtime_kit import app_post_params
+from ...types.realtime_kit import app_get_params, app_post_params
from ...types.realtime_kit.app_get_response import AppGetResponse
from ...types.realtime_kit.app_post_response import AppPostResponse
@@ -46,6 +48,10 @@ def get(
self,
*,
account_id: str,
+ page_no: int | Omit = omit,
+ per_page: int | Omit = omit,
+ search: str | Omit = omit,
+ sort_order: Literal["ASC", "DESC"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,6 +65,14 @@ def get(
Args:
account_id: The account identifier tag.
+ page_no: The page number from which you want your page search results to be displayed.
+
+ per_page: Number of results per page.
+
+ search: Search string that matches apps by name.
+
+ sort_order: Sort order for apps by creation time.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -72,7 +86,19 @@ def get(
return self._get(
path_template("/accounts/{account_id}/realtime/kit/apps", account_id=account_id),
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_no": page_no,
+ "per_page": per_page,
+ "search": search,
+ "sort_order": sort_order,
+ },
+ app_get_params.AppGetParams,
+ ),
),
cast_to=AppGetResponse,
)
@@ -93,6 +119,8 @@ def post(
Create new app for your account
Args:
+ account_id: The account identifier tag.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -137,6 +165,10 @@ async def get(
self,
*,
account_id: str,
+ page_no: int | Omit = omit,
+ per_page: int | Omit = omit,
+ search: str | Omit = omit,
+ sort_order: Literal["ASC", "DESC"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -150,6 +182,14 @@ async def get(
Args:
account_id: The account identifier tag.
+ page_no: The page number from which you want your page search results to be displayed.
+
+ per_page: Number of results per page.
+
+ search: Search string that matches apps by name.
+
+ sort_order: Sort order for apps by creation time.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -163,7 +203,19 @@ async def get(
return await self._get(
path_template("/accounts/{account_id}/realtime/kit/apps", account_id=account_id),
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(
+ {
+ "page_no": page_no,
+ "per_page": per_page,
+ "search": search,
+ "sort_order": sort_order,
+ },
+ app_get_params.AppGetParams,
+ ),
),
cast_to=AppGetResponse,
)
@@ -184,6 +236,8 @@ async def post(
Create new app for your account
Args:
+ account_id: The account identifier tag.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/cloudflare/resources/realtime_kit/livestreams.py b/src/cloudflare/resources/realtime_kit/livestreams.py
index 10663fa2d29..eb97c9ac46e 100644
--- a/src/cloudflare/resources/realtime_kit/livestreams.py
+++ b/src/cloudflare/resources/realtime_kit/livestreams.py
@@ -24,6 +24,7 @@
livestream_get_all_livestreams_params,
livestream_create_independent_livestream_params,
livestream_start_livestreaming_a_meeting_params,
+ livestream_get_livestream_analytics_daywise_params,
livestream_get_livestream_analytics_complete_params,
livestream_get_livestream_session_for_livestream_id_params,
)
@@ -41,6 +42,9 @@
from ...types.realtime_kit.livestream_get_meeting_active_livestreams_response import (
LivestreamGetMeetingActiveLivestreamsResponse,
)
+from ...types.realtime_kit.livestream_get_livestream_analytics_daywise_response import (
+ LivestreamGetLivestreamAnalyticsDaywiseResponse,
+)
from ...types.realtime_kit.livestream_get_livestream_analytics_complete_response import (
LivestreamGetLivestreamAnalyticsCompleteResponse,
)
@@ -266,8 +270,9 @@ def get_livestream_analytics_complete(
app_id: str,
*,
account_id: str,
- end_time: Union[str, datetime] | Omit = omit,
- start_time: Union[str, datetime] | Omit = omit,
+ end_time: int | Omit = omit,
+ filters: str | Omit = omit,
+ start_time: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -283,9 +288,13 @@ def get_livestream_analytics_complete(
app_id: The app identifier tag.
- end_time: Specify the end time range in ISO format to access the livestream analytics.
+ end_time: Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
+
+ filters: Optional filters for livestream analytics.
- start_time: Specify the start time range in ISO format to access the livestream analytics.
+ start_time: Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
extra_headers: Send extra headers
@@ -313,6 +322,7 @@ def get_livestream_analytics_complete(
query=maybe_transform(
{
"end_time": end_time,
+ "filters": filters,
"start_time": start_time,
},
livestream_get_livestream_analytics_complete_params.LivestreamGetLivestreamAnalyticsCompleteParams,
@@ -321,6 +331,72 @@ def get_livestream_analytics_complete(
cast_to=LivestreamGetLivestreamAnalyticsCompleteResponse,
)
+ def get_livestream_analytics_daywise(
+ self,
+ app_id: str,
+ *,
+ account_id: str,
+ end_time: int | Omit = omit,
+ filters: str | Omit = omit,
+ start_time: int | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> LivestreamGetLivestreamAnalyticsDaywiseResponse:
+ """
+ Returns day-wise livestream analytics for the specified time range.
+
+ Args:
+ account_id: The account identifier tag.
+
+ app_id: The app identifier tag.
+
+ end_time: Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
+
+ filters: Optional filters for livestream analytics.
+
+ start_time: Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
+
+ 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 app_id:
+ raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}")
+ return self._get(
+ path_template(
+ "/accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/daywise",
+ account_id=account_id,
+ app_id=app_id,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "end_time": end_time,
+ "filters": filters,
+ "start_time": start_time,
+ },
+ livestream_get_livestream_analytics_daywise_params.LivestreamGetLivestreamAnalyticsDaywiseParams,
+ ),
+ ),
+ cast_to=LivestreamGetLivestreamAnalyticsDaywiseResponse,
+ )
+
def get_livestream_session_details_for_session_id(
self,
livestream_session_id: str,
@@ -865,8 +941,9 @@ async def get_livestream_analytics_complete(
app_id: str,
*,
account_id: str,
- end_time: Union[str, datetime] | Omit = omit,
- start_time: Union[str, datetime] | Omit = omit,
+ end_time: int | Omit = omit,
+ filters: str | Omit = omit,
+ start_time: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -882,9 +959,13 @@ async def get_livestream_analytics_complete(
app_id: The app identifier tag.
- end_time: Specify the end time range in ISO format to access the livestream analytics.
+ end_time: Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
- start_time: Specify the start time range in ISO format to access the livestream analytics.
+ filters: Optional filters for livestream analytics.
+
+ start_time: Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
extra_headers: Send extra headers
@@ -912,6 +993,7 @@ async def get_livestream_analytics_complete(
query=await async_maybe_transform(
{
"end_time": end_time,
+ "filters": filters,
"start_time": start_time,
},
livestream_get_livestream_analytics_complete_params.LivestreamGetLivestreamAnalyticsCompleteParams,
@@ -920,6 +1002,72 @@ async def get_livestream_analytics_complete(
cast_to=LivestreamGetLivestreamAnalyticsCompleteResponse,
)
+ async def get_livestream_analytics_daywise(
+ self,
+ app_id: str,
+ *,
+ account_id: str,
+ end_time: int | Omit = omit,
+ filters: str | Omit = omit,
+ start_time: int | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> LivestreamGetLivestreamAnalyticsDaywiseResponse:
+ """
+ Returns day-wise livestream analytics for the specified time range.
+
+ Args:
+ account_id: The account identifier tag.
+
+ app_id: The app identifier tag.
+
+ end_time: Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
+
+ filters: Optional filters for livestream analytics.
+
+ start_time: Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
+
+ 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 app_id:
+ raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}")
+ return await self._get(
+ path_template(
+ "/accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/daywise",
+ account_id=account_id,
+ app_id=app_id,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "end_time": end_time,
+ "filters": filters,
+ "start_time": start_time,
+ },
+ livestream_get_livestream_analytics_daywise_params.LivestreamGetLivestreamAnalyticsDaywiseParams,
+ ),
+ ),
+ cast_to=LivestreamGetLivestreamAnalyticsDaywiseResponse,
+ )
+
async def get_livestream_session_details_for_session_id(
self,
livestream_session_id: str,
@@ -1271,6 +1419,9 @@ def __init__(self, livestreams: LivestreamsResource) -> None:
self.get_livestream_analytics_complete = to_raw_response_wrapper(
livestreams.get_livestream_analytics_complete,
)
+ self.get_livestream_analytics_daywise = to_raw_response_wrapper(
+ livestreams.get_livestream_analytics_daywise,
+ )
self.get_livestream_session_details_for_session_id = to_raw_response_wrapper(
livestreams.get_livestream_session_details_for_session_id,
)
@@ -1307,6 +1458,9 @@ def __init__(self, livestreams: AsyncLivestreamsResource) -> None:
self.get_livestream_analytics_complete = async_to_raw_response_wrapper(
livestreams.get_livestream_analytics_complete,
)
+ self.get_livestream_analytics_daywise = async_to_raw_response_wrapper(
+ livestreams.get_livestream_analytics_daywise,
+ )
self.get_livestream_session_details_for_session_id = async_to_raw_response_wrapper(
livestreams.get_livestream_session_details_for_session_id,
)
@@ -1343,6 +1497,9 @@ def __init__(self, livestreams: LivestreamsResource) -> None:
self.get_livestream_analytics_complete = to_streamed_response_wrapper(
livestreams.get_livestream_analytics_complete,
)
+ self.get_livestream_analytics_daywise = to_streamed_response_wrapper(
+ livestreams.get_livestream_analytics_daywise,
+ )
self.get_livestream_session_details_for_session_id = to_streamed_response_wrapper(
livestreams.get_livestream_session_details_for_session_id,
)
@@ -1379,6 +1536,9 @@ def __init__(self, livestreams: AsyncLivestreamsResource) -> None:
self.get_livestream_analytics_complete = async_to_streamed_response_wrapper(
livestreams.get_livestream_analytics_complete,
)
+ self.get_livestream_analytics_daywise = async_to_streamed_response_wrapper(
+ livestreams.get_livestream_analytics_daywise,
+ )
self.get_livestream_session_details_for_session_id = async_to_streamed_response_wrapper(
livestreams.get_livestream_session_details_for_session_id,
)
diff --git a/src/cloudflare/resources/realtime_kit/meetings.py b/src/cloudflare/resources/realtime_kit/meetings.py
index c82b9e20b59..738a15822e2 100644
--- a/src/cloudflare/resources/realtime_kit/meetings.py
+++ b/src/cloudflare/resources/realtime_kit/meetings.py
@@ -77,6 +77,7 @@ def create(
session_keep_alive_time_in_secs: float | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: Optional[str] | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -115,6 +116,8 @@ def create(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -141,6 +144,7 @@ def create(
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_create_params.MeetingCreateParams,
),
@@ -351,6 +355,7 @@ def get(
per_page: float | Omit = omit,
search: str | Omit = omit,
start_time: Union[str, datetime] | Omit = omit,
+ status: Literal["ACTIVE", "INACTIVE"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -378,6 +383,8 @@ def get(
start_time: The start time range for which you want to retrieve the meetings. The time must
be specified in ISO format.
+ status: Filter meetings by status.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -406,6 +413,7 @@ def get(
"per_page": per_page,
"search": search,
"start_time": start_time,
+ "status": status,
},
meeting_get_params.MeetingGetParams,
),
@@ -649,6 +657,7 @@ def replace_meeting_by_id(
session_keep_alive_time_in_secs: float | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: Optional[str] | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -687,6 +696,8 @@ def replace_meeting_by_id(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -718,6 +729,7 @@ def replace_meeting_by_id(
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_replace_meeting_by_id_params.MeetingReplaceMeetingByIDParams,
),
@@ -737,10 +749,12 @@ def update_meeting_by_id(
live_stream_on_start: bool | Omit = omit,
persist_chat: bool | Omit = omit,
record_on_start: bool | Omit = omit,
+ recording_config: meeting_update_meeting_by_id_params.RecordingConfig | Omit = omit,
session_keep_alive_time_in_secs: float | Omit = omit,
status: Literal["ACTIVE", "INACTIVE"] | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: str | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -767,6 +781,10 @@ def update_meeting_by_id(
record_on_start: Specifies if the meeting should start getting recorded as soon as someone joins
the meeting.
+ recording_config: Recording Configurations to be used for this meeting. This level of configs
+ takes higher preference over App level configs on the RealtimeKit developer
+ portal.
+
session_keep_alive_time_in_secs: Time in seconds, for which a session remains active, after the last participant
has left the meeting.
@@ -778,6 +796,8 @@ def update_meeting_by_id(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -805,10 +825,12 @@ def update_meeting_by_id(
"live_stream_on_start": live_stream_on_start,
"persist_chat": persist_chat,
"record_on_start": record_on_start,
+ "recording_config": recording_config,
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"status": status,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_update_meeting_by_id_params.MeetingUpdateMeetingByIDParams,
),
@@ -852,6 +874,7 @@ async def create(
session_keep_alive_time_in_secs: float | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: Optional[str] | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -890,6 +913,8 @@ async def create(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -916,6 +941,7 @@ async def create(
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_create_params.MeetingCreateParams,
),
@@ -1126,6 +1152,7 @@ async def get(
per_page: float | Omit = omit,
search: str | Omit = omit,
start_time: Union[str, datetime] | Omit = omit,
+ status: Literal["ACTIVE", "INACTIVE"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1153,6 +1180,8 @@ async def get(
start_time: The start time range for which you want to retrieve the meetings. The time must
be specified in ISO format.
+ status: Filter meetings by status.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1181,6 +1210,7 @@ async def get(
"per_page": per_page,
"search": search,
"start_time": start_time,
+ "status": status,
},
meeting_get_params.MeetingGetParams,
),
@@ -1426,6 +1456,7 @@ async def replace_meeting_by_id(
session_keep_alive_time_in_secs: float | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: Optional[str] | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1464,6 +1495,8 @@ async def replace_meeting_by_id(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1495,6 +1528,7 @@ async def replace_meeting_by_id(
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_replace_meeting_by_id_params.MeetingReplaceMeetingByIDParams,
),
@@ -1514,10 +1548,12 @@ async def update_meeting_by_id(
live_stream_on_start: bool | Omit = omit,
persist_chat: bool | Omit = omit,
record_on_start: bool | Omit = omit,
+ recording_config: meeting_update_meeting_by_id_params.RecordingConfig | Omit = omit,
session_keep_alive_time_in_secs: float | Omit = omit,
status: Literal["ACTIVE", "INACTIVE"] | Omit = omit,
summarize_on_end: bool | Omit = omit,
title: str | Omit = omit,
+ transcribe_on_end: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1544,6 +1580,10 @@ async def update_meeting_by_id(
record_on_start: Specifies if the meeting should start getting recorded as soon as someone joins
the meeting.
+ recording_config: Recording Configurations to be used for this meeting. This level of configs
+ takes higher preference over App level configs on the RealtimeKit developer
+ portal.
+
session_keep_alive_time_in_secs: Time in seconds, for which a session remains active, after the last participant
has left the meeting.
@@ -1555,6 +1595,8 @@ async def update_meeting_by_id(
title: Title of the meeting
+ transcribe_on_end: Automatically generate transcripts when the meeting ends.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1582,10 +1624,12 @@ async def update_meeting_by_id(
"live_stream_on_start": live_stream_on_start,
"persist_chat": persist_chat,
"record_on_start": record_on_start,
+ "recording_config": recording_config,
"session_keep_alive_time_in_secs": session_keep_alive_time_in_secs,
"status": status,
"summarize_on_end": summarize_on_end,
"title": title,
+ "transcribe_on_end": transcribe_on_end,
},
meeting_update_meeting_by_id_params.MeetingUpdateMeetingByIDParams,
),
diff --git a/src/cloudflare/resources/secrets_store/api.md b/src/cloudflare/resources/secrets_store/api.md
index 2b7417b0248..626c758fcc0 100644
--- a/src/cloudflare/resources/secrets_store/api.md
+++ b/src/cloudflare/resources/secrets_store/api.md
@@ -5,7 +5,7 @@
Types:
```python
-from cloudflare.types.secrets_store import StoreCreateResponse, StoreListResponse
+from cloudflare.types.secrets_store import StoreCreateResponse, StoreListResponse, StoreGetResponse
```
Methods:
@@ -13,6 +13,7 @@ Methods:
- client.secrets_store.stores.create(\*, account_id, \*\*params) -> Optional[StoreCreateResponse]
- client.secrets_store.stores.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[StoreListResponse]
- client.secrets_store.stores.delete(store_id, \*, account_id, \*\*params) -> object
+- client.secrets_store.stores.get(store_id, \*, account_id) -> Optional[StoreGetResponse]
### Secrets
diff --git a/src/cloudflare/resources/secrets_store/stores/stores.py b/src/cloudflare/resources/secrets_store/stores/stores.py
index 7fd771d5842..8c094032a67 100644
--- a/src/cloudflare/resources/secrets_store/stores/stores.py
+++ b/src/cloudflare/resources/secrets_store/stores/stores.py
@@ -29,6 +29,7 @@
from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from ...._base_client import AsyncPaginator, make_request_options
from ....types.secrets_store import store_list_params, store_create_params, store_delete_params
+from ....types.secrets_store.store_get_response import StoreGetResponse
from ....types.secrets_store.store_list_response import StoreListResponse
from ....types.secrets_store.store_create_response import StoreCreateResponse
@@ -218,6 +219,52 @@ def delete(
cast_to=cast(Type[object], ResultWrapper[object]),
)
+ def get(
+ self,
+ store_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[StoreGetResponse]:
+ """
+ Returns details of a single store
+
+ Args:
+ account_id: Account Identifier
+
+ store_id: Store 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 store_id:
+ raise ValueError(f"Expected a non-empty value for `store_id` but received {store_id!r}")
+ return self._get(
+ path_template(
+ "/accounts/{account_id}/secrets_store/stores/{store_id}", account_id=account_id, store_id=store_id
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[StoreGetResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[StoreGetResponse]], ResultWrapper[StoreGetResponse]),
+ )
+
class AsyncStoresResource(AsyncAPIResource):
@cached_property
@@ -402,6 +449,52 @@ async def delete(
cast_to=cast(Type[object], ResultWrapper[object]),
)
+ async def get(
+ self,
+ store_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[StoreGetResponse]:
+ """
+ Returns details of a single store
+
+ Args:
+ account_id: Account Identifier
+
+ store_id: Store 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 store_id:
+ raise ValueError(f"Expected a non-empty value for `store_id` but received {store_id!r}")
+ return await self._get(
+ path_template(
+ "/accounts/{account_id}/secrets_store/stores/{store_id}", account_id=account_id, store_id=store_id
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[StoreGetResponse]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[StoreGetResponse]], ResultWrapper[StoreGetResponse]),
+ )
+
class StoresResourceWithRawResponse:
def __init__(self, stores: StoresResource) -> None:
@@ -416,6 +509,9 @@ def __init__(self, stores: StoresResource) -> None:
self.delete = to_raw_response_wrapper(
stores.delete,
)
+ self.get = to_raw_response_wrapper(
+ stores.get,
+ )
@cached_property
def secrets(self) -> SecretsResourceWithRawResponse:
@@ -435,6 +531,9 @@ def __init__(self, stores: AsyncStoresResource) -> None:
self.delete = async_to_raw_response_wrapper(
stores.delete,
)
+ self.get = async_to_raw_response_wrapper(
+ stores.get,
+ )
@cached_property
def secrets(self) -> AsyncSecretsResourceWithRawResponse:
@@ -454,6 +553,9 @@ def __init__(self, stores: StoresResource) -> None:
self.delete = to_streamed_response_wrapper(
stores.delete,
)
+ self.get = to_streamed_response_wrapper(
+ stores.get,
+ )
@cached_property
def secrets(self) -> SecretsResourceWithStreamingResponse:
@@ -473,6 +575,9 @@ def __init__(self, stores: AsyncStoresResource) -> None:
self.delete = async_to_streamed_response_wrapper(
stores.delete,
)
+ self.get = async_to_streamed_response_wrapper(
+ stores.get,
+ )
@cached_property
def secrets(self) -> AsyncSecretsResourceWithStreamingResponse:
diff --git a/src/cloudflare/resources/spectrum/apps.py b/src/cloudflare/resources/spectrum/apps.py
index ccb359d93d9..1521161daaa 100644
--- a/src/cloudflare/resources/spectrum/apps.py
+++ b/src/cloudflare/resources/spectrum/apps.py
@@ -70,6 +70,7 @@ def create(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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 +122,9 @@ def create(
tls: The type of TLS termination associated with the application.
+ virtual_network_id: Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -187,6 +191,7 @@ def create(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -213,6 +218,7 @@ def create(
"origin_port": origin_port,
"proxy_protocol": proxy_protocol,
"tls": tls,
+ "virtual_network_id": virtual_network_id,
},
app_create_params.AppCreateParams,
),
@@ -246,6 +252,7 @@ def update(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -299,6 +306,9 @@ def update(
tls: The type of TLS termination associated with the application.
+ virtual_network_id: Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -369,6 +379,7 @@ def update(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -397,6 +408,7 @@ def update(
"origin_port": origin_port,
"proxy_protocol": proxy_protocol,
"tls": tls,
+ "virtual_network_id": virtual_network_id,
},
app_update_params.AppUpdateParams,
),
@@ -605,6 +617,7 @@ async def create(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -656,6 +669,9 @@ async def create(
tls: The type of TLS termination associated with the application.
+ virtual_network_id: Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -722,6 +738,7 @@ async def create(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -748,6 +765,7 @@ async def create(
"origin_port": origin_port,
"proxy_protocol": proxy_protocol,
"tls": tls,
+ "virtual_network_id": virtual_network_id,
},
app_create_params.AppCreateParams,
),
@@ -781,6 +799,7 @@ async def update(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -834,6 +853,9 @@ async def update(
tls: The type of TLS termination associated with the application.
+ virtual_network_id: Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -904,6 +926,7 @@ async def update(
origin_port: OriginPortParam | Omit = omit,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | Omit = omit,
tls: Literal["off", "flexible", "full", "strict"] | Omit = omit,
+ virtual_network_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -932,6 +955,7 @@ async def update(
"origin_port": origin_port,
"proxy_protocol": proxy_protocol,
"tls": tls,
+ "virtual_network_id": virtual_network_id,
},
app_update_params.AppUpdateParams,
),
diff --git a/src/cloudflare/resources/workers/api.md b/src/cloudflare/resources/workers/api.md
index f556fd5ff25..5cf9cb881a4 100644
--- a/src/cloudflare/resources/workers/api.md
+++ b/src/cloudflare/resources/workers/api.md
@@ -337,3 +337,16 @@ Methods:
- client.workers.observability.destinations.update(slug, \*, account_id, \*\*params) -> DestinationUpdateResponse
- client.workers.observability.destinations.list(\*, account_id, \*\*params) -> SyncSinglePage[DestinationListResponse]
- client.workers.observability.destinations.delete(slug, \*, account_id) -> Optional[DestinationDeleteResponse]
+
+### Queries
+
+Types:
+
+```python
+from cloudflare.types.workers.observability import QueryCreateResponse, QueryListResponse
+```
+
+Methods:
+
+- client.workers.observability.queries.create(\*, account_id, \*\*params) -> QueryCreateResponse
+- client.workers.observability.queries.list(\*, account_id, \*\*params) -> SyncSinglePage[QueryListResponse]
diff --git a/src/cloudflare/resources/workers/observability/__init__.py b/src/cloudflare/resources/workers/observability/__init__.py
index 1e48df79576..846fd54e49c 100644
--- a/src/cloudflare/resources/workers/observability/__init__.py
+++ b/src/cloudflare/resources/workers/observability/__init__.py
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .queries import (
+ QueriesResource,
+ AsyncQueriesResource,
+ QueriesResourceWithRawResponse,
+ AsyncQueriesResourceWithRawResponse,
+ QueriesResourceWithStreamingResponse,
+ AsyncQueriesResourceWithStreamingResponse,
+)
from .telemetry import (
TelemetryResource,
AsyncTelemetryResource,
@@ -38,6 +46,12 @@
"AsyncDestinationsResourceWithRawResponse",
"DestinationsResourceWithStreamingResponse",
"AsyncDestinationsResourceWithStreamingResponse",
+ "QueriesResource",
+ "AsyncQueriesResource",
+ "QueriesResourceWithRawResponse",
+ "AsyncQueriesResourceWithRawResponse",
+ "QueriesResourceWithStreamingResponse",
+ "AsyncQueriesResourceWithStreamingResponse",
"ObservabilityResource",
"AsyncObservabilityResource",
"ObservabilityResourceWithRawResponse",
diff --git a/src/cloudflare/resources/workers/observability/observability.py b/src/cloudflare/resources/workers/observability/observability.py
index e1caadbdd68..cfe15f90ba0 100644
--- a/src/cloudflare/resources/workers/observability/observability.py
+++ b/src/cloudflare/resources/workers/observability/observability.py
@@ -2,6 +2,14 @@
from __future__ import annotations
+from .queries import (
+ QueriesResource,
+ AsyncQueriesResource,
+ QueriesResourceWithRawResponse,
+ AsyncQueriesResourceWithRawResponse,
+ QueriesResourceWithStreamingResponse,
+ AsyncQueriesResourceWithStreamingResponse,
+)
from .telemetry import (
TelemetryResource,
AsyncTelemetryResource,
@@ -33,6 +41,10 @@ def telemetry(self) -> TelemetryResource:
def destinations(self) -> DestinationsResource:
return DestinationsResource(self._client)
+ @cached_property
+ def queries(self) -> QueriesResource:
+ return QueriesResource(self._client)
+
@cached_property
def with_raw_response(self) -> ObservabilityResourceWithRawResponse:
"""
@@ -62,6 +74,10 @@ def telemetry(self) -> AsyncTelemetryResource:
def destinations(self) -> AsyncDestinationsResource:
return AsyncDestinationsResource(self._client)
+ @cached_property
+ def queries(self) -> AsyncQueriesResource:
+ return AsyncQueriesResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncObservabilityResourceWithRawResponse:
"""
@@ -94,6 +110,10 @@ def telemetry(self) -> TelemetryResourceWithRawResponse:
def destinations(self) -> DestinationsResourceWithRawResponse:
return DestinationsResourceWithRawResponse(self._observability.destinations)
+ @cached_property
+ def queries(self) -> QueriesResourceWithRawResponse:
+ return QueriesResourceWithRawResponse(self._observability.queries)
+
class AsyncObservabilityResourceWithRawResponse:
def __init__(self, observability: AsyncObservabilityResource) -> None:
@@ -107,6 +127,10 @@ def telemetry(self) -> AsyncTelemetryResourceWithRawResponse:
def destinations(self) -> AsyncDestinationsResourceWithRawResponse:
return AsyncDestinationsResourceWithRawResponse(self._observability.destinations)
+ @cached_property
+ def queries(self) -> AsyncQueriesResourceWithRawResponse:
+ return AsyncQueriesResourceWithRawResponse(self._observability.queries)
+
class ObservabilityResourceWithStreamingResponse:
def __init__(self, observability: ObservabilityResource) -> None:
@@ -120,6 +144,10 @@ def telemetry(self) -> TelemetryResourceWithStreamingResponse:
def destinations(self) -> DestinationsResourceWithStreamingResponse:
return DestinationsResourceWithStreamingResponse(self._observability.destinations)
+ @cached_property
+ def queries(self) -> QueriesResourceWithStreamingResponse:
+ return QueriesResourceWithStreamingResponse(self._observability.queries)
+
class AsyncObservabilityResourceWithStreamingResponse:
def __init__(self, observability: AsyncObservabilityResource) -> None:
@@ -132,3 +160,7 @@ def telemetry(self) -> AsyncTelemetryResourceWithStreamingResponse:
@cached_property
def destinations(self) -> AsyncDestinationsResourceWithStreamingResponse:
return AsyncDestinationsResourceWithStreamingResponse(self._observability.destinations)
+
+ @cached_property
+ def queries(self) -> AsyncQueriesResourceWithStreamingResponse:
+ return AsyncQueriesResourceWithStreamingResponse(self._observability.queries)
diff --git a/src/cloudflare/resources/workers/observability/queries.py b/src/cloudflare/resources/workers/observability/queries.py
new file mode 100644
index 00000000000..67deb66ac55
--- /dev/null
+++ b/src/cloudflare/resources/workers/observability/queries.py
@@ -0,0 +1,317 @@
+# 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 Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, 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 ....pagination import SyncSinglePage, AsyncSinglePage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.workers.observability import query_list_params, query_create_params
+from ....types.workers.observability.query_list_response import QueryListResponse
+from ....types.workers.observability.query_create_response import QueryCreateResponse
+
+__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,
+ description: Optional[str],
+ name: str,
+ parameters: query_create_params.Parameters,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> QueryCreateResponse:
+ """
+ Persist query for later use.
+
+ Args:
+ name: Query name
+
+ 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(
+ path_template("/accounts/{account_id}/workers/observability/queries", account_id=account_id),
+ body=maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ "parameters": parameters,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[QueryCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[QueryCreateResponse], ResultWrapper[QueryCreateResponse]),
+ )
+
+ def list(
+ self,
+ *,
+ account_id: str,
+ order: Literal["asc", "desc"] | Omit = omit,
+ order_by: Literal["created", "updated"] | Omit = omit,
+ page: float | Omit = omit,
+ per_page: float | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[QueryListResponse]:
+ """
+ List saved 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}")
+ return self._get_api_list(
+ path_template("/accounts/{account_id}/workers/observability/queries", account_id=account_id),
+ page=SyncSinglePage[QueryListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "order": order,
+ "order_by": order_by,
+ "page": page,
+ "per_page": per_page,
+ },
+ query_list_params.QueryListParams,
+ ),
+ ),
+ model=QueryListResponse,
+ )
+
+
+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,
+ description: Optional[str],
+ name: str,
+ parameters: query_create_params.Parameters,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,
+ ) -> QueryCreateResponse:
+ """
+ Persist query for later use.
+
+ Args:
+ name: Query name
+
+ 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(
+ path_template("/accounts/{account_id}/workers/observability/queries", account_id=account_id),
+ body=await async_maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ "parameters": parameters,
+ },
+ query_create_params.QueryCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[QueryCreateResponse]._unwrapper,
+ ),
+ cast_to=cast(Type[QueryCreateResponse], ResultWrapper[QueryCreateResponse]),
+ )
+
+ def list(
+ self,
+ *,
+ account_id: str,
+ order: Literal["asc", "desc"] | Omit = omit,
+ order_by: Literal["created", "updated"] | Omit = omit,
+ page: float | Omit = omit,
+ per_page: float | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[QueryListResponse, AsyncSinglePage[QueryListResponse]]:
+ """
+ List saved 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}")
+ return self._get_api_list(
+ path_template("/accounts/{account_id}/workers/observability/queries", account_id=account_id),
+ page=AsyncSinglePage[QueryListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "order": order,
+ "order_by": order_by,
+ "page": page,
+ "per_page": per_page,
+ },
+ query_list_params.QueryListParams,
+ ),
+ ),
+ model=QueryListResponse,
+ )
+
+
+class QueriesResourceWithRawResponse:
+ def __init__(self, queries: QueriesResource) -> None:
+ self._queries = queries
+
+ self.create = to_raw_response_wrapper(
+ queries.create,
+ )
+ self.list = to_raw_response_wrapper(
+ queries.list,
+ )
+
+
+class AsyncQueriesResourceWithRawResponse:
+ def __init__(self, queries: AsyncQueriesResource) -> None:
+ self._queries = queries
+
+ self.create = async_to_raw_response_wrapper(
+ queries.create,
+ )
+ self.list = async_to_raw_response_wrapper(
+ queries.list,
+ )
+
+
+class QueriesResourceWithStreamingResponse:
+ def __init__(self, queries: QueriesResource) -> None:
+ self._queries = queries
+
+ self.create = to_streamed_response_wrapper(
+ queries.create,
+ )
+ self.list = to_streamed_response_wrapper(
+ queries.list,
+ )
+
+
+class AsyncQueriesResourceWithStreamingResponse:
+ def __init__(self, queries: AsyncQueriesResource) -> None:
+ self._queries = queries
+
+ self.create = async_to_streamed_response_wrapper(
+ queries.create,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ queries.list,
+ )
diff --git a/src/cloudflare/resources/zero_trust/access/ai_controls/mcp/servers.py b/src/cloudflare/resources/zero_trust/access/ai_controls/mcp/servers.py
index c62fa0a83c9..7d5b82cda24 100644
--- a/src/cloudflare/resources/zero_trust/access/ai_controls/mcp/servers.py
+++ b/src/cloudflare/resources/zero_trust/access/ai_controls/mcp/servers.py
@@ -23,6 +23,7 @@
from ......types.zero_trust.access.ai_controls.mcp import server_list_params, server_create_params, server_update_params
from ......types.zero_trust.access.ai_controls.mcp.server_list_response import ServerListResponse
from ......types.zero_trust.access.ai_controls.mcp.server_read_response import ServerReadResponse
+from ......types.zero_trust.access.ai_controls.mcp.server_sync_response import ServerSyncResponse
from ......types.zero_trust.access.ai_controls.mcp.server_create_response import ServerCreateResponse
from ......types.zero_trust.access.ai_controls.mcp.server_delete_response import ServerDeleteResponse
from ......types.zero_trust.access.ai_controls.mcp.server_update_response import ServerUpdateResponse
@@ -60,6 +61,7 @@ def create(
name: str,
auth_credentials: str | Omit = omit,
description: Optional[str] | Omit = omit,
+ is_shared_oauth_callback_enabled: bool | Omit = omit,
updated_prompts: Iterable[server_create_params.UpdatedPrompt] | Omit = omit,
updated_tools: Iterable[server_create_params.UpdatedTool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -75,6 +77,12 @@ def create(
Args:
id: server id
+ is_shared_oauth_callback_enabled: When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -95,6 +103,7 @@ def create(
"name": name,
"auth_credentials": auth_credentials,
"description": description,
+ "is_shared_oauth_callback_enabled": is_shared_oauth_callback_enabled,
"updated_prompts": updated_prompts,
"updated_tools": updated_tools,
},
@@ -117,6 +126,7 @@ def update(
account_id: str,
auth_credentials: str | Omit = omit,
description: Optional[str] | Omit = omit,
+ is_shared_oauth_callback_enabled: bool | Omit = omit,
name: str | Omit = omit,
updated_prompts: Iterable[server_update_params.UpdatedPrompt] | Omit = omit,
updated_tools: Iterable[server_update_params.UpdatedTool] | Omit = omit,
@@ -133,6 +143,12 @@ def update(
Args:
id: server id
+ is_shared_oauth_callback_enabled: When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -151,6 +167,7 @@ def update(
{
"auth_credentials": auth_credentials,
"description": description,
+ "is_shared_oauth_callback_enabled": is_shared_oauth_callback_enabled,
"name": name,
"updated_prompts": updated_prompts,
"updated_tools": updated_tools,
@@ -312,9 +329,10 @@ def sync(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> object:
+ ) -> ServerSyncResponse:
"""
- Syncs an MCP server's tool catalog with the portal.
+ Syncs an MCP server's capabilities and returns the updated server state,
+ including any connection errors.
Args:
id: portal id
@@ -340,9 +358,9 @@ def sync(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[object]._unwrapper,
+ post_parser=ResultWrapper[ServerSyncResponse]._unwrapper,
),
- cast_to=cast(Type[object], ResultWrapper[object]),
+ cast_to=cast(Type[ServerSyncResponse], ResultWrapper[ServerSyncResponse]),
)
@@ -376,6 +394,7 @@ async def create(
name: str,
auth_credentials: str | Omit = omit,
description: Optional[str] | Omit = omit,
+ is_shared_oauth_callback_enabled: bool | Omit = omit,
updated_prompts: Iterable[server_create_params.UpdatedPrompt] | Omit = omit,
updated_tools: Iterable[server_create_params.UpdatedTool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -391,6 +410,12 @@ async def create(
Args:
id: server id
+ is_shared_oauth_callback_enabled: When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -411,6 +436,7 @@ async def create(
"name": name,
"auth_credentials": auth_credentials,
"description": description,
+ "is_shared_oauth_callback_enabled": is_shared_oauth_callback_enabled,
"updated_prompts": updated_prompts,
"updated_tools": updated_tools,
},
@@ -433,6 +459,7 @@ async def update(
account_id: str,
auth_credentials: str | Omit = omit,
description: Optional[str] | Omit = omit,
+ is_shared_oauth_callback_enabled: bool | Omit = omit,
name: str | Omit = omit,
updated_prompts: Iterable[server_update_params.UpdatedPrompt] | Omit = omit,
updated_tools: Iterable[server_update_params.UpdatedTool] | Omit = omit,
@@ -449,6 +476,12 @@ async def update(
Args:
id: server id
+ is_shared_oauth_callback_enabled: When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -467,6 +500,7 @@ async def update(
{
"auth_credentials": auth_credentials,
"description": description,
+ "is_shared_oauth_callback_enabled": is_shared_oauth_callback_enabled,
"name": name,
"updated_prompts": updated_prompts,
"updated_tools": updated_tools,
@@ -628,9 +662,10 @@ async def sync(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> object:
+ ) -> ServerSyncResponse:
"""
- Syncs an MCP server's tool catalog with the portal.
+ Syncs an MCP server's capabilities and returns the updated server state,
+ including any connection errors.
Args:
id: portal id
@@ -656,9 +691,9 @@ async def sync(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[object]._unwrapper,
+ post_parser=ResultWrapper[ServerSyncResponse]._unwrapper,
),
- cast_to=cast(Type[object], ResultWrapper[object]),
+ cast_to=cast(Type[ServerSyncResponse], ResultWrapper[ServerSyncResponse]),
)
diff --git a/src/cloudflare/resources/zero_trust/api.md b/src/cloudflare/resources/zero_trust/api.md
index 87eed3c8588..1238f6dcd24 100644
--- a/src/cloudflare/resources/zero_trust/api.md
+++ b/src/cloudflare/resources/zero_trust/api.md
@@ -467,6 +467,7 @@ from cloudflare.types.zero_trust.access.ai_controls.mcp import (
ServerListResponse,
ServerDeleteResponse,
ServerReadResponse,
+ ServerSyncResponse,
)
```
@@ -477,7 +478,7 @@ Methods:
- client.zero_trust.access.ai_controls.mcp.servers.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ServerListResponse]
- client.zero_trust.access.ai_controls.mcp.servers.delete(id, \*, account_id) -> ServerDeleteResponse
- client.zero_trust.access.ai_controls.mcp.servers.read(id, \*, account_id) -> ServerReadResponse
-- client.zero_trust.access.ai_controls.mcp.servers.sync(id, \*, account_id) -> object
+- client.zero_trust.access.ai_controls.mcp.servers.sync(id, \*, account_id) -> ServerSyncResponse
### GatewayCA
diff --git a/src/cloudflare/resources/zero_trust/identity_providers/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers/identity_providers.py
index 7f2f18f04fa..05bb58a0661 100644
--- a/src/cloudflare/resources/zero_trust/identity_providers/identity_providers.py
+++ b/src/cloudflare/resources/zero_trust/identity_providers/identity_providers.py
@@ -836,6 +836,60 @@ def create(
"""
...
+ @overload
+ def create(
+ self,
+ *,
+ config: identity_provider_create_params.AccessCloudflareConfig,
+ name: str,
+ type: IdentityProviderType,
+ account_id: str | Omit = omit,
+ zone_id: str | Omit = omit,
+ saml_certificate_set_id: str | Omit = omit,
+ scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IdentityProvider]:
+ """
+ Adds a new identity provider to Access.
+
+ Args:
+ config: The configuration parameters for the identity provider. To view the required
+ parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ name: The name of the identity provider, shown to users on the login page.
+
+ type: The type of identity provider. To determine the value for a specific provider,
+ refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
+
+ zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
+
+ saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+
+ scim_config: The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+
+ 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(["config", "name", "type"])
def create(
self,
@@ -850,7 +904,8 @@ def create(
| identity_provider_create_params.AccessOneloginConfig
| identity_provider_create_params.AccessPingoneConfig
| identity_provider_create_params.AccessSAMLConfig
- | identity_provider_create_params.AccessOnetimepinConfig,
+ | identity_provider_create_params.AccessOnetimepinConfig
+ | identity_provider_create_params.AccessCloudflareConfig,
name: str,
type: IdentityProviderType,
account_id: str | Omit = omit,
@@ -1705,6 +1760,63 @@ def update(
"""
...
+ @overload
+ def update(
+ self,
+ identity_provider_id: str,
+ *,
+ config: identity_provider_update_params.AccessCloudflareConfig,
+ name: str,
+ type: IdentityProviderType,
+ account_id: str | Omit = omit,
+ zone_id: str | Omit = omit,
+ saml_certificate_set_id: str | Omit = omit,
+ scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IdentityProvider]:
+ """
+ Updates a configured identity provider.
+
+ Args:
+ identity_provider_id: UUID.
+
+ config: The configuration parameters for the identity provider. To view the required
+ parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ name: The name of the identity provider, shown to users on the login page.
+
+ type: The type of identity provider. To determine the value for a specific provider,
+ refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
+
+ zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
+
+ saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+
+ scim_config: The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+
+ 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(["config", "name", "type"])
def update(
self,
@@ -1720,7 +1832,8 @@ def update(
| identity_provider_update_params.AccessOneloginConfig
| identity_provider_update_params.AccessPingoneConfig
| identity_provider_update_params.AccessSAMLConfig
- | identity_provider_update_params.AccessOnetimepinConfig,
+ | identity_provider_update_params.AccessOnetimepinConfig
+ | identity_provider_update_params.AccessCloudflareConfig,
name: str,
type: IdentityProviderType,
account_id: str | Omit = omit,
@@ -2776,6 +2889,60 @@ async def create(
"""
...
+ @overload
+ async def create(
+ self,
+ *,
+ config: identity_provider_create_params.AccessCloudflareConfig,
+ name: str,
+ type: IdentityProviderType,
+ account_id: str | Omit = omit,
+ zone_id: str | Omit = omit,
+ saml_certificate_set_id: str | Omit = omit,
+ scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IdentityProvider]:
+ """
+ Adds a new identity provider to Access.
+
+ Args:
+ config: The configuration parameters for the identity provider. To view the required
+ parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ name: The name of the identity provider, shown to users on the login page.
+
+ type: The type of identity provider. To determine the value for a specific provider,
+ refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
+
+ zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
+
+ saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+
+ scim_config: The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+
+ 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(["config", "name", "type"])
async def create(
self,
@@ -2790,7 +2957,8 @@ async def create(
| identity_provider_create_params.AccessOneloginConfig
| identity_provider_create_params.AccessPingoneConfig
| identity_provider_create_params.AccessSAMLConfig
- | identity_provider_create_params.AccessOnetimepinConfig,
+ | identity_provider_create_params.AccessOnetimepinConfig
+ | identity_provider_create_params.AccessCloudflareConfig,
name: str,
type: IdentityProviderType,
account_id: str | Omit = omit,
@@ -3645,6 +3813,63 @@ async def update(
"""
...
+ @overload
+ async def update(
+ self,
+ identity_provider_id: str,
+ *,
+ config: identity_provider_update_params.AccessCloudflareConfig,
+ name: str,
+ type: IdentityProviderType,
+ account_id: str | Omit = omit,
+ zone_id: str | Omit = omit,
+ saml_certificate_set_id: str | Omit = omit,
+ scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IdentityProvider]:
+ """
+ Updates a configured identity provider.
+
+ Args:
+ identity_provider_id: UUID.
+
+ config: The configuration parameters for the identity provider. To view the required
+ parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ name: The name of the identity provider, shown to users on the login page.
+
+ type: The type of identity provider. To determine the value for a specific provider,
+ refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+
+ account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
+
+ zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
+
+ saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+
+ scim_config: The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+
+ 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(["config", "name", "type"])
async def update(
self,
@@ -3660,7 +3885,8 @@ async def update(
| identity_provider_update_params.AccessOneloginConfig
| identity_provider_update_params.AccessPingoneConfig
| identity_provider_update_params.AccessSAMLConfig
- | identity_provider_update_params.AccessOnetimepinConfig,
+ | identity_provider_update_params.AccessOnetimepinConfig
+ | identity_provider_update_params.AccessCloudflareConfig,
name: str,
type: IdentityProviderType,
account_id: str | Omit = omit,
diff --git a/src/cloudflare/types/addressing/__init__.py b/src/cloudflare/types/addressing/__init__.py
index 1c96d654c50..2ea66f6d7f8 100644
--- a/src/cloudflare/types/addressing/__init__.py
+++ b/src/cloudflare/types/addressing/__init__.py
@@ -16,10 +16,3 @@
from .address_map_create_response import AddressMapCreateResponse as AddressMapCreateResponse
from .address_map_delete_response import AddressMapDeleteResponse as AddressMapDeleteResponse
from .loa_document_create_response import LOADocumentCreateResponse as LOADocumentCreateResponse
-from .regional_hostname_edit_params import RegionalHostnameEditParams as RegionalHostnameEditParams
-from .regional_hostname_get_response import RegionalHostnameGetResponse as RegionalHostnameGetResponse
-from .regional_hostname_create_params import RegionalHostnameCreateParams as RegionalHostnameCreateParams
-from .regional_hostname_edit_response import RegionalHostnameEditResponse as RegionalHostnameEditResponse
-from .regional_hostname_list_response import RegionalHostnameListResponse as RegionalHostnameListResponse
-from .regional_hostname_create_response import RegionalHostnameCreateResponse as RegionalHostnameCreateResponse
-from .regional_hostname_delete_response import RegionalHostnameDeleteResponse as RegionalHostnameDeleteResponse
diff --git a/src/cloudflare/types/addressing/regional_hostname_create_params.py b/src/cloudflare/types/addressing/regional_hostname_create_params.py
deleted file mode 100644
index c462c98f63d..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_create_params.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["RegionalHostnameCreateParams"]
-
-
-class RegionalHostnameCreateParams(TypedDict, total=False):
- zone_id: Required[str]
- """Identifier."""
-
- hostname: Required[str]
- """DNS hostname to be regionalized, must be a subdomain of the zone.
-
- Wildcards are supported for one level, e.g `*.example.com`
- """
-
- region_key: Required[str]
- """Identifying key for the region"""
-
- routing: str
- """Configure which routing method to use for the regional hostname"""
diff --git a/src/cloudflare/types/addressing/regional_hostname_create_response.py b/src/cloudflare/types/addressing/regional_hostname_create_response.py
deleted file mode 100644
index a0b471ef232..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_create_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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__ = ["RegionalHostnameCreateResponse"]
-
-
-class RegionalHostnameCreateResponse(BaseModel):
- created_on: datetime
- """When the regional hostname was created"""
-
- hostname: str
- """DNS hostname to be regionalized, must be a subdomain of the zone.
-
- Wildcards are supported for one level, e.g `*.example.com`
- """
-
- region_key: str
- """Identifying key for the region"""
-
- routing: Optional[str] = None
- """Configure which routing method to use for the regional hostname"""
diff --git a/src/cloudflare/types/addressing/regional_hostname_delete_response.py b/src/cloudflare/types/addressing/regional_hostname_delete_response.py
deleted file mode 100644
index f478054084e..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_delete_response.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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__ = ["RegionalHostnameDeleteResponse", "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 RegionalHostnameDeleteResponse(BaseModel):
- errors: List[Error]
-
- messages: List[Message]
-
- success: Literal[True]
- """Whether the API call was successful."""
diff --git a/src/cloudflare/types/addressing/regional_hostname_edit_response.py b/src/cloudflare/types/addressing/regional_hostname_edit_response.py
deleted file mode 100644
index d51b95ec7c7..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_edit_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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__ = ["RegionalHostnameEditResponse"]
-
-
-class RegionalHostnameEditResponse(BaseModel):
- created_on: datetime
- """When the regional hostname was created"""
-
- hostname: str
- """DNS hostname to be regionalized, must be a subdomain of the zone.
-
- Wildcards are supported for one level, e.g `*.example.com`
- """
-
- region_key: str
- """Identifying key for the region"""
-
- routing: Optional[str] = None
- """Configure which routing method to use for the regional hostname"""
diff --git a/src/cloudflare/types/addressing/regional_hostname_get_response.py b/src/cloudflare/types/addressing/regional_hostname_get_response.py
deleted file mode 100644
index c64330e33b0..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_get_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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__ = ["RegionalHostnameGetResponse"]
-
-
-class RegionalHostnameGetResponse(BaseModel):
- created_on: datetime
- """When the regional hostname was created"""
-
- hostname: str
- """DNS hostname to be regionalized, must be a subdomain of the zone.
-
- Wildcards are supported for one level, e.g `*.example.com`
- """
-
- region_key: str
- """Identifying key for the region"""
-
- routing: Optional[str] = None
- """Configure which routing method to use for the regional hostname"""
diff --git a/src/cloudflare/types/addressing/regional_hostname_list_response.py b/src/cloudflare/types/addressing/regional_hostname_list_response.py
deleted file mode 100644
index 35cc3743895..00000000000
--- a/src/cloudflare/types/addressing/regional_hostname_list_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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__ = ["RegionalHostnameListResponse"]
-
-
-class RegionalHostnameListResponse(BaseModel):
- created_on: datetime
- """When the regional hostname was created"""
-
- hostname: str
- """DNS hostname to be regionalized, must be a subdomain of the zone.
-
- Wildcards are supported for one level, e.g `*.example.com`
- """
-
- region_key: str
- """Identifying key for the region"""
-
- routing: Optional[str] = None
- """Configure which routing method to use for the regional hostname"""
diff --git a/src/cloudflare/types/addressing/regional_hostnames/__init__.py b/src/cloudflare/types/addressing/regional_hostnames/__init__.py
index cf8fe425ff5..f8ee8b14b1c 100644
--- a/src/cloudflare/types/addressing/regional_hostnames/__init__.py
+++ b/src/cloudflare/types/addressing/regional_hostnames/__init__.py
@@ -1,5 +1,3 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
-
-from .region_list_response import RegionListResponse as RegionListResponse
diff --git a/src/cloudflare/types/addressing/regional_hostnames/region_list_response.py b/src/cloudflare/types/addressing/regional_hostnames/region_list_response.py
deleted file mode 100644
index d17c6577e43..00000000000
--- a/src/cloudflare/types/addressing/regional_hostnames/region_list_response.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ...._models import BaseModel
-
-__all__ = ["RegionListResponse"]
-
-
-class RegionListResponse(BaseModel):
- key: Optional[str] = None
- """Identifying key for the region"""
-
- label: Optional[str] = None
- """Human-readable text label for the region"""
diff --git a/src/cloudflare/types/billing/__init__.py b/src/cloudflare/types/billing/__init__.py
index acd998672a9..c5e4154141b 100644
--- a/src/cloudflare/types/billing/__init__.py
+++ b/src/cloudflare/types/billing/__init__.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+from .usage_get_params import UsageGetParams as UsageGetParams
+from .usage_get_response import UsageGetResponse as UsageGetResponse
from .usage_paygo_params import UsagePaygoParams as UsagePaygoParams
from .profile_get_response import ProfileGetResponse as ProfileGetResponse
from .usage_paygo_response import UsagePaygoResponse as UsagePaygoResponse
diff --git a/src/cloudflare/types/billing/usage_get_params.py b/src/cloudflare/types/billing/usage_get_params.py
new file mode 100644
index 00000000000..13eee4f1c5a
--- /dev/null
+++ b/src/cloudflare/types/billing/usage_get_params.py
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import date
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["UsageGetParams"]
+
+
+class UsageGetParams(TypedDict, total=False):
+ account_id: Required[str]
+ """Represents a Cloudflare resource identifier tag."""
+
+ from_: Annotated[Union[str, date], PropertyInfo(alias="from", format="iso8601")]
+ """Start date for the usage query (ISO 8601).
+
+ Required if `to` is set. When omitted along with `to`, defaults to the start of
+ the current month. Filters by charge period (when consumption happened), not
+ billing period. The maximum date range is 31 days.
+ """
+
+ metric: str
+ """Filter results by billable metric id (e.g., workers_standard_requests)."""
+
+ to: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
+ """End date for the usage query (ISO 8601).
+
+ Required if `from` is set. When omitted along with `from`, defaults to today.
+ Filters by charge period (when consumption happened), not billing period. The
+ maximum date range is 31 days.
+ """
diff --git a/src/cloudflare/types/billing/usage_get_response.py b/src/cloudflare/types/billing/usage_get_response.py
new file mode 100644
index 00000000000..46d5fbaef26
--- /dev/null
+++ b/src/cloudflare/types/billing/usage_get_response.py
@@ -0,0 +1,174 @@
+# 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, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["UsageGetResponse", "UsageGetResponseItem"]
+
+
+class UsageGetResponseItem(BaseModel):
+ """
+ A single cost and usage record for a metered product within a specific charge period, aligned with the FinOps FOCUS v1.3 specification.
+ """
+
+ billing_account_id: str = FieldInfo(alias="BillingAccountId")
+ """Public identifier of the Cloudflare account (account tag)."""
+
+ billing_account_name: str = FieldInfo(alias="BillingAccountName")
+ """Display name of the Cloudflare account."""
+
+ charge_category: Literal["Usage"] = FieldInfo(alias="ChargeCategory")
+ """
+ Highest-level classification of a charge based on the nature of how it gets
+ billed. Currently only "Usage" is supported.
+ """
+
+ charge_description: str = FieldInfo(alias="ChargeDescription")
+ """Self-contained summary of the charge's purpose and price."""
+
+ charge_frequency: Literal["Usage-Based"] = FieldInfo(alias="ChargeFrequency")
+ """Indicates how often a charge occurs. Currently only "Usage-Based" is supported."""
+
+ charge_period_end: datetime = FieldInfo(alias="ChargePeriodEnd")
+ """Exclusive end of the time interval during which the usage was consumed."""
+
+ charge_period_start: datetime = FieldInfo(alias="ChargePeriodStart")
+ """Inclusive start of the time interval during which the usage was consumed."""
+
+ consumed_quantity: float = FieldInfo(alias="ConsumedQuantity")
+ """Measured usage amount within the charge period.
+
+ Reflects raw metered consumption before pricing transformations.
+ """
+
+ consumed_unit: str = FieldInfo(alias="ConsumedUnit")
+ """
+ Unit of measure for the consumed quantity (e.g., "GB", "Requests",
+ "vCPU-Hours").
+ """
+
+ host_provider_name: str = FieldInfo(alias="HostProviderName")
+ """Name of the entity providing the underlying infrastructure or platform."""
+
+ invoice_issuer_name: str = FieldInfo(alias="InvoiceIssuerName")
+ """Name of the entity responsible for invoicing for the services consumed."""
+
+ service_provider_name: str = FieldInfo(alias="ServiceProviderName")
+ """Name of the entity that made the services available for purchase."""
+
+ x_billable_metric_name: str = FieldInfo(alias="x_BillableMetricName")
+ """The display name of the billable metric.
+
+ Cloudflare extension; replaces FOCUS SkuMeter.
+ """
+
+ billed_cost: Optional[float] = FieldInfo(alias="BilledCost", default=None)
+ """
+ A charge serving as the basis for invoicing, inclusive of all reduced rates and
+ discounts while excluding the amortization of upfront charges (one-time or
+ recurring).
+ """
+
+ billing_currency: Optional[str] = FieldInfo(alias="BillingCurrency", default=None)
+ """Currency that a charge was billed in (ISO 4217)."""
+
+ billing_period_end: Optional[datetime] = FieldInfo(alias="BillingPeriodEnd", default=None)
+ """Exclusive end of the billing cycle that contains this usage record."""
+
+ billing_period_start: Optional[datetime] = FieldInfo(alias="BillingPeriodStart", default=None)
+ """Inclusive start of the billing cycle that contains this usage record."""
+
+ charge_class: Optional[Literal["Correction"]] = FieldInfo(alias="ChargeClass", default=None)
+ """
+ Indicates whether the row represents a correction to one or more charges
+ invoiced in a previous billing period.
+ """
+
+ contracted_cost: Optional[float] = FieldInfo(alias="ContractedCost", default=None)
+ """
+ Cost calculated by multiplying ContractedUnitPrice and the corresponding
+ PricingQuantity.
+ """
+
+ contracted_unit_price: Optional[float] = FieldInfo(alias="ContractedUnitPrice", default=None)
+ """
+ The agreed-upon unit price for a single PricingUnit of the associated billable
+ metric, inclusive of negotiated discounts, if present, while excluding any other
+ discounts.
+ """
+
+ effective_cost: Optional[float] = FieldInfo(alias="EffectiveCost", default=None)
+ """
+ The amortized cost of the charge after applying all reduced rates, discounts,
+ and the applicable portion of relevant, prepaid purchases (one-time or
+ recurring) that covered the charge.
+ """
+
+ list_cost: Optional[float] = FieldInfo(alias="ListCost", default=None)
+ """
+ Cost calculated by multiplying ListUnitPrice and the corresponding
+ PricingQuantity.
+ """
+
+ list_unit_price: Optional[float] = FieldInfo(alias="ListUnitPrice", default=None)
+ """
+ Suggested provider-published unit price for a single PricingUnit of the
+ associated billable metric, exclusive of any discounts.
+ """
+
+ pricing_quantity: Optional[float] = FieldInfo(alias="PricingQuantity", default=None)
+ """Volume of a given service used or purchased, based on the PricingUnit."""
+
+ pricing_unit: Optional[str] = FieldInfo(alias="PricingUnit", default=None)
+ """
+ Provider-specified measurement unit for determining unit prices, indicating how
+ the provider rates measured usage after applying pricing rules like block
+ pricing.
+ """
+
+ region_id: Optional[str] = FieldInfo(alias="RegionId", default=None)
+ """
+ Provider-assigned identifier for an isolated geographic area where a service is
+ provided.
+ """
+
+ region_name: Optional[str] = FieldInfo(alias="RegionName", default=None)
+ """Name of an isolated geographic area where a service is provided."""
+
+ sub_account_id: Optional[str] = FieldInfo(alias="SubAccountId", default=None)
+ """Unique identifier assigned to a grouping of services.
+
+ For Cloudflare, this is the subscription or contract ID.
+ """
+
+ sub_account_name: Optional[str] = FieldInfo(alias="SubAccountName", default=None)
+ """Name assigned to a grouping of services.
+
+ For Cloudflare, this is the subscription or contract display name.
+ """
+
+ x_billable_metric_id: Optional[str] = FieldInfo(alias="x_BillableMetricId", default=None)
+ """The unique identifier for the billable metric in the Cloudflare catalog.
+
+ Cloudflare extension; replaces FOCUS SkuId.
+ """
+
+ x_product_family_name: Optional[str] = FieldInfo(alias="x_ProductFamilyName", default=None)
+ """The product family the charge belongs to (e.g., "R2", "Workers").
+
+ Cloudflare extension; replaces FOCUS ServiceName.
+ """
+
+ x_zone_id: Optional[str] = FieldInfo(alias="x_ZoneId", default=None)
+ """The identifier for the Cloudflare zone (zone tag). Cloudflare extension."""
+
+ x_zone_name: Optional[str] = FieldInfo(alias="x_ZoneName", default=None)
+ """The display name of the Cloudflare zone. Cloudflare extension."""
+
+
+UsageGetResponse: TypeAlias = List[UsageGetResponseItem]
diff --git a/src/cloudflare/types/billing/usage_paygo_params.py b/src/cloudflare/types/billing/usage_paygo_params.py
index 29409e92fd2..fbb14d94c76 100644
--- a/src/cloudflare/types/billing/usage_paygo_params.py
+++ b/src/cloudflare/types/billing/usage_paygo_params.py
@@ -16,7 +16,7 @@ class UsagePaygoParams(TypedDict, total=False):
"""Represents a Cloudflare resource identifier tag."""
from_: Annotated[Union[str, date], PropertyInfo(alias="from", format="iso8601")]
- """Defines the start date for the usage query (e.g., 2025-02-01)."""
+ """Start date for the usage query (ISO 8601)."""
to: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
- """Defines the end date for the usage query (e.g., 2025-03-01)."""
+ """End date for the usage query (ISO 8601)."""
diff --git a/src/cloudflare/types/billing/usage_paygo_response.py b/src/cloudflare/types/billing/usage_paygo_response.py
index 23db8801493..57e78a40e8f 100644
--- a/src/cloudflare/types/billing/usage_paygo_response.py
+++ b/src/cloudflare/types/billing/usage_paygo_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
from datetime import datetime
from typing_extensions import TypeAlias
@@ -30,7 +30,11 @@ class UsagePaygoResponseItem(BaseModel):
"""Specifies the quantity consumed during this charge period."""
consumed_unit: str = FieldInfo(alias="ConsumedUnit")
- """Specifies the unit of measurement for consumed quantity."""
+ """
+ A display name for the unit of measurement used for the product (for example,
+ "GB-months", "GB-seconds"). May be empty when the unit is implicit in the
+ service name.
+ """
contracted_cost: float = FieldInfo(alias="ContractedCost")
"""Specifies the cost for this charge period in the billing currency."""
@@ -47,5 +51,8 @@ class UsagePaygoResponseItem(BaseModel):
service_name: str = FieldInfo(alias="ServiceName")
"""Identifies the Cloudflare service."""
+ service_family_name: Optional[str] = FieldInfo(alias="ServiceFamilyName", default=None)
+ """Identifies the product family for the Cloudflare service."""
+
UsagePaygoResponse: TypeAlias = List[UsagePaygoResponseItem]
diff --git a/src/cloudflare/types/custom_certificates/custom_certificate_create_params.py b/src/cloudflare/types/custom_certificates/custom_certificate_create_params.py
index d63b4653aa7..ffae55bd6f8 100644
--- a/src/cloudflare/types/custom_certificates/custom_certificate_create_params.py
+++ b/src/cloudflare/types/custom_certificates/custom_certificate_create_params.py
@@ -17,9 +17,6 @@ class CustomCertificateCreateParams(TypedDict, total=False):
certificate: Required[str]
"""The zone's SSL certificate or certificate and the intermediate(s)."""
- private_key: Required[str]
- """The zone's private key."""
-
bundle_method: BundleMethod
"""
A ubiquitous bundle has the highest probability of being verified everywhere,
@@ -60,6 +57,13 @@ class CustomCertificateCreateParams(TypedDict, total=False):
"policy_restrictions".
"""
+ private_key: str
+ """The zone's private key.
+
+ Not required if custom_csr_id is provided, in which case the private key is
+ retrieved from the CSR record held by Cloudflare.
+ """
+
type: Literal["legacy_custom", "sni_custom"]
"""
The type 'legacy_custom' enables support for legacy clients which do not include
diff --git a/src/cloudflare/types/custom_certificates/custom_certificate_edit_params.py b/src/cloudflare/types/custom_certificates/custom_certificate_edit_params.py
index c9bfbfc785e..88b036e0631 100644
--- a/src/cloudflare/types/custom_certificates/custom_certificate_edit_params.py
+++ b/src/cloudflare/types/custom_certificates/custom_certificate_edit_params.py
@@ -58,4 +58,8 @@ class CustomCertificateEditParams(TypedDict, total=False):
"""
private_key: str
- """The zone's private key."""
+ """The zone's private key.
+
+ Not required if custom_csr_id is provided, in which case the private key is
+ retrieved from the CSR record held by Cloudflare.
+ """
diff --git a/src/cloudflare/types/dls/__init__.py b/src/cloudflare/types/dls/__init__.py
new file mode 100644
index 00000000000..d3ab21647a8
--- /dev/null
+++ b/src/cloudflare/types/dls/__init__.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .region_list_params import RegionListParams as RegionListParams
+from .region_get_response import RegionGetResponse as RegionGetResponse
+from .region_list_response import RegionListResponse as RegionListResponse
diff --git a/src/cloudflare/types/dls/region_get_response.py b/src/cloudflare/types/dls/region_get_response.py
new file mode 100644
index 00000000000..01384f5de66
--- /dev/null
+++ b/src/cloudflare/types/dls/region_get_response.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["RegionGetResponse"]
+
+
+class RegionGetResponse(BaseModel):
+ id: str
+
+ created_on: datetime
+
+ modified_on: datetime
+
+ name: str
+
+ region_key: str
+
+ version: int
+
+ version_created_on: datetime
diff --git a/src/cloudflare/types/dls/region_list_params.py b/src/cloudflare/types/dls/region_list_params.py
new file mode 100644
index 00000000000..dfb5c73c17b
--- /dev/null
+++ b/src/cloudflare/types/dls/region_list_params.py
@@ -0,0 +1,23 @@
+# 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__ = ["RegionListParams"]
+
+
+class RegionListParams(TypedDict, total=False):
+ account_id: Required[int]
+
+ cursor: str
+ """Opaque token for cursor-based pagination.
+
+ Omit for the first page. Pass the value from a previous response to fetch the
+ next page.
+ """
+
+ per_page: int
+
+ type: Literal["managed", "custom"]
+ """Filter regions by type. Omit to return all regions."""
diff --git a/src/cloudflare/types/dls/region_list_response.py b/src/cloudflare/types/dls/region_list_response.py
new file mode 100644
index 00000000000..da99e39d88b
--- /dev/null
+++ b/src/cloudflare/types/dls/region_list_response.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["RegionListResponse"]
+
+
+class RegionListResponse(BaseModel):
+ id: str
+
+ created_on: datetime
+
+ modified_on: datetime
+
+ name: str
+
+ region_key: str
+
+ version: int
+
+ version_created_on: datetime
diff --git a/src/cloudflare/types/dls/regional_services/__init__.py b/src/cloudflare/types/dls/regional_services/__init__.py
new file mode 100644
index 00000000000..1d07085e9f9
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/__init__.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .prefix_binding_edit_params import PrefixBindingEditParams as PrefixBindingEditParams
+from .prefix_binding_list_params import PrefixBindingListParams as PrefixBindingListParams
+from .prefix_binding_get_response import PrefixBindingGetResponse as PrefixBindingGetResponse
+from .prefix_binding_create_params import PrefixBindingCreateParams as PrefixBindingCreateParams
+from .prefix_binding_edit_response import PrefixBindingEditResponse as PrefixBindingEditResponse
+from .prefix_binding_list_response import PrefixBindingListResponse as PrefixBindingListResponse
+from .prefix_binding_create_response import PrefixBindingCreateResponse as PrefixBindingCreateResponse
+from .prefix_binding_delete_response import PrefixBindingDeleteResponse as PrefixBindingDeleteResponse
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_create_params.py b/src/cloudflare/types/dls/regional_services/prefix_binding_create_params.py
new file mode 100644
index 00000000000..74a8869f7b8
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_create_params.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PrefixBindingCreateParams"]
+
+
+class PrefixBindingCreateParams(TypedDict, total=False):
+ account_id: Required[int]
+
+ cidr: Required[str]
+ """IP prefix in CIDR notation to bind."""
+
+ prefix_id: Required[str]
+ """The ID of the parent IP prefix that contains the CIDR."""
+
+ region_key: Required[str]
+ """Region key from managed regions (e.g., "us", "eu")."""
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_create_response.py b/src/cloudflare/types/dls/regional_services/prefix_binding_create_response.py
new file mode 100644
index 00000000000..4ff0996a600
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_create_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ...._models import BaseModel
+
+__all__ = ["PrefixBindingCreateResponse"]
+
+
+class PrefixBindingCreateResponse(BaseModel):
+ id: str
+ """The ID of the binding."""
+
+ cidr: str
+ """The CIDR that is bound."""
+
+ prefix_id: str
+ """The ID of the parent prefix."""
+
+ region_key: str
+ """The region key used for the binding."""
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_delete_response.py b/src/cloudflare/types/dls/regional_services/prefix_binding_delete_response.py
new file mode 100644
index 00000000000..240528ac347
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_delete_response.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ...._models import BaseModel
+from ...shared.response_info import ResponseInfo
+
+__all__ = ["PrefixBindingDeleteResponse"]
+
+
+class PrefixBindingDeleteResponse(BaseModel):
+ messages: List[ResponseInfo]
+
+ success: bool
+
+ errors: Optional[List[ResponseInfo]] = None
diff --git a/src/cloudflare/types/addressing/regional_hostname_edit_params.py b/src/cloudflare/types/dls/regional_services/prefix_binding_edit_params.py
similarity index 52%
rename from src/cloudflare/types/addressing/regional_hostname_edit_params.py
rename to src/cloudflare/types/dls/regional_services/prefix_binding_edit_params.py
index 822196cf6af..105c6b00e5e 100644
--- a/src/cloudflare/types/addressing/regional_hostname_edit_params.py
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_edit_params.py
@@ -4,12 +4,11 @@
from typing_extensions import Required, TypedDict
-__all__ = ["RegionalHostnameEditParams"]
+__all__ = ["PrefixBindingEditParams"]
-class RegionalHostnameEditParams(TypedDict, total=False):
- zone_id: Required[str]
- """Identifier."""
+class PrefixBindingEditParams(TypedDict, total=False):
+ account_id: Required[int]
region_key: Required[str]
- """Identifying key for the region"""
+ """New region key to assign (e.g., "us", "eu", "cfcanary")."""
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_edit_response.py b/src/cloudflare/types/dls/regional_services/prefix_binding_edit_response.py
new file mode 100644
index 00000000000..95f65a5cbbd
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_edit_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ...._models import BaseModel
+
+__all__ = ["PrefixBindingEditResponse"]
+
+
+class PrefixBindingEditResponse(BaseModel):
+ id: str
+ """The ID of the binding."""
+
+ cidr: str
+ """The CIDR that is bound."""
+
+ prefix_id: str
+ """The ID of the parent prefix."""
+
+ region_key: str
+ """The region key used for the binding."""
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_get_response.py b/src/cloudflare/types/dls/regional_services/prefix_binding_get_response.py
new file mode 100644
index 00000000000..c6850ed0ed8
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_get_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ...._models import BaseModel
+
+__all__ = ["PrefixBindingGetResponse"]
+
+
+class PrefixBindingGetResponse(BaseModel):
+ id: str
+ """The ID of the binding."""
+
+ cidr: str
+ """The CIDR that is bound."""
+
+ prefix_id: str
+ """The ID of the parent prefix."""
+
+ region_key: str
+ """The region key used for the binding."""
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_list_params.py b/src/cloudflare/types/dls/regional_services/prefix_binding_list_params.py
new file mode 100644
index 00000000000..f8f19cd8441
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_list_params.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PrefixBindingListParams"]
+
+
+class PrefixBindingListParams(TypedDict, total=False):
+ account_id: Required[int]
+
+ cursor: str
+ """Opaque token for cursor-based pagination.
+
+ Omit for the first page. Pass the value from a previous response to fetch the
+ next page.
+ """
+
+ per_page: int
diff --git a/src/cloudflare/types/dls/regional_services/prefix_binding_list_response.py b/src/cloudflare/types/dls/regional_services/prefix_binding_list_response.py
new file mode 100644
index 00000000000..6f885fc105f
--- /dev/null
+++ b/src/cloudflare/types/dls/regional_services/prefix_binding_list_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ...._models import BaseModel
+
+__all__ = ["PrefixBindingListResponse"]
+
+
+class PrefixBindingListResponse(BaseModel):
+ id: str
+ """The ID of the binding."""
+
+ cidr: str
+ """The CIDR that is bound."""
+
+ prefix_id: str
+ """The ID of the parent prefix."""
+
+ region_key: str
+ """The region key used for the binding."""
diff --git a/src/cloudflare/types/email_security/investigate_list_params.py b/src/cloudflare/types/email_security/investigate_list_params.py
index 921253946d9..fceb31a8fe5 100644
--- a/src/cloudflare/types/email_security/investigate_list_params.py
+++ b/src/cloudflare/types/email_security/investigate_list_params.py
@@ -15,9 +15,6 @@ class InvestigateListParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier."""
- action_log: bool
- """Whether to include the message action log in the response."""
-
alert_id: str
cursor: str
diff --git a/src/cloudflare/types/email_sending/email_sending_send_params.py b/src/cloudflare/types/email_sending/email_sending_send_params.py
index ff540c47c02..bcbf2c2decc 100644
--- a/src/cloudflare/types/email_sending/email_sending_send_params.py
+++ b/src/cloudflare/types/email_sending/email_sending_send_params.py
@@ -46,13 +46,19 @@ class EmailSendingSendParams(TypedDict, total=False):
"""Custom email headers as key-value pairs."""
html: str
- """HTML body of the email. At least one of text or html must be provided."""
+ """HTML body of the email.
+
+ At least one of text or html must be provided (non-empty).
+ """
reply_to: ReplyTo
"""Reply-to address. Either a plain string or an object with address and name."""
text: str
- """Plain text body of the email. At least one of text or html must be provided."""
+ """Plain text body of the email.
+
+ At least one of text or html must be provided (non-empty).
+ """
class FromEmailSendingEmailAddressObject(TypedDict, total=False):
diff --git a/src/cloudflare/types/intel/sinkhole.py b/src/cloudflare/types/intel/sinkhole.py
index fe3d459e780..9895bde4bc0 100644
--- a/src/cloudflare/types/intel/sinkhole.py
+++ b/src/cloudflare/types/intel/sinkhole.py
@@ -10,22 +10,22 @@
class Sinkhole(BaseModel):
id: Optional[int] = None
- """The unique identifier for the sinkhole"""
+ """The unique identifier for the sinkhole."""
account_tag: Optional[str] = None
- """The account tag that owns this sinkhole"""
+ """The account tag that owns this sinkhole."""
created_on: Optional[datetime] = None
- """The date and time when the sinkhole was created"""
+ """The date and time when the sinkhole was created."""
modified_on: Optional[datetime] = None
- """The date and time when the sinkhole was last modified"""
+ """The date and time when the sinkhole was last modified."""
name: Optional[str] = None
- """The name of the sinkhole"""
+ """The name of the sinkhole."""
r2_bucket: Optional[str] = None
- """The name of the R2 bucket to store results"""
+ """The name of the R2 bucket to store results."""
r2_id: Optional[str] = None
- """The id of the R2 instance"""
+ """The id of the R2 instance."""
diff --git a/src/cloudflare/types/organizations/billing/__init__.py b/src/cloudflare/types/organizations/billing/__init__.py
new file mode 100644
index 00000000000..a7a38dd2805
--- /dev/null
+++ b/src/cloudflare/types/organizations/billing/__init__.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .usage_get_params import UsageGetParams as UsageGetParams
+from .usage_get_response import UsageGetResponse as UsageGetResponse
diff --git a/src/cloudflare/types/organizations/billing/usage_get_params.py b/src/cloudflare/types/organizations/billing/usage_get_params.py
new file mode 100644
index 00000000000..afbc1262bfd
--- /dev/null
+++ b/src/cloudflare/types/organizations/billing/usage_get_params.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import date
+from typing_extensions import Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["UsageGetParams"]
+
+
+class UsageGetParams(TypedDict, total=False):
+ from_: Annotated[Union[str, date], PropertyInfo(alias="from", format="iso8601")]
+ """Start date for the usage query (ISO 8601).
+
+ Required if `to` is set. When omitted along with `to`, defaults to the start of
+ the current month. Filters by charge period (when consumption happened), not
+ billing period. The maximum date range is 31 days.
+ """
+
+ metric: str
+ """Filter results by billable metric id (e.g., workers_standard_requests)."""
+
+ to: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
+ """End date for the usage query (ISO 8601).
+
+ Required if `from` is set. When omitted along with `from`, defaults to today.
+ Filters by charge period (when consumption happened), not billing period. The
+ maximum date range is 31 days.
+ """
diff --git a/src/cloudflare/types/organizations/billing/usage_get_response.py b/src/cloudflare/types/organizations/billing/usage_get_response.py
new file mode 100644
index 00000000000..8cbd7ba7c37
--- /dev/null
+++ b/src/cloudflare/types/organizations/billing/usage_get_response.py
@@ -0,0 +1,174 @@
+# 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, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = ["UsageGetResponse", "UsageGetResponseItem"]
+
+
+class UsageGetResponseItem(BaseModel):
+ """
+ A single cost and usage record for a metered product within a specific charge period, aligned with the FinOps FOCUS v1.3 specification.
+ """
+
+ billing_account_id: str = FieldInfo(alias="BillingAccountId")
+ """Public identifier of the Cloudflare account (account tag)."""
+
+ billing_account_name: str = FieldInfo(alias="BillingAccountName")
+ """Display name of the Cloudflare account."""
+
+ charge_category: Literal["Usage"] = FieldInfo(alias="ChargeCategory")
+ """
+ Highest-level classification of a charge based on the nature of how it gets
+ billed. Currently only "Usage" is supported.
+ """
+
+ charge_description: str = FieldInfo(alias="ChargeDescription")
+ """Self-contained summary of the charge's purpose and price."""
+
+ charge_frequency: Literal["Usage-Based"] = FieldInfo(alias="ChargeFrequency")
+ """Indicates how often a charge occurs. Currently only "Usage-Based" is supported."""
+
+ charge_period_end: datetime = FieldInfo(alias="ChargePeriodEnd")
+ """Exclusive end of the time interval during which the usage was consumed."""
+
+ charge_period_start: datetime = FieldInfo(alias="ChargePeriodStart")
+ """Inclusive start of the time interval during which the usage was consumed."""
+
+ consumed_quantity: float = FieldInfo(alias="ConsumedQuantity")
+ """Measured usage amount within the charge period.
+
+ Reflects raw metered consumption before pricing transformations.
+ """
+
+ consumed_unit: str = FieldInfo(alias="ConsumedUnit")
+ """
+ Unit of measure for the consumed quantity (e.g., "GB", "Requests",
+ "vCPU-Hours").
+ """
+
+ host_provider_name: str = FieldInfo(alias="HostProviderName")
+ """Name of the entity providing the underlying infrastructure or platform."""
+
+ invoice_issuer_name: str = FieldInfo(alias="InvoiceIssuerName")
+ """Name of the entity responsible for invoicing for the services consumed."""
+
+ service_provider_name: str = FieldInfo(alias="ServiceProviderName")
+ """Name of the entity that made the services available for purchase."""
+
+ x_billable_metric_name: str = FieldInfo(alias="x_BillableMetricName")
+ """The display name of the billable metric.
+
+ Cloudflare extension; replaces FOCUS SkuMeter.
+ """
+
+ billed_cost: Optional[float] = FieldInfo(alias="BilledCost", default=None)
+ """
+ A charge serving as the basis for invoicing, inclusive of all reduced rates and
+ discounts while excluding the amortization of upfront charges (one-time or
+ recurring).
+ """
+
+ billing_currency: Optional[str] = FieldInfo(alias="BillingCurrency", default=None)
+ """Currency that a charge was billed in (ISO 4217)."""
+
+ billing_period_end: Optional[datetime] = FieldInfo(alias="BillingPeriodEnd", default=None)
+ """Exclusive end of the billing cycle that contains this usage record."""
+
+ billing_period_start: Optional[datetime] = FieldInfo(alias="BillingPeriodStart", default=None)
+ """Inclusive start of the billing cycle that contains this usage record."""
+
+ charge_class: Optional[Literal["Correction"]] = FieldInfo(alias="ChargeClass", default=None)
+ """
+ Indicates whether the row represents a correction to one or more charges
+ invoiced in a previous billing period.
+ """
+
+ contracted_cost: Optional[float] = FieldInfo(alias="ContractedCost", default=None)
+ """
+ Cost calculated by multiplying ContractedUnitPrice and the corresponding
+ PricingQuantity.
+ """
+
+ contracted_unit_price: Optional[float] = FieldInfo(alias="ContractedUnitPrice", default=None)
+ """
+ The agreed-upon unit price for a single PricingUnit of the associated billable
+ metric, inclusive of negotiated discounts, if present, while excluding any other
+ discounts.
+ """
+
+ effective_cost: Optional[float] = FieldInfo(alias="EffectiveCost", default=None)
+ """
+ The amortized cost of the charge after applying all reduced rates, discounts,
+ and the applicable portion of relevant, prepaid purchases (one-time or
+ recurring) that covered the charge.
+ """
+
+ list_cost: Optional[float] = FieldInfo(alias="ListCost", default=None)
+ """
+ Cost calculated by multiplying ListUnitPrice and the corresponding
+ PricingQuantity.
+ """
+
+ list_unit_price: Optional[float] = FieldInfo(alias="ListUnitPrice", default=None)
+ """
+ Suggested provider-published unit price for a single PricingUnit of the
+ associated billable metric, exclusive of any discounts.
+ """
+
+ pricing_quantity: Optional[float] = FieldInfo(alias="PricingQuantity", default=None)
+ """Volume of a given service used or purchased, based on the PricingUnit."""
+
+ pricing_unit: Optional[str] = FieldInfo(alias="PricingUnit", default=None)
+ """
+ Provider-specified measurement unit for determining unit prices, indicating how
+ the provider rates measured usage after applying pricing rules like block
+ pricing.
+ """
+
+ region_id: Optional[str] = FieldInfo(alias="RegionId", default=None)
+ """
+ Provider-assigned identifier for an isolated geographic area where a service is
+ provided.
+ """
+
+ region_name: Optional[str] = FieldInfo(alias="RegionName", default=None)
+ """Name of an isolated geographic area where a service is provided."""
+
+ sub_account_id: Optional[str] = FieldInfo(alias="SubAccountId", default=None)
+ """Unique identifier assigned to a grouping of services.
+
+ For Cloudflare, this is the subscription or contract ID.
+ """
+
+ sub_account_name: Optional[str] = FieldInfo(alias="SubAccountName", default=None)
+ """Name assigned to a grouping of services.
+
+ For Cloudflare, this is the subscription or contract display name.
+ """
+
+ x_billable_metric_id: Optional[str] = FieldInfo(alias="x_BillableMetricId", default=None)
+ """The unique identifier for the billable metric in the Cloudflare catalog.
+
+ Cloudflare extension; replaces FOCUS SkuId.
+ """
+
+ x_product_family_name: Optional[str] = FieldInfo(alias="x_ProductFamilyName", default=None)
+ """The product family the charge belongs to (e.g., "R2", "Workers").
+
+ Cloudflare extension; replaces FOCUS ServiceName.
+ """
+
+ x_zone_id: Optional[str] = FieldInfo(alias="x_ZoneId", default=None)
+ """The identifier for the Cloudflare zone (zone tag). Cloudflare extension."""
+
+ x_zone_name: Optional[str] = FieldInfo(alias="x_ZoneName", default=None)
+ """The display name of the Cloudflare zone. Cloudflare extension."""
+
+
+UsageGetResponse: TypeAlias = List[UsageGetResponseItem]
diff --git a/src/cloudflare/types/radar/http_summary_v2_params.py b/src/cloudflare/types/radar/http_summary_v2_params.py
index 6fe1ed19861..3dc4437ae91 100644
--- a/src/cloudflare/types/radar/http_summary_v2_params.py
+++ b/src/cloudflare/types/radar/http_summary_v2_params.py
@@ -35,6 +35,31 @@ class HTTPSummaryV2Params(TypedDict, total=False):
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
"""
+ content_type: Annotated[
+ List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ],
+ PropertyInfo(alias="contentType"),
+ ]
+ """Filters results by content type category."""
+
continent: SequenceNotStr[str]
"""Filters results by continent.
diff --git a/src/cloudflare/types/radar/http_timeseries_groups_v2_params.py b/src/cloudflare/types/radar/http_timeseries_groups_v2_params.py
index 2836307c8f1..a0f5af5815c 100644
--- a/src/cloudflare/types/radar/http_timeseries_groups_v2_params.py
+++ b/src/cloudflare/types/radar/http_timeseries_groups_v2_params.py
@@ -42,6 +42,31 @@ class HTTPTimeseriesGroupsV2Params(TypedDict, total=False):
[Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).
"""
+ content_type: Annotated[
+ List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ],
+ PropertyInfo(alias="contentType"),
+ ]
+ """Filters results by content type category."""
+
continent: SequenceNotStr[str]
"""Filters results by continent.
diff --git a/src/cloudflare/types/radar/http_timeseries_params.py b/src/cloudflare/types/radar/http_timeseries_params.py
index 6a9750ef8b5..fa4b46439b2 100644
--- a/src/cloudflare/types/radar/http_timeseries_params.py
+++ b/src/cloudflare/types/radar/http_timeseries_params.py
@@ -45,6 +45,31 @@ class HTTPTimeseriesParams(TypedDict, total=False):
browser_family: Annotated[List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]], PropertyInfo(alias="browserFamily")]
"""Filters results by browser family."""
+ content_type: Annotated[
+ List[
+ Literal[
+ "HTML",
+ "IMAGES",
+ "JSON",
+ "JAVASCRIPT",
+ "CSS",
+ "PLAIN_TEXT",
+ "FONTS",
+ "XML",
+ "YAML",
+ "VIDEO",
+ "AUDIO",
+ "MARKDOWN",
+ "DOCUMENTS",
+ "BINARY",
+ "SERIALIZATION",
+ "OTHER",
+ ]
+ ],
+ PropertyInfo(alias="contentType"),
+ ]
+ """Filters results by content type category."""
+
continent: SequenceNotStr[str]
"""Filters results by continent.
diff --git a/src/cloudflare/types/realtime_kit/__init__.py b/src/cloudflare/types/realtime_kit/__init__.py
index fd473f2c343..bc3db71de76 100644
--- a/src/cloudflare/types/realtime_kit/__init__.py
+++ b/src/cloudflare/types/realtime_kit/__init__.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from .app_get_params import AppGetParams as AppGetParams
from .app_post_params import AppPostParams as AppPostParams
from .app_get_response import AppGetResponse as AppGetResponse
from .app_post_response import AppPostResponse as AppPostResponse
@@ -135,6 +136,9 @@
from .livestream_start_livestreaming_a_meeting_response import (
LivestreamStartLivestreamingAMeetingResponse as LivestreamStartLivestreamingAMeetingResponse,
)
+from .livestream_get_livestream_analytics_daywise_params import (
+ LivestreamGetLivestreamAnalyticsDaywiseParams as LivestreamGetLivestreamAnalyticsDaywiseParams,
+)
from .livestream_get_meeting_active_livestreams_response import (
LivestreamGetMeetingActiveLivestreamsResponse as LivestreamGetMeetingActiveLivestreamsResponse,
)
@@ -144,6 +148,9 @@
from .livestream_get_livestream_analytics_complete_params import (
LivestreamGetLivestreamAnalyticsCompleteParams as LivestreamGetLivestreamAnalyticsCompleteParams,
)
+from .livestream_get_livestream_analytics_daywise_response import (
+ LivestreamGetLivestreamAnalyticsDaywiseResponse as LivestreamGetLivestreamAnalyticsDaywiseResponse,
+)
from .livestream_get_livestream_analytics_complete_response import (
LivestreamGetLivestreamAnalyticsCompleteResponse as LivestreamGetLivestreamAnalyticsCompleteResponse,
)
diff --git a/src/cloudflare/types/realtime_kit/app_get_params.py b/src/cloudflare/types/realtime_kit/app_get_params.py
new file mode 100644
index 00000000000..7e7e39afa99
--- /dev/null
+++ b/src/cloudflare/types/realtime_kit/app_get_params.py
@@ -0,0 +1,24 @@
+# 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__ = ["AppGetParams"]
+
+
+class AppGetParams(TypedDict, total=False):
+ account_id: Required[str]
+ """The account identifier tag."""
+
+ page_no: int
+ """The page number from which you want your page search results to be displayed."""
+
+ per_page: int
+ """Number of results per page."""
+
+ search: str
+ """Search string that matches apps by name."""
+
+ sort_order: Literal["ASC", "DESC"]
+ """Sort order for apps by creation time."""
diff --git a/src/cloudflare/types/realtime_kit/app_get_response.py b/src/cloudflare/types/realtime_kit/app_get_response.py
index 878f990f8de..a6929e5d2fc 100644
--- a/src/cloudflare/types/realtime_kit/app_get_response.py
+++ b/src/cloudflare/types/realtime_kit/app_get_response.py
@@ -1,21 +1,32 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
+from datetime import datetime
from ..._models import BaseModel
-__all__ = ["AppGetResponse", "Data"]
+__all__ = ["AppGetResponse", "Data", "Paging"]
class Data(BaseModel):
id: Optional[str] = None
- created_at: Optional[str] = None
+ created_at: Optional[datetime] = None
name: Optional[str] = None
+class Paging(BaseModel):
+ end_offset: Optional[float] = None
+
+ start_offset: Optional[float] = None
+
+ total_count: Optional[float] = None
+
+
class AppGetResponse(BaseModel):
data: Optional[List[Data]] = None
+ paging: Optional[Paging] = None
+
success: Optional[bool] = None
diff --git a/src/cloudflare/types/realtime_kit/app_post_params.py b/src/cloudflare/types/realtime_kit/app_post_params.py
index 1bb8921ab6e..2f6d4d5731a 100644
--- a/src/cloudflare/types/realtime_kit/app_post_params.py
+++ b/src/cloudflare/types/realtime_kit/app_post_params.py
@@ -9,5 +9,6 @@
class AppPostParams(TypedDict, total=False):
account_id: Required[str]
+ """The account identifier tag."""
name: Required[str]
diff --git a/src/cloudflare/types/realtime_kit/app_post_response.py b/src/cloudflare/types/realtime_kit/app_post_response.py
index 134ed6e93ba..a4c111a4440 100644
--- a/src/cloudflare/types/realtime_kit/app_post_response.py
+++ b/src/cloudflare/types/realtime_kit/app_post_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
@@ -10,7 +11,7 @@
class DataApp(BaseModel):
id: Optional[str] = None
- created_at: Optional[str] = None
+ created_at: Optional[datetime] = None
name: Optional[str] = None
diff --git a/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_complete_params.py b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_complete_params.py
index 132726bf720..3d38b0e4126 100644
--- a/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_complete_params.py
+++ b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_complete_params.py
@@ -2,11 +2,7 @@
from __future__ import annotations
-from typing import Union
-from datetime import datetime
-from typing_extensions import Required, Annotated, TypedDict
-
-from ..._utils import PropertyInfo
+from typing_extensions import Required, TypedDict
__all__ = ["LivestreamGetLivestreamAnalyticsCompleteParams"]
@@ -15,8 +11,17 @@ class LivestreamGetLivestreamAnalyticsCompleteParams(TypedDict, total=False):
account_id: Required[str]
"""The account identifier tag."""
- end_time: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """Specify the end time range in ISO format to access the livestream analytics."""
+ end_time: int
+ """
+ Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
+ """
+
+ filters: str
+ """Optional filters for livestream analytics."""
- start_time: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """Specify the start time range in ISO format to access the livestream analytics."""
+ start_time: int
+ """
+ Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
+ """
diff --git a/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_params.py b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_params.py
new file mode 100644
index 00000000000..30efed42199
--- /dev/null
+++ b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_params.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["LivestreamGetLivestreamAnalyticsDaywiseParams"]
+
+
+class LivestreamGetLivestreamAnalyticsDaywiseParams(TypedDict, total=False):
+ account_id: Required[str]
+ """The account identifier tag."""
+
+ end_time: int
+ """
+ Specify the end time as a Unix timestamp in seconds to access the livestream
+ analytics.
+ """
+
+ filters: str
+ """Optional filters for livestream analytics."""
+
+ start_time: int
+ """
+ Specify the start time as a Unix timestamp in seconds to access the livestream
+ analytics.
+ """
diff --git a/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_response.py b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_response.py
new file mode 100644
index 00000000000..08482b3ec78
--- /dev/null
+++ b/src/cloudflare/types/realtime_kit/livestream_get_livestream_analytics_daywise_response.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["LivestreamGetLivestreamAnalyticsDaywiseResponse", "Data"]
+
+
+class Data(BaseModel):
+ count: Optional[int] = None
+ """Count of total livestream sessions."""
+
+ date: Optional[str] = None
+ """Analytics date."""
+
+ total_ingest_seconds: Optional[int] = None
+ """Total time duration for which the input was given or the meeting was streamed."""
+
+ total_viewer_seconds: Optional[int] = None
+ """Total view time for which the viewers watched the stream."""
+
+
+class LivestreamGetLivestreamAnalyticsDaywiseResponse(BaseModel):
+ data: Optional[List[Data]] = None
+
+ success: Optional[bool] = None
diff --git a/src/cloudflare/types/realtime_kit/meeting_create_params.py b/src/cloudflare/types/realtime_kit/meeting_create_params.py
index 7cf8980aa09..29a76932bb2 100644
--- a/src/cloudflare/types/realtime_kit/meeting_create_params.py
+++ b/src/cloudflare/types/realtime_kit/meeting_create_params.py
@@ -71,6 +71,9 @@ class MeetingCreateParams(TypedDict, total=False):
title: Optional[str]
"""Title of the meeting"""
+ transcribe_on_end: bool
+ """Automatically generate transcripts when the meeting ends."""
+
class AIConfigSummarization(TypedDict, total=False):
"""Summary Config"""
diff --git a/src/cloudflare/types/realtime_kit/meeting_create_response.py b/src/cloudflare/types/realtime_kit/meeting_create_response.py
index db769a9f994..50e5fa35b9a 100644
--- a/src/cloudflare/types/realtime_kit/meeting_create_response.py
+++ b/src/cloudflare/types/realtime_kit/meeting_create_response.py
@@ -275,6 +275,9 @@ class Data(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class MeetingCreateResponse(BaseModel):
success: bool
diff --git a/src/cloudflare/types/realtime_kit/meeting_get_meeting_by_id_response.py b/src/cloudflare/types/realtime_kit/meeting_get_meeting_by_id_response.py
index aa4cab9e127..7393d5942ab 100644
--- a/src/cloudflare/types/realtime_kit/meeting_get_meeting_by_id_response.py
+++ b/src/cloudflare/types/realtime_kit/meeting_get_meeting_by_id_response.py
@@ -275,6 +275,9 @@ class Data(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class MeetingGetMeetingByIDResponse(BaseModel):
success: bool
diff --git a/src/cloudflare/types/realtime_kit/meeting_get_params.py b/src/cloudflare/types/realtime_kit/meeting_get_params.py
index 4cf938f1ed9..3e44ebfeadb 100644
--- a/src/cloudflare/types/realtime_kit/meeting_get_params.py
+++ b/src/cloudflare/types/realtime_kit/meeting_get_params.py
@@ -4,7 +4,7 @@
from typing import Union
from datetime import datetime
-from typing_extensions import Required, Annotated, TypedDict
+from typing_extensions import Literal, Required, Annotated, TypedDict
from ..._utils import PropertyInfo
@@ -35,3 +35,6 @@ class MeetingGetParams(TypedDict, total=False):
The time must be specified in ISO format.
"""
+
+ status: Literal["ACTIVE", "INACTIVE"]
+ """Filter meetings by status."""
diff --git a/src/cloudflare/types/realtime_kit/meeting_get_response.py b/src/cloudflare/types/realtime_kit/meeting_get_response.py
index d94a2a14a4a..cc4569dafd6 100644
--- a/src/cloudflare/types/realtime_kit/meeting_get_response.py
+++ b/src/cloudflare/types/realtime_kit/meeting_get_response.py
@@ -6,7 +6,162 @@
from ..._models import BaseModel
-__all__ = ["MeetingGetResponse", "Data", "Paging"]
+__all__ = [
+ "MeetingGetResponse",
+ "Data",
+ "DataRecordingConfig",
+ "DataRecordingConfigAudioConfig",
+ "DataRecordingConfigLiveStreamingConfig",
+ "DataRecordingConfigRealtimekitBucketConfig",
+ "DataRecordingConfigStorageConfig",
+ "DataRecordingConfigVideoConfig",
+ "DataRecordingConfigVideoConfigWatermark",
+ "DataRecordingConfigVideoConfigWatermarkSize",
+ "Paging",
+]
+
+
+class DataRecordingConfigAudioConfig(BaseModel):
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ channel: Optional[Literal["mono", "stereo"]] = None
+ """Audio signal pathway within an audio file that carries a specific sound source."""
+
+ codec: Optional[Literal["MP3", "AAC"]] = None
+ """Codec using which the recording will be encoded.
+
+ If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In
+ this case, the codec in the audioConfig is automatically set to vorbis.
+ """
+
+ export_file: Optional[bool] = None
+ """Controls whether to export audio file seperately"""
+
+
+class DataRecordingConfigLiveStreamingConfig(BaseModel):
+ rtmp_url: Optional[str] = None
+ """RTMP URL to stream to"""
+
+
+class DataRecordingConfigRealtimekitBucketConfig(BaseModel):
+ enabled: bool
+ """Controls whether recordings are uploaded to RealtimeKit's bucket.
+
+ If set to false, `download_url`, `audio_download_url`, `download_url_expiry`
+ won't be generated for a recording.
+ """
+
+
+class DataRecordingConfigStorageConfig(BaseModel):
+ type: Literal["aws", "azure", "digitalocean", "gcs", "sftp"]
+ """Type of storage media."""
+
+ auth_method: Optional[Literal["KEY", "PASSWORD"]] = None
+ """Authentication method used for "sftp" type storage medium"""
+
+ bucket: Optional[str] = None
+ """Name of the storage medium's bucket."""
+
+ host: Optional[str] = None
+ """SSH destination server host for SFTP type storage medium"""
+
+ password: Optional[str] = None
+ """
+ SSH destination server password for SFTP type storage medium when auth_method is
+ "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh
+ private key.
+ """
+
+ path: Optional[str] = None
+ """Path relative to the bucket root at which the recording will be placed."""
+
+ port: Optional[float] = None
+ """SSH destination server port for SFTP type storage medium"""
+
+ private_key: Optional[str] = None
+ """
+ Private key used to login to destination SSH server for SFTP type storage
+ medium, when auth_method used is "KEY"
+ """
+
+ region: Optional[str] = None
+ """Region of the storage medium."""
+
+ secret: Optional[str] = None
+ """Secret key of the storage medium.
+
+ Similar to `access_key`, it is only writeable by clients, not readable.
+ """
+
+ username: Optional[str] = None
+ """SSH destination server username for SFTP type storage medium"""
+
+
+class DataRecordingConfigVideoConfigWatermarkSize(BaseModel):
+ """Size of the watermark"""
+
+ height: Optional[int] = None
+ """Height of the watermark in px"""
+
+ width: Optional[int] = None
+ """Width of the watermark in px"""
+
+
+class DataRecordingConfigVideoConfigWatermark(BaseModel):
+ """Watermark to be added to the recording"""
+
+ position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]] = None
+ """Position of the watermark"""
+
+ size: Optional[DataRecordingConfigVideoConfigWatermarkSize] = None
+ """Size of the watermark"""
+
+ url: Optional[str] = None
+ """URL of the watermark image"""
+
+
+class DataRecordingConfigVideoConfig(BaseModel):
+ codec: Optional[Literal["H264", "VP8"]] = None
+ """Codec using which the recording will be encoded."""
+
+ export_file: Optional[bool] = None
+ """Controls whether to export video file seperately"""
+
+ height: Optional[int] = None
+ """Height of the recording video in pixels"""
+
+ watermark: Optional[DataRecordingConfigVideoConfigWatermark] = None
+ """Watermark to be added to the recording"""
+
+ width: Optional[int] = None
+ """Width of the recording video in pixels"""
+
+
+class DataRecordingConfig(BaseModel):
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the RealtimeKit developer portal.
+ """
+
+ audio_config: Optional[DataRecordingConfigAudioConfig] = None
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ file_name_prefix: Optional[str] = None
+ """Adds a prefix to the beginning of the file name of the recording."""
+
+ live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig] = None
+
+ max_seconds: Optional[float] = None
+ """
+ Specifies the maximum duration for recording in seconds, ranging from a minimum
+ of 60 seconds to a maximum of 24 hours.
+ """
+
+ realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig] = None
+
+ storage_config: Optional[DataRecordingConfigStorageConfig] = None
+
+ video_config: Optional[DataRecordingConfigVideoConfig] = None
class Data(BaseModel):
@@ -31,6 +186,13 @@ class Data(BaseModel):
the meeting.
"""
+ recording_config: Optional[DataRecordingConfig] = None
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the
+ RealtimeKit developer portal.
+ """
+
session_keep_alive_time_in_secs: Optional[float] = None
"""
Time in seconds, for which a session remains active, after the last participant
@@ -53,6 +215,9 @@ class Data(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class Paging(BaseModel):
end_offset: float
diff --git a/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_params.py b/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_params.py
index ddc84a3ef07..bf5f4a7d658 100644
--- a/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_params.py
+++ b/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_params.py
@@ -74,6 +74,9 @@ class MeetingReplaceMeetingByIDParams(TypedDict, total=False):
title: Optional[str]
"""Title of the meeting"""
+ transcribe_on_end: bool
+ """Automatically generate transcripts when the meeting ends."""
+
class AIConfigSummarization(TypedDict, total=False):
"""Summary Config"""
diff --git a/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_response.py b/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_response.py
index 4b511873637..fe1b59a2b75 100644
--- a/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_response.py
+++ b/src/cloudflare/types/realtime_kit/meeting_replace_meeting_by_id_response.py
@@ -275,6 +275,9 @@ class Data(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class MeetingReplaceMeetingByIDResponse(BaseModel):
success: bool
diff --git a/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_params.py b/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_params.py
index f58ca68b842..b3166b9a040 100644
--- a/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_params.py
+++ b/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_params.py
@@ -2,11 +2,25 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import Literal, Required, TypedDict
from ..._types import SequenceNotStr
-__all__ = ["MeetingUpdateMeetingByIDParams", "AIConfig", "AIConfigSummarization", "AIConfigTranscription"]
+__all__ = [
+ "MeetingUpdateMeetingByIDParams",
+ "AIConfig",
+ "AIConfigSummarization",
+ "AIConfigTranscription",
+ "RecordingConfig",
+ "RecordingConfigAudioConfig",
+ "RecordingConfigLiveStreamingConfig",
+ "RecordingConfigRealtimekitBucketConfig",
+ "RecordingConfigStorageConfig",
+ "RecordingConfigVideoConfig",
+ "RecordingConfigVideoConfigWatermark",
+ "RecordingConfigVideoConfigWatermarkSize",
+]
class MeetingUpdateMeetingByIDParams(TypedDict, total=False):
@@ -37,6 +51,13 @@ class MeetingUpdateMeetingByIDParams(TypedDict, total=False):
the meeting.
"""
+ recording_config: RecordingConfig
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the
+ RealtimeKit developer portal.
+ """
+
session_keep_alive_time_in_secs: float
"""
Time in seconds, for which a session remains active, after the last participant
@@ -59,6 +80,9 @@ class MeetingUpdateMeetingByIDParams(TypedDict, total=False):
title: str
"""Title of the meeting"""
+ transcribe_on_end: bool
+ """Automatically generate transcripts when the meeting ends."""
+
class AIConfigSummarization(TypedDict, total=False):
"""Summary Config"""
@@ -106,3 +130,154 @@ class AIConfig(TypedDict, total=False):
transcription: AIConfigTranscription
"""Transcription Configurations"""
+
+
+class RecordingConfigAudioConfig(TypedDict, total=False):
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ channel: Literal["mono", "stereo"]
+ """Audio signal pathway within an audio file that carries a specific sound source."""
+
+ codec: Literal["MP3", "AAC"]
+ """Codec using which the recording will be encoded.
+
+ If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In
+ this case, the codec in the audioConfig is automatically set to vorbis.
+ """
+
+ export_file: bool
+ """Controls whether to export audio file seperately"""
+
+
+class RecordingConfigLiveStreamingConfig(TypedDict, total=False):
+ rtmp_url: str
+ """RTMP URL to stream to"""
+
+
+class RecordingConfigRealtimekitBucketConfig(TypedDict, total=False):
+ enabled: Required[bool]
+ """Controls whether recordings are uploaded to RealtimeKit's bucket.
+
+ If set to false, `download_url`, `audio_download_url`, `download_url_expiry`
+ won't be generated for a recording.
+ """
+
+
+class RecordingConfigStorageConfig(TypedDict, total=False):
+ type: Required[Literal["aws", "azure", "digitalocean", "gcs", "sftp"]]
+ """Type of storage media."""
+
+ access_key: str
+ """Access key of the storage medium.
+
+ Access key is not required for the `gcs` storage media type.
+
+ Note that this field is not readable by clients, only writeable.
+ """
+
+ auth_method: Literal["KEY", "PASSWORD"]
+ """Authentication method used for "sftp" type storage medium"""
+
+ bucket: str
+ """Name of the storage medium's bucket."""
+
+ host: str
+ """SSH destination server host for SFTP type storage medium"""
+
+ password: str
+ """
+ SSH destination server password for SFTP type storage medium when auth_method is
+ "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh
+ private key.
+ """
+
+ path: str
+ """Path relative to the bucket root at which the recording will be placed."""
+
+ port: float
+ """SSH destination server port for SFTP type storage medium"""
+
+ private_key: str
+ """
+ Private key used to login to destination SSH server for SFTP type storage
+ medium, when auth_method used is "KEY"
+ """
+
+ region: str
+ """Region of the storage medium."""
+
+ secret: str
+ """Secret key of the storage medium.
+
+ Similar to `access_key`, it is only writeable by clients, not readable.
+ """
+
+ username: str
+ """SSH destination server username for SFTP type storage medium"""
+
+
+class RecordingConfigVideoConfigWatermarkSize(TypedDict, total=False):
+ """Size of the watermark"""
+
+ height: int
+ """Height of the watermark in px"""
+
+ width: int
+ """Width of the watermark in px"""
+
+
+class RecordingConfigVideoConfigWatermark(TypedDict, total=False):
+ """Watermark to be added to the recording"""
+
+ position: Literal["left top", "right top", "left bottom", "right bottom"]
+ """Position of the watermark"""
+
+ size: RecordingConfigVideoConfigWatermarkSize
+ """Size of the watermark"""
+
+ url: str
+ """URL of the watermark image"""
+
+
+class RecordingConfigVideoConfig(TypedDict, total=False):
+ codec: Literal["H264", "VP8"]
+ """Codec using which the recording will be encoded."""
+
+ export_file: bool
+ """Controls whether to export video file seperately"""
+
+ height: int
+ """Height of the recording video in pixels"""
+
+ watermark: RecordingConfigVideoConfigWatermark
+ """Watermark to be added to the recording"""
+
+ width: int
+ """Width of the recording video in pixels"""
+
+
+class RecordingConfig(TypedDict, total=False):
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the RealtimeKit developer portal.
+ """
+
+ audio_config: RecordingConfigAudioConfig
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ file_name_prefix: str
+ """Adds a prefix to the beginning of the file name of the recording."""
+
+ live_streaming_config: RecordingConfigLiveStreamingConfig
+
+ max_seconds: float
+ """
+ Specifies the maximum duration for recording in seconds, ranging from a minimum
+ of 60 seconds to a maximum of 24 hours.
+ """
+
+ realtimekit_bucket_config: RecordingConfigRealtimekitBucketConfig
+
+ storage_config: Optional[RecordingConfigStorageConfig]
+
+ video_config: RecordingConfigVideoConfig
diff --git a/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_response.py b/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_response.py
index fd1fcb89f80..656f032ca10 100644
--- a/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_response.py
+++ b/src/cloudflare/types/realtime_kit/meeting_update_meeting_by_id_response.py
@@ -275,6 +275,9 @@ class Data(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class MeetingUpdateMeetingByIDResponse(BaseModel):
success: bool
diff --git a/src/cloudflare/types/realtime_kit/recording_get_recordings_response.py b/src/cloudflare/types/realtime_kit/recording_get_recordings_response.py
index e8b1db95dcc..e06f2280b0e 100644
--- a/src/cloudflare/types/realtime_kit/recording_get_recordings_response.py
+++ b/src/cloudflare/types/realtime_kit/recording_get_recordings_response.py
@@ -6,7 +6,164 @@
from ..._models import BaseModel
-__all__ = ["RecordingGetRecordingsResponse", "Data", "DataMeeting", "DataStorageConfig", "Paging"]
+__all__ = [
+ "RecordingGetRecordingsResponse",
+ "Data",
+ "DataMeeting",
+ "DataMeetingRecordingConfig",
+ "DataMeetingRecordingConfigAudioConfig",
+ "DataMeetingRecordingConfigLiveStreamingConfig",
+ "DataMeetingRecordingConfigRealtimekitBucketConfig",
+ "DataMeetingRecordingConfigStorageConfig",
+ "DataMeetingRecordingConfigVideoConfig",
+ "DataMeetingRecordingConfigVideoConfigWatermark",
+ "DataMeetingRecordingConfigVideoConfigWatermarkSize",
+ "DataStorageConfig",
+ "Paging",
+]
+
+
+class DataMeetingRecordingConfigAudioConfig(BaseModel):
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ channel: Optional[Literal["mono", "stereo"]] = None
+ """Audio signal pathway within an audio file that carries a specific sound source."""
+
+ codec: Optional[Literal["MP3", "AAC"]] = None
+ """Codec using which the recording will be encoded.
+
+ If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In
+ this case, the codec in the audioConfig is automatically set to vorbis.
+ """
+
+ export_file: Optional[bool] = None
+ """Controls whether to export audio file seperately"""
+
+
+class DataMeetingRecordingConfigLiveStreamingConfig(BaseModel):
+ rtmp_url: Optional[str] = None
+ """RTMP URL to stream to"""
+
+
+class DataMeetingRecordingConfigRealtimekitBucketConfig(BaseModel):
+ enabled: bool
+ """Controls whether recordings are uploaded to RealtimeKit's bucket.
+
+ If set to false, `download_url`, `audio_download_url`, `download_url_expiry`
+ won't be generated for a recording.
+ """
+
+
+class DataMeetingRecordingConfigStorageConfig(BaseModel):
+ type: Literal["aws", "azure", "digitalocean", "gcs", "sftp"]
+ """Type of storage media."""
+
+ auth_method: Optional[Literal["KEY", "PASSWORD"]] = None
+ """Authentication method used for "sftp" type storage medium"""
+
+ bucket: Optional[str] = None
+ """Name of the storage medium's bucket."""
+
+ host: Optional[str] = None
+ """SSH destination server host for SFTP type storage medium"""
+
+ password: Optional[str] = None
+ """
+ SSH destination server password for SFTP type storage medium when auth_method is
+ "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh
+ private key.
+ """
+
+ path: Optional[str] = None
+ """Path relative to the bucket root at which the recording will be placed."""
+
+ port: Optional[float] = None
+ """SSH destination server port for SFTP type storage medium"""
+
+ private_key: Optional[str] = None
+ """
+ Private key used to login to destination SSH server for SFTP type storage
+ medium, when auth_method used is "KEY"
+ """
+
+ region: Optional[str] = None
+ """Region of the storage medium."""
+
+ secret: Optional[str] = None
+ """Secret key of the storage medium.
+
+ Similar to `access_key`, it is only writeable by clients, not readable.
+ """
+
+ username: Optional[str] = None
+ """SSH destination server username for SFTP type storage medium"""
+
+
+class DataMeetingRecordingConfigVideoConfigWatermarkSize(BaseModel):
+ """Size of the watermark"""
+
+ height: Optional[int] = None
+ """Height of the watermark in px"""
+
+ width: Optional[int] = None
+ """Width of the watermark in px"""
+
+
+class DataMeetingRecordingConfigVideoConfigWatermark(BaseModel):
+ """Watermark to be added to the recording"""
+
+ position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]] = None
+ """Position of the watermark"""
+
+ size: Optional[DataMeetingRecordingConfigVideoConfigWatermarkSize] = None
+ """Size of the watermark"""
+
+ url: Optional[str] = None
+ """URL of the watermark image"""
+
+
+class DataMeetingRecordingConfigVideoConfig(BaseModel):
+ codec: Optional[Literal["H264", "VP8"]] = None
+ """Codec using which the recording will be encoded."""
+
+ export_file: Optional[bool] = None
+ """Controls whether to export video file seperately"""
+
+ height: Optional[int] = None
+ """Height of the recording video in pixels"""
+
+ watermark: Optional[DataMeetingRecordingConfigVideoConfigWatermark] = None
+ """Watermark to be added to the recording"""
+
+ width: Optional[int] = None
+ """Width of the recording video in pixels"""
+
+
+class DataMeetingRecordingConfig(BaseModel):
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the RealtimeKit developer portal.
+ """
+
+ audio_config: Optional[DataMeetingRecordingConfigAudioConfig] = None
+ """Object containing configuration regarding the audio that is being recorded."""
+
+ file_name_prefix: Optional[str] = None
+ """Adds a prefix to the beginning of the file name of the recording."""
+
+ live_streaming_config: Optional[DataMeetingRecordingConfigLiveStreamingConfig] = None
+
+ max_seconds: Optional[float] = None
+ """
+ Specifies the maximum duration for recording in seconds, ranging from a minimum
+ of 60 seconds to a maximum of 24 hours.
+ """
+
+ realtimekit_bucket_config: Optional[DataMeetingRecordingConfigRealtimekitBucketConfig] = None
+
+ storage_config: Optional[DataMeetingRecordingConfigStorageConfig] = None
+
+ video_config: Optional[DataMeetingRecordingConfigVideoConfig] = None
class DataMeeting(BaseModel):
@@ -31,6 +188,13 @@ class DataMeeting(BaseModel):
the meeting.
"""
+ recording_config: Optional[DataMeetingRecordingConfig] = None
+ """Recording Configurations to be used for this meeting.
+
+ This level of configs takes higher preference over App level configs on the
+ RealtimeKit developer portal.
+ """
+
session_keep_alive_time_in_secs: Optional[float] = None
"""
Time in seconds, for which a session remains active, after the last participant
@@ -53,6 +217,9 @@ class DataMeeting(BaseModel):
title: Optional[str] = None
"""Title of the meeting."""
+ transcribe_on_end: Optional[bool] = None
+ """Automatically generate transcripts when the meeting ends."""
+
class DataStorageConfig(BaseModel):
type: Literal["aws", "azure", "digitalocean", "gcs", "sftp"]
diff --git a/src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_response.py b/src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_response.py
index 5bc5df6e7b1..1ac3743888b 100644
--- a/src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_response.py
+++ b/src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_response.py
@@ -1,514 +1,71 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import TYPE_CHECKING, Dict, List, Optional
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-__all__ = [
- "SessionGetParticipantDataFromPeerIDResponse",
- "Data",
- "DataParticipant",
- "DataParticipantPeerReport",
- "DataParticipantPeerReportMetadata",
- "DataParticipantPeerReportMetadataBrowserMetadata",
- "DataParticipantPeerReportMetadataCandidatePairs",
- "DataParticipantPeerReportMetadataCandidatePairsProducingTransport",
- "DataParticipantPeerReportMetadataDeviceInfo",
- "DataParticipantPeerReportMetadataEvent",
- "DataParticipantPeerReportMetadataIPInformation",
- "DataParticipantPeerReportMetadataIPInformationASN",
- "DataParticipantPeerReportMetadataPcMetadata",
- "DataParticipantPeerReportQuality",
- "DataParticipantPeerReportQualityAudioProducer",
- "DataParticipantPeerReportQualityAudioProducerCumulative",
- "DataParticipantPeerReportQualityAudioProducerCumulativePacketLoss",
- "DataParticipantPeerReportQualityAudioProducerCumulativeQualityMos",
- "DataParticipantPeerReportQualityAudioProducerCumulativeRTT",
- "DataParticipantPeerStats",
- "DataParticipantPeerStatsDeviceInfo",
- "DataParticipantPeerStatsEvent",
- "DataParticipantPeerStatsEventMetadata",
- "DataParticipantPeerStatsEventMetadataConnectionInfo",
- "DataParticipantPeerStatsEventMetadataConnectionInfoConnectivity",
- "DataParticipantPeerStatsEventMetadataConnectionInfoIPDetails",
- "DataParticipantPeerStatsEventMetadataConnectionInfoIPDetailsASN",
- "DataParticipantPeerStatsEventMetadataConnectionInfoLocation",
- "DataParticipantPeerStatsEventMetadataConnectionInfoLocationCoords",
- "DataParticipantPeerStatsIPInformation",
- "DataParticipantPeerStatsIPInformationASN",
- "DataParticipantPeerStatsPrecallNetworkInformation",
- "DataParticipantQualityStats",
-]
+__all__ = ["SessionGetParticipantDataFromPeerIDResponse", "Data", "DataPeerReport"]
-class DataParticipantPeerReportMetadataBrowserMetadata(BaseModel):
- browser: Optional[str] = None
+class DataPeerReport(BaseModel):
+ """Peer call statistics report."""
- browser_version: Optional[str] = None
+ metadata: Optional[Dict[str, object]] = None
- engine: Optional[str] = None
+ quality: Optional[Dict[str, object]] = None
- user_agent: Optional[str] = None
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
- webgl_support: Optional[str] = None
+ # 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) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
-class DataParticipantPeerReportMetadataCandidatePairsProducingTransport(BaseModel):
- available_outgoing_bitrate: Optional[int] = None
-
- bytes_discarded_on_send: Optional[int] = None
-
- bytes_received: Optional[int] = None
-
- bytes_sent: Optional[int] = None
-
- current_round_trip_time: Optional[float] = None
-
- last_packet_received_timestamp: Optional[int] = None
-
- last_packet_sent_timestamp: Optional[int] = None
-
- local_candidate_address: Optional[str] = None
-
- local_candidate_id: Optional[str] = None
-
- local_candidate_network_type: Optional[str] = None
-
- local_candidate_port: Optional[int] = None
-
- local_candidate_protocol: Optional[str] = None
-
- local_candidate_related_address: Optional[str] = None
-
- local_candidate_related_port: Optional[int] = None
-
- local_candidate_type: Optional[str] = None
-
- nominated: Optional[bool] = None
-
- packets_discarded_on_send: Optional[int] = None
-
- packets_received: Optional[int] = None
-
- packets_sent: Optional[int] = None
-
- remote_candidate_address: Optional[str] = None
-
- remote_candidate_id: Optional[str] = None
-
- remote_candidate_port: Optional[int] = None
-
- remote_candidate_protocol: Optional[str] = None
-
- remote_candidate_type: Optional[str] = None
-
- total_round_trip_time: Optional[float] = None
-
-
-class DataParticipantPeerReportMetadataCandidatePairs(BaseModel):
- consuming_transport: Optional[List[object]] = None
-
- producing_transport: Optional[List[DataParticipantPeerReportMetadataCandidatePairsProducingTransport]] = None
-
-
-class DataParticipantPeerReportMetadataDeviceInfo(BaseModel):
- cpus: Optional[int] = None
-
- is_mobile: Optional[bool] = None
-
- os: Optional[str] = None
-
- os_version: Optional[str] = None
-
-
-class DataParticipantPeerReportMetadataEvent(BaseModel):
- name: Optional[str] = None
-
- timestamp: Optional[str] = None
-
-
-class DataParticipantPeerReportMetadataIPInformationASN(BaseModel):
- asn: Optional[str] = None
-
-
-class DataParticipantPeerReportMetadataIPInformation(BaseModel):
- asn: Optional[DataParticipantPeerReportMetadataIPInformationASN] = None
-
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- ipv4: Optional[str] = None
-
- region: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class DataParticipantPeerReportMetadataPcMetadata(BaseModel):
- effective_network_type: Optional[str] = None
-
- reflexive_connectivity: Optional[bool] = None
-
- relay_connectivity: Optional[bool] = None
-
- timestamp: Optional[str] = None
-
- turn_connectivity: Optional[bool] = None
-
-
-class DataParticipantPeerReportMetadata(BaseModel):
- audio_devices_updates: Optional[List[object]] = None
-
- browser_metadata: Optional[DataParticipantPeerReportMetadataBrowserMetadata] = None
-
- candidate_pairs: Optional[DataParticipantPeerReportMetadataCandidatePairs] = None
-
- device_info: Optional[DataParticipantPeerReportMetadataDeviceInfo] = None
-
- events: Optional[List[DataParticipantPeerReportMetadataEvent]] = None
-
- ip_information: Optional[DataParticipantPeerReportMetadataIPInformation] = None
-
- pc_metadata: Optional[List[DataParticipantPeerReportMetadataPcMetadata]] = None
-
- room_view_type: Optional[str] = None
-
- sdk_name: Optional[str] = None
-
- sdk_version: Optional[str] = None
-
- selected_device_updates: Optional[List[object]] = None
-
- speaker_devices_updates: Optional[List[object]] = None
-
- video_devices_updates: Optional[List[object]] = None
-
-
-class DataParticipantPeerReportQualityAudioProducer(BaseModel):
- bytes_sent: Optional[int] = None
-
- jitter: Optional[int] = None
-
- mid: Optional[str] = None
-
- mos_quality: Optional[int] = None
-
- packets_lost: Optional[int] = None
-
- packets_sent: Optional[int] = None
-
- producer_id: Optional[str] = None
-
- rtt: Optional[float] = None
-
- ssrc: Optional[int] = None
-
- timestamp: Optional[str] = None
-
-
-class DataParticipantPeerReportQualityAudioProducerCumulativePacketLoss(BaseModel):
- api_10_or_greater_event_fraction: Optional[int] = FieldInfo(alias="10_or_greater_event_fraction", default=None)
-
- api_25_or_greater_event_fraction: Optional[int] = FieldInfo(alias="25_or_greater_event_fraction", default=None)
-
- api_5_or_greater_event_fraction: Optional[int] = FieldInfo(alias="5_or_greater_event_fraction", default=None)
-
- api_50_or_greater_event_fraction: Optional[int] = FieldInfo(alias="50_or_greater_event_fraction", default=None)
-
- avg: Optional[int] = None
-
-
-class DataParticipantPeerReportQualityAudioProducerCumulativeQualityMos(BaseModel):
- avg: Optional[int] = None
-
- p50: Optional[int] = None
-
- p75: Optional[int] = None
-
- p90: Optional[int] = None
-
-
-class DataParticipantPeerReportQualityAudioProducerCumulativeRTT(BaseModel):
- api_100ms_or_greater_event_fraction: Optional[float] = FieldInfo(
- alias="100ms_or_greater_event_fraction", default=None
- )
-
- api_250ms_or_greater_event_fraction: Optional[float] = FieldInfo(
- alias="250ms_or_greater_event_fraction", default=None
- )
-
- api_500ms_or_greater_event_fraction: Optional[float] = FieldInfo(
- alias="500ms_or_greater_event_fraction", default=None
- )
-
- avg: Optional[float] = None
-
-
-class DataParticipantPeerReportQualityAudioProducerCumulative(BaseModel):
- packet_loss: Optional[DataParticipantPeerReportQualityAudioProducerCumulativePacketLoss] = None
-
- quality_mos: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeQualityMos] = None
-
- rtt: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeRTT] = None
-
-
-class DataParticipantPeerReportQuality(BaseModel):
- audio_consumer: Optional[List[object]] = None
-
- audio_consumer_cumulative: Optional[object] = None
-
- audio_producer: Optional[List[DataParticipantPeerReportQualityAudioProducer]] = None
-
- audio_producer_cumulative: Optional[DataParticipantPeerReportQualityAudioProducerCumulative] = None
-
- screenshare_audio_consumer: Optional[List[object]] = None
-
- screenshare_audio_consumer_cumulative: Optional[object] = None
-
- screenshare_audio_producer: Optional[List[object]] = None
-
- screenshare_audio_producer_cumulative: Optional[object] = None
-
- screenshare_video_consumer: Optional[List[object]] = None
-
- screenshare_video_consumer_cumulative: Optional[object] = None
-
- screenshare_video_producer: Optional[List[object]] = None
-
- screenshare_video_producer_cumulative: Optional[object] = None
-
- video_consumer: Optional[List[object]] = None
-
- video_consumer_cumulative: Optional[object] = None
-
- video_producer: Optional[List[object]] = None
-
- video_producer_cumulative: Optional[object] = None
-
-
-class DataParticipantPeerReport(BaseModel):
- metadata: Optional[DataParticipantPeerReportMetadata] = None
-
- quality: Optional[DataParticipantPeerReportQuality] = None
-
-
-class DataParticipantPeerStatsDeviceInfo(BaseModel):
- browser: Optional[str] = None
-
- browser_version: Optional[str] = None
-
- cpus: Optional[int] = None
-
- engine: Optional[str] = None
-
- is_mobile: Optional[bool] = None
-
- os: Optional[str] = None
-
- os_version: Optional[str] = None
-
- sdk_name: Optional[str] = None
-
- sdk_version: Optional[str] = None
-
- user_agent: Optional[str] = None
-
- webgl_support: Optional[str] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfoConnectivity(BaseModel):
- host: Optional[bool] = None
-
- reflexive: Optional[bool] = None
-
- relay: Optional[bool] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfoIPDetailsASN(BaseModel):
- asn: Optional[str] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfoIPDetails(BaseModel):
- asn: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetailsASN] = None
-
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- ip: Optional[str] = None
-
- loc: Optional[str] = None
-
- postal: Optional[str] = None
-
- region: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfoLocationCoords(BaseModel):
- latitude: Optional[float] = None
-
- longitude: Optional[float] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfoLocation(BaseModel):
- coords: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocationCoords] = None
-
-
-class DataParticipantPeerStatsEventMetadataConnectionInfo(BaseModel):
- backend_r_t_t: Optional[float] = None
-
- connectivity: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoConnectivity] = None
-
- effective_network_type: Optional[str] = None
-
- fractional_loss: Optional[int] = None
-
- ip_details: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetails] = None
-
- jitter: Optional[int] = None
-
- location: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocation] = None
-
- r_t_t: Optional[float] = None
-
- throughput: Optional[int] = None
-
- turn_connectivity: Optional[bool] = None
-
-
-class DataParticipantPeerStatsEventMetadata(BaseModel):
- connection_info: Optional[DataParticipantPeerStatsEventMetadataConnectionInfo] = None
-
-
-class DataParticipantPeerStatsEvent(BaseModel):
- metadata: Optional[DataParticipantPeerStatsEventMetadata] = None
-
- timestamp: Optional[str] = None
-
- type: Optional[str] = None
-
-
-class DataParticipantPeerStatsIPInformationASN(BaseModel):
- asn: Optional[str] = None
-
-
-class DataParticipantPeerStatsIPInformation(BaseModel):
- asn: Optional[DataParticipantPeerStatsIPInformationASN] = None
-
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- ip_location: Optional[str] = None
-
- ipv4: Optional[str] = None
-
- org: Optional[str] = None
-
- region: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class DataParticipantPeerStatsPrecallNetworkInformation(BaseModel):
- backend_rtt: Optional[float] = None
-
- effective_networktype: Optional[str] = None
-
- fractional_loss: Optional[int] = None
-
- jitter: Optional[int] = None
-
- reflexive_connectivity: Optional[bool] = None
-
- relay_connectivity: Optional[bool] = None
-
- rtt: Optional[float] = None
-
- throughput: Optional[int] = None
-
- turn_connectivity: Optional[bool] = None
-
-
-class DataParticipantPeerStats(BaseModel):
- device_info: Optional[DataParticipantPeerStatsDeviceInfo] = None
-
- events: Optional[List[DataParticipantPeerStatsEvent]] = None
-
- ip_information: Optional[DataParticipantPeerStatsIPInformation] = None
-
- precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation] = None
-
-
-class DataParticipantQualityStats(BaseModel):
- audio_bandwidth: Optional[int] = None
-
- audio_stats: Optional[List[object]] = None
-
- average_quality: Optional[int] = None
-
- end: Optional[str] = None
-
- first_audio_packet_received: Optional[str] = None
-
- first_video_packet_received: Optional[str] = None
-
- last_audio_packet_received: Optional[str] = None
-
- last_video_packet_received: Optional[str] = None
-
- peer_ids: Optional[List[str]] = None
-
- start: Optional[str] = None
-
- total_audio_packets: Optional[int] = None
-
- total_audio_packets_lost: Optional[int] = None
-
- total_video_packets: Optional[int] = None
-
- total_video_packets_lost: Optional[int] = None
-
- video_bandwidth: Optional[int] = None
-
- video_stats: Optional[List[object]] = None
-
-
-class DataParticipant(BaseModel):
+class Data(BaseModel):
id: Optional[str] = None
+ """Participant ID. This maps to the corresponding peerId."""
created_at: Optional[str] = None
+ """timestamp when this participant was created."""
custom_participant_id: Optional[str] = None
+ """ID passed by client to create this participant."""
display_name: Optional[str] = None
+ """Display name of participant when joining the session."""
duration: Optional[float] = None
+ """number of minutes for which the participant was in the session."""
joined_at: Optional[str] = None
+ """timestamp at which participant joined the session."""
left_at: Optional[str] = None
+ """timestamp at which participant left the session."""
- peer_report: Optional[DataParticipantPeerReport] = None
+ peer_events: Optional[List[Dict[str, object]]] = None
- peer_stats: Optional[DataParticipantPeerStats] = None
+ peer_report: Optional[DataPeerReport] = None
+ """Peer call statistics report."""
- quality_stats: Optional[DataParticipantQualityStats] = None
+ preset_name: Optional[str] = None
+ """Name of the preset associated with the participant."""
- role: Optional[str] = None
+ session_id: Optional[str] = None
updated_at: Optional[str] = None
+ """timestamp when this participant's data was last updated."""
user_id: Optional[str] = None
-
-
-class Data(BaseModel):
- participant: Optional[DataParticipant] = None
+ """User id for this participant."""
class SessionGetParticipantDataFromPeerIDResponse(BaseModel):
diff --git a/src/cloudflare/types/realtime_kit/session_get_session_details_response.py b/src/cloudflare/types/realtime_kit/session_get_session_details_response.py
index 9a0c1ea83c8..c5e9892a18e 100644
--- a/src/cloudflare/types/realtime_kit/session_get_session_details_response.py
+++ b/src/cloudflare/types/realtime_kit/session_get_session_details_response.py
@@ -5,10 +5,10 @@
from ..._models import BaseModel
-__all__ = ["SessionGetSessionDetailsResponse", "Data", "DataSession"]
+__all__ = ["SessionGetSessionDetailsResponse", "Data"]
-class DataSession(BaseModel):
+class Data(BaseModel):
id: str
"""ID of the session"""
@@ -58,10 +58,6 @@ class DataSession(BaseModel):
"""Any meta data about session."""
-class Data(BaseModel):
- session: Optional[DataSession] = None
-
-
class SessionGetSessionDetailsResponse(BaseModel):
data: Optional[Data] = None
diff --git a/src/cloudflare/types/realtime_kit/session_get_session_participant_details_response.py b/src/cloudflare/types/realtime_kit/session_get_session_participant_details_response.py
index 76ce78d7f94..5266b3a6376 100644
--- a/src/cloudflare/types/realtime_kit/session_get_session_participant_details_response.py
+++ b/src/cloudflare/types/realtime_kit/session_get_session_participant_details_response.py
@@ -1,158 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import Optional
from ..._models import BaseModel
-__all__ = [
- "SessionGetSessionParticipantDetailsResponse",
- "Data",
- "DataParticipant",
- "DataParticipantPeerStats",
- "DataParticipantPeerStatsDeviceInfo",
- "DataParticipantPeerStatsEvent",
- "DataParticipantPeerStatsIPInformation",
- "DataParticipantPeerStatsPrecallNetworkInformation",
- "DataParticipantQualityStat",
- "DataParticipantQualityStatAudioStat",
- "DataParticipantQualityStatVideoStat",
-]
-
-
-class DataParticipantPeerStatsDeviceInfo(BaseModel):
- browser: Optional[str] = None
-
- browser_version: Optional[str] = None
-
- cpus: Optional[float] = None
-
- engine: Optional[str] = None
-
- is_mobile: Optional[bool] = None
-
- memory: Optional[float] = None
-
- os: Optional[str] = None
-
- os_version: Optional[str] = None
-
- sdk_name: Optional[str] = None
-
- sdk_version: Optional[str] = None
-
- user_agent: Optional[str] = None
-
- webgl_support: Optional[str] = None
-
-
-class DataParticipantPeerStatsEvent(BaseModel):
- timestamp: Optional[str] = None
-
- type: Optional[str] = None
-
-
-class DataParticipantPeerStatsIPInformation(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- ip_location: Optional[str] = None
-
- ipv4: Optional[str] = None
-
- org: Optional[str] = None
-
- portal: Optional[str] = None
-
- region: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class DataParticipantPeerStatsPrecallNetworkInformation(BaseModel):
- backend_rtt: Optional[float] = None
-
- effective_networktype: Optional[str] = None
-
- fractional_loss: Optional[float] = None
-
- jitter: Optional[float] = None
-
- reflexive_connectivity: Optional[bool] = None
-
- relay_connectivity: Optional[bool] = None
-
- rtt: Optional[float] = None
-
- throughtput: Optional[float] = None
-
- turn_connectivity: Optional[bool] = None
-
-
-class DataParticipantPeerStats(BaseModel):
- config: Optional[str] = None
-
- device_info: Optional[DataParticipantPeerStatsDeviceInfo] = None
-
- events: Optional[List[DataParticipantPeerStatsEvent]] = None
-
- ip_information: Optional[DataParticipantPeerStatsIPInformation] = None
-
- precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation] = None
-
- status: Optional[str] = None
-
-
-class DataParticipantQualityStatAudioStat(BaseModel):
- concealment_events: Optional[float] = None
-
- jitter: Optional[float] = None
-
- packets_lost: Optional[float] = None
-
- quality: Optional[float] = None
-
- timestamp: Optional[str] = None
-
-
-class DataParticipantQualityStatVideoStat(BaseModel):
- frame_height: Optional[float] = None
-
- frame_width: Optional[float] = None
-
- frames_dropped: Optional[float] = None
-
- frames_per_second: Optional[float] = None
-
- jitter: Optional[float] = None
-
- packets_lost: Optional[float] = None
-
- quality: Optional[float] = None
-
- timestamp: Optional[str] = None
-
-
-class DataParticipantQualityStat(BaseModel):
- audio_bandwidth: Optional[float] = None
-
- audio_packet_loss: Optional[float] = None
-
- audio_stats: Optional[List[DataParticipantQualityStatAudioStat]] = None
-
- average_quality: Optional[float] = None
-
- end: Optional[str] = None
-
- peer_id: Optional[str] = None
-
- start: Optional[str] = None
-
- video_bandwidth: Optional[float] = None
-
- video_packet_loss: Optional[float] = None
-
- video_stats: Optional[List[DataParticipantQualityStatVideoStat]] = None
+__all__ = ["SessionGetSessionParticipantDetailsResponse", "Data", "DataParticipant"]
class DataParticipant(BaseModel):
@@ -177,13 +29,9 @@ class DataParticipant(BaseModel):
left_at: Optional[str] = None
"""timestamp at which participant left the session."""
- peer_stats: Optional[DataParticipantPeerStats] = None
-
preset_name: Optional[str] = None
"""Name of the preset associated with the participant."""
- quality_stats: Optional[List[DataParticipantQualityStat]] = None
-
updated_at: Optional[str] = None
"""timestamp when this participant's data was last updated."""
diff --git a/src/cloudflare/types/realtime_kit/session_get_sessions_response.py b/src/cloudflare/types/realtime_kit/session_get_sessions_response.py
index da895acab39..e20a1991a4d 100644
--- a/src/cloudflare/types/realtime_kit/session_get_sessions_response.py
+++ b/src/cloudflare/types/realtime_kit/session_get_sessions_response.py
@@ -5,7 +5,7 @@
from ..._models import BaseModel
-__all__ = ["SessionGetSessionsResponse", "Data", "DataSession"]
+__all__ = ["SessionGetSessionsResponse", "Data", "DataSession", "Paging"]
class DataSession(BaseModel):
@@ -62,7 +62,17 @@ class Data(BaseModel):
sessions: Optional[List[DataSession]] = None
+class Paging(BaseModel):
+ end_offset: Optional[float] = None
+
+ start_offset: Optional[float] = None
+
+ total_count: Optional[float] = None
+
+
class SessionGetSessionsResponse(BaseModel):
data: Optional[Data] = None
+ paging: Optional[Paging] = None
+
success: Optional[bool] = None
diff --git a/src/cloudflare/types/secrets_store/__init__.py b/src/cloudflare/types/secrets_store/__init__.py
index 7bc9bc712f7..23e0ad2d91f 100644
--- a/src/cloudflare/types/secrets_store/__init__.py
+++ b/src/cloudflare/types/secrets_store/__init__.py
@@ -4,6 +4,7 @@
from .store_list_params import StoreListParams as StoreListParams
from .quota_get_response import QuotaGetResponse as QuotaGetResponse
+from .store_get_response import StoreGetResponse as StoreGetResponse
from .store_create_params import StoreCreateParams as StoreCreateParams
from .store_delete_params import StoreDeleteParams as StoreDeleteParams
from .store_list_response import StoreListResponse as StoreListResponse
diff --git a/src/cloudflare/types/secrets_store/store_get_response.py b/src/cloudflare/types/secrets_store/store_get_response.py
new file mode 100644
index 00000000000..9412374e220
--- /dev/null
+++ b/src/cloudflare/types/secrets_store/store_get_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
+
+__all__ = ["StoreGetResponse"]
+
+
+class StoreGetResponse(BaseModel):
+ id: str
+ """Store Identifier"""
+
+ created: datetime
+ """Whenthe secret was created."""
+
+ modified: datetime
+ """When the secret was modified."""
+
+ name: str
+ """The name of the store"""
+
+ account_id: Optional[str] = None
+ """Account Identifier"""
diff --git a/src/cloudflare/types/spectrum/app_create_params.py b/src/cloudflare/types/spectrum/app_create_params.py
index 8927bec1bf7..5573a4f06a7 100644
--- a/src/cloudflare/types/spectrum/app_create_params.py
+++ b/src/cloudflare/types/spectrum/app_create_params.py
@@ -83,6 +83,12 @@ class SpectrumConfigAppConfig(TypedDict, total=False):
tls: Literal["off", "flexible", "full", "strict"]
"""The type of TLS termination associated with the application."""
+ virtual_network_id: str
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(TypedDict, total=False):
zone_id: Required[str]
diff --git a/src/cloudflare/types/spectrum/app_create_response.py b/src/cloudflare/types/spectrum/app_create_response.py
index b6cad2c1eda..19a7f611261 100644
--- a/src/cloudflare/types/spectrum/app_create_response.py
+++ b/src/cloudflare/types/spectrum/app_create_response.py
@@ -88,6 +88,12 @@ class SpectrumConfigAppConfig(BaseModel):
tls: Optional[Literal["off", "flexible", "full", "strict"]] = None
"""The type of TLS termination associated with the application."""
+ virtual_network_id: Optional[str] = None
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(BaseModel):
id: str
diff --git a/src/cloudflare/types/spectrum/app_get_response.py b/src/cloudflare/types/spectrum/app_get_response.py
index d8471c0eae5..427dd44429b 100644
--- a/src/cloudflare/types/spectrum/app_get_response.py
+++ b/src/cloudflare/types/spectrum/app_get_response.py
@@ -88,6 +88,12 @@ class SpectrumConfigAppConfig(BaseModel):
tls: Optional[Literal["off", "flexible", "full", "strict"]] = None
"""The type of TLS termination associated with the application."""
+ virtual_network_id: Optional[str] = None
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(BaseModel):
id: str
diff --git a/src/cloudflare/types/spectrum/app_list_response.py b/src/cloudflare/types/spectrum/app_list_response.py
index 1291f24d57b..ea9e7546aae 100644
--- a/src/cloudflare/types/spectrum/app_list_response.py
+++ b/src/cloudflare/types/spectrum/app_list_response.py
@@ -88,6 +88,12 @@ class SpectrumConfigAppConfig(BaseModel):
tls: Optional[Literal["off", "flexible", "full", "strict"]] = None
"""The type of TLS termination associated with the application."""
+ virtual_network_id: Optional[str] = None
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(BaseModel):
id: str
diff --git a/src/cloudflare/types/spectrum/app_update_params.py b/src/cloudflare/types/spectrum/app_update_params.py
index 1c51cd912d6..6519bc107d9 100644
--- a/src/cloudflare/types/spectrum/app_update_params.py
+++ b/src/cloudflare/types/spectrum/app_update_params.py
@@ -83,6 +83,12 @@ class SpectrumConfigAppConfig(TypedDict, total=False):
tls: Literal["off", "flexible", "full", "strict"]
"""The type of TLS termination associated with the application."""
+ virtual_network_id: str
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(TypedDict, total=False):
zone_id: Required[str]
diff --git a/src/cloudflare/types/spectrum/app_update_response.py b/src/cloudflare/types/spectrum/app_update_response.py
index b541c6d8c3c..41906480273 100644
--- a/src/cloudflare/types/spectrum/app_update_response.py
+++ b/src/cloudflare/types/spectrum/app_update_response.py
@@ -88,6 +88,12 @@ class SpectrumConfigAppConfig(BaseModel):
tls: Optional[Literal["off", "flexible", "full", "strict"]] = None
"""The type of TLS termination associated with the application."""
+ virtual_network_id: Optional[str] = None
+ """
+ Optional UUID of a virtual network for routing origin traffic through tunnel
+ virtual networks.
+ """
+
class SpectrumConfigPaygoAppConfig(BaseModel):
id: str
diff --git a/src/cloudflare/types/workers/beta/worker.py b/src/cloudflare/types/workers/beta/worker.py
index e3d9a0ffe87..5651c7864bc 100644
--- a/src/cloudflare/types/workers/beta/worker.py
+++ b/src/cloudflare/types/workers/beta/worker.py
@@ -2,6 +2,7 @@
from typing import List, Optional
from datetime import datetime
+from typing_extensions import Literal
from ...._models import BaseModel
@@ -59,6 +60,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/beta/worker_create_params.py b/src/cloudflare/types/workers/beta/worker_create_params.py
index a5453a6e771..7c8326eea36 100644
--- a/src/cloudflare/types/workers/beta/worker_create_params.py
+++ b/src/cloudflare/types/workers/beta/worker_create_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ...._types import SequenceNotStr
@@ -78,6 +78,15 @@ class ObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(TypedDict, total=False):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/beta/worker_edit_params.py b/src/cloudflare/types/workers/beta/worker_edit_params.py
index e0dfe008859..2cffd5836f6 100644
--- a/src/cloudflare/types/workers/beta/worker_edit_params.py
+++ b/src/cloudflare/types/workers/beta/worker_edit_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ...._types import SequenceNotStr
@@ -71,6 +71,15 @@ class ObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(TypedDict, total=False):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/beta/worker_update_params.py b/src/cloudflare/types/workers/beta/worker_update_params.py
index 79cb27cf00b..e87d7fe9b0a 100644
--- a/src/cloudflare/types/workers/beta/worker_update_params.py
+++ b/src/cloudflare/types/workers/beta/worker_update_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ...._types import SequenceNotStr
@@ -78,6 +78,15 @@ class ObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(TypedDict, total=False):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/observability/__init__.py b/src/cloudflare/types/workers/observability/__init__.py
index aa4075caf4b..1fbc14397ec 100644
--- a/src/cloudflare/types/workers/observability/__init__.py
+++ b/src/cloudflare/types/workers/observability/__init__.py
@@ -2,6 +2,10 @@
from __future__ import annotations
+from .query_list_params import QueryListParams as QueryListParams
+from .query_create_params import QueryCreateParams as QueryCreateParams
+from .query_list_response import QueryListResponse as QueryListResponse
+from .query_create_response import QueryCreateResponse as QueryCreateResponse
from .telemetry_keys_params import TelemetryKeysParams as TelemetryKeysParams
from .telemetry_query_params import TelemetryQueryParams as TelemetryQueryParams
from .destination_list_params import DestinationListParams as DestinationListParams
diff --git a/src/cloudflare/types/workers/observability/destination_create_params.py b/src/cloudflare/types/workers/observability/destination_create_params.py
index 9af45a3f4fc..2733f1200c3 100644
--- a/src/cloudflare/types/workers/observability/destination_create_params.py
+++ b/src/cloudflare/types/workers/observability/destination_create_params.py
@@ -26,7 +26,10 @@ class Configuration(TypedDict, total=False):
headers: Required[Dict[str, str]]
logpush_dataset: Required[
- Annotated[Literal["opentelemetry-traces", "opentelemetry-logs"], PropertyInfo(alias="logpushDataset")]
+ Annotated[
+ Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"],
+ PropertyInfo(alias="logpushDataset"),
+ ]
]
type: Required[Literal["logpush"]]
diff --git a/src/cloudflare/types/workers/observability/destination_create_response.py b/src/cloudflare/types/workers/observability/destination_create_response.py
index d84b9645bb1..73adc29b027 100644
--- a/src/cloudflare/types/workers/observability/destination_create_response.py
+++ b/src/cloudflare/types/workers/observability/destination_create_response.py
@@ -13,7 +13,9 @@
class Configuration(BaseModel):
destination_conf: str
- logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs"] = FieldInfo(alias="logpushDataset")
+ logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"] = FieldInfo(
+ alias="logpushDataset"
+ )
logpush_job: float = FieldInfo(alias="logpushJob")
diff --git a/src/cloudflare/types/workers/observability/destination_delete_response.py b/src/cloudflare/types/workers/observability/destination_delete_response.py
index 953d92ce9ef..69451bafbc3 100644
--- a/src/cloudflare/types/workers/observability/destination_delete_response.py
+++ b/src/cloudflare/types/workers/observability/destination_delete_response.py
@@ -13,7 +13,9 @@
class Configuration(BaseModel):
destination_conf: str
- logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs"] = FieldInfo(alias="logpushDataset")
+ logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"] = FieldInfo(
+ alias="logpushDataset"
+ )
logpush_job: float = FieldInfo(alias="logpushJob")
diff --git a/src/cloudflare/types/workers/observability/destination_list_response.py b/src/cloudflare/types/workers/observability/destination_list_response.py
index 75ac1e0847e..24e590a4b5e 100644
--- a/src/cloudflare/types/workers/observability/destination_list_response.py
+++ b/src/cloudflare/types/workers/observability/destination_list_response.py
@@ -25,7 +25,9 @@ class Configuration(BaseModel):
job_status: ConfigurationJobStatus = FieldInfo(alias="jobStatus")
- logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs"] = FieldInfo(alias="logpushDataset")
+ logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"] = FieldInfo(
+ alias="logpushDataset"
+ )
type: Literal["logpush"]
diff --git a/src/cloudflare/types/workers/observability/destination_update_response.py b/src/cloudflare/types/workers/observability/destination_update_response.py
index f4b392027db..925bf7abe56 100644
--- a/src/cloudflare/types/workers/observability/destination_update_response.py
+++ b/src/cloudflare/types/workers/observability/destination_update_response.py
@@ -13,7 +13,9 @@
class Configuration(BaseModel):
destination_conf: str
- logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs"] = FieldInfo(alias="logpushDataset")
+ logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"] = FieldInfo(
+ alias="logpushDataset"
+ )
logpush_job: float = FieldInfo(alias="logpushJob")
diff --git a/src/cloudflare/types/workers/observability/query_create_params.py b/src/cloudflare/types/workers/observability/query_create_params.py
new file mode 100644
index 00000000000..ababad7b836
--- /dev/null
+++ b/src/cloudflare/types/workers/observability/query_create_params.py
@@ -0,0 +1,238 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union, Iterable, Optional
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
+
+__all__ = [
+ "QueryCreateParams",
+ "Parameters",
+ "ParametersCalculation",
+ "ParametersFilter",
+ "ParametersFilterUnionMember0",
+ "ParametersFilterWorkersObservabilityFilterLeaf",
+ "ParametersGroupBy",
+ "ParametersHaving",
+ "ParametersNeedle",
+ "ParametersOrderBy",
+]
+
+
+class QueryCreateParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ description: Required[Optional[str]]
+
+ name: Required[str]
+ """Query name"""
+
+ parameters: Required[Parameters]
+
+
+class ParametersCalculation(TypedDict, total=False):
+ operator: Required[
+ Literal[
+ "uniq",
+ "count",
+ "max",
+ "min",
+ "sum",
+ "avg",
+ "median",
+ "p001",
+ "p01",
+ "p05",
+ "p10",
+ "p25",
+ "p75",
+ "p90",
+ "p95",
+ "p99",
+ "p999",
+ "stddev",
+ "variance",
+ "COUNT_DISTINCT",
+ "COUNT",
+ "MAX",
+ "MIN",
+ "SUM",
+ "AVG",
+ "MEDIAN",
+ "P001",
+ "P01",
+ "P05",
+ "P10",
+ "P25",
+ "P75",
+ "P90",
+ "P95",
+ "P99",
+ "P999",
+ "STDDEV",
+ "VARIANCE",
+ ]
+ ]
+
+ alias: str
+
+ key: str
+
+ key_type: Annotated[Literal["string", "number", "boolean"], PropertyInfo(alias="keyType")]
+
+
+class ParametersFilterUnionMember0(TypedDict, total=False):
+ filter_combination: Required[Annotated[Literal["and", "or", "AND", "OR"], PropertyInfo(alias="filterCombination")]]
+
+ filters: Required[Iterable[object]]
+
+ kind: Required[Literal["group"]]
+
+
+class ParametersFilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
+ """A filter condition applied to query results.
+
+ Use the keys and values endpoints to discover available fields and their values before constructing filters.
+ """
+
+ key: Required[str]
+ """Filter field name.
+
+ Use verified keys from previous query results or the keys endpoint. Common keys
+ include $metadata.service, $metadata.origin, $metadata.trigger,
+ $metadata.message, and $metadata.error.
+ """
+
+ operation: Required[
+ Literal[
+ "includes",
+ "not_includes",
+ "starts_with",
+ "ends_with",
+ "regex",
+ "exists",
+ "is_null",
+ "in",
+ "not_in",
+ "eq",
+ "neq",
+ "gt",
+ "gte",
+ "lt",
+ "lte",
+ "=",
+ "!=",
+ ">",
+ ">=",
+ "<",
+ "<=",
+ "INCLUDES",
+ "DOES_NOT_INCLUDE",
+ "MATCH_REGEX",
+ "EXISTS",
+ "DOES_NOT_EXIST",
+ "IN",
+ "NOT_IN",
+ "STARTS_WITH",
+ "ENDS_WITH",
+ ]
+ ]
+ """Comparison operator.
+
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
+ """
+
+ type: Required[Literal["string", "number", "boolean"]]
+ """Data type of the filter field.
+
+ Must match the actual type of the key being filtered.
+ """
+
+ kind: Literal["filter"]
+ """Discriminator for leaf filter nodes.
+
+ Always 'filter' when present; may be omitted.
+ """
+
+ value: Union[str, float, bool]
+ """Comparison value.
+
+ Must match actual values in your data — verify with the values endpoint. Ensure
+ the value type (string/number/boolean) matches the field type. String
+ comparisons are case-sensitive. Regex uses RE2 syntax (no
+ lookaheads/lookbehinds).
+ """
+
+
+ParametersFilter: TypeAlias = Union[ParametersFilterUnionMember0, ParametersFilterWorkersObservabilityFilterLeaf]
+
+
+class ParametersGroupBy(TypedDict, total=False):
+ type: Required[Literal["string", "number", "boolean"]]
+
+ value: Required[str]
+
+
+class ParametersHaving(TypedDict, total=False):
+ key: Required[str]
+
+ operation: Required[Literal["eq", "neq", "gt", "gte", "lt", "lte"]]
+
+ value: Required[float]
+
+
+class ParametersNeedle(TypedDict, total=False):
+ """Define an expression to search using full-text search."""
+
+ value: Required[Union[str, float, bool]]
+
+ is_regex: Annotated[bool, PropertyInfo(alias="isRegex")]
+
+ match_case: Annotated[bool, PropertyInfo(alias="matchCase")]
+
+
+class ParametersOrderBy(TypedDict, total=False):
+ """Configure the order of the results returned by the query."""
+
+ value: Required[str]
+ """Configure which Calculation to order the results by."""
+
+ order: Literal["asc", "desc"]
+ """Set the order of the results"""
+
+
+class Parameters(TypedDict, total=False):
+ calculations: Iterable[ParametersCalculation]
+ """Create Calculations to compute as part of the query."""
+
+ datasets: SequenceNotStr[str]
+ """Set the Datasets to query. Leave it empty to query all the datasets."""
+
+ filter_combination: Annotated[Literal["and", "or", "AND", "OR"], PropertyInfo(alias="filterCombination")]
+ """Set a Flag to describe how to combine the filters on the query."""
+
+ filters: Iterable[ParametersFilter]
+ """Configure the Filters to apply to the query.
+
+ Supports nested groups via kind: 'group'.
+ """
+
+ group_bys: Annotated[Iterable[ParametersGroupBy], PropertyInfo(alias="groupBys")]
+ """Define how to group the results of the query."""
+
+ havings: Iterable[ParametersHaving]
+ """Configure the Having clauses that filter on calculations in the query result."""
+
+ limit: int
+ """Set a limit on the number of results / records returned by the query"""
+
+ needle: ParametersNeedle
+ """Define an expression to search using full-text search."""
+
+ order_by: Annotated[ParametersOrderBy, PropertyInfo(alias="orderBy")]
+ """Configure the order of the results returned by the query."""
diff --git a/src/cloudflare/types/workers/observability/query_create_response.py b/src/cloudflare/types/workers/observability/query_create_response.py
new file mode 100644
index 00000000000..19e2a13fcb7
--- /dev/null
+++ b/src/cloudflare/types/workers/observability/query_create_response.py
@@ -0,0 +1,244 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from typing_extensions import Literal, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = [
+ "QueryCreateResponse",
+ "Parameters",
+ "ParametersCalculation",
+ "ParametersFilter",
+ "ParametersFilterUnionMember0",
+ "ParametersFilterWorkersObservabilityFilterLeaf",
+ "ParametersGroupBy",
+ "ParametersHaving",
+ "ParametersNeedle",
+ "ParametersOrderBy",
+]
+
+
+class ParametersCalculation(BaseModel):
+ operator: Literal[
+ "uniq",
+ "count",
+ "max",
+ "min",
+ "sum",
+ "avg",
+ "median",
+ "p001",
+ "p01",
+ "p05",
+ "p10",
+ "p25",
+ "p75",
+ "p90",
+ "p95",
+ "p99",
+ "p999",
+ "stddev",
+ "variance",
+ "COUNT_DISTINCT",
+ "COUNT",
+ "MAX",
+ "MIN",
+ "SUM",
+ "AVG",
+ "MEDIAN",
+ "P001",
+ "P01",
+ "P05",
+ "P10",
+ "P25",
+ "P75",
+ "P90",
+ "P95",
+ "P99",
+ "P999",
+ "STDDEV",
+ "VARIANCE",
+ ]
+
+ alias: Optional[str] = None
+
+ key: Optional[str] = None
+
+ key_type: Optional[Literal["string", "number", "boolean"]] = FieldInfo(alias="keyType", default=None)
+
+
+class ParametersFilterUnionMember0(BaseModel):
+ filter_combination: Literal["and", "or", "AND", "OR"] = FieldInfo(alias="filterCombination")
+
+ filters: List[object]
+
+ kind: Literal["group"]
+
+
+class ParametersFilterWorkersObservabilityFilterLeaf(BaseModel):
+ """A filter condition applied to query results.
+
+ Use the keys and values endpoints to discover available fields and their values before constructing filters.
+ """
+
+ key: str
+ """Filter field name.
+
+ Use verified keys from previous query results or the keys endpoint. Common keys
+ include $metadata.service, $metadata.origin, $metadata.trigger,
+ $metadata.message, and $metadata.error.
+ """
+
+ operation: Literal[
+ "includes",
+ "not_includes",
+ "starts_with",
+ "ends_with",
+ "regex",
+ "exists",
+ "is_null",
+ "in",
+ "not_in",
+ "eq",
+ "neq",
+ "gt",
+ "gte",
+ "lt",
+ "lte",
+ "=",
+ "!=",
+ ">",
+ ">=",
+ "<",
+ "<=",
+ "INCLUDES",
+ "DOES_NOT_INCLUDE",
+ "MATCH_REGEX",
+ "EXISTS",
+ "DOES_NOT_EXIST",
+ "IN",
+ "NOT_IN",
+ "STARTS_WITH",
+ "ENDS_WITH",
+ ]
+ """Comparison operator.
+
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
+ """
+
+ type: Literal["string", "number", "boolean"]
+ """Data type of the filter field.
+
+ Must match the actual type of the key being filtered.
+ """
+
+ kind: Optional[Literal["filter"]] = None
+ """Discriminator for leaf filter nodes.
+
+ Always 'filter' when present; may be omitted.
+ """
+
+ value: Union[str, float, bool, None] = None
+ """Comparison value.
+
+ Must match actual values in your data — verify with the values endpoint. Ensure
+ the value type (string/number/boolean) matches the field type. String
+ comparisons are case-sensitive. Regex uses RE2 syntax (no
+ lookaheads/lookbehinds).
+ """
+
+
+ParametersFilter: TypeAlias = Union[ParametersFilterUnionMember0, ParametersFilterWorkersObservabilityFilterLeaf]
+
+
+class ParametersGroupBy(BaseModel):
+ type: Literal["string", "number", "boolean"]
+
+ value: str
+
+
+class ParametersHaving(BaseModel):
+ key: str
+
+ operation: Literal["eq", "neq", "gt", "gte", "lt", "lte"]
+
+ value: float
+
+
+class ParametersNeedle(BaseModel):
+ """Define an expression to search using full-text search."""
+
+ value: Union[str, float, bool]
+
+ is_regex: Optional[bool] = FieldInfo(alias="isRegex", default=None)
+
+ match_case: Optional[bool] = FieldInfo(alias="matchCase", default=None)
+
+
+class ParametersOrderBy(BaseModel):
+ """Configure the order of the results returned by the query."""
+
+ value: str
+ """Configure which Calculation to order the results by."""
+
+ order: Optional[Literal["asc", "desc"]] = None
+ """Set the order of the results"""
+
+
+class Parameters(BaseModel):
+ calculations: Optional[List[ParametersCalculation]] = None
+ """Create Calculations to compute as part of the query."""
+
+ datasets: Optional[List[str]] = None
+ """Set the Datasets to query. Leave it empty to query all the datasets."""
+
+ filter_combination: Optional[Literal["and", "or", "AND", "OR"]] = FieldInfo(alias="filterCombination", default=None)
+ """Set a Flag to describe how to combine the filters on the query."""
+
+ filters: Optional[List[ParametersFilter]] = None
+ """Configure the Filters to apply to the query.
+
+ Supports nested groups via kind: 'group'.
+ """
+
+ group_bys: Optional[List[ParametersGroupBy]] = FieldInfo(alias="groupBys", default=None)
+ """Define how to group the results of the query."""
+
+ havings: Optional[List[ParametersHaving]] = None
+ """Configure the Having clauses that filter on calculations in the query result."""
+
+ limit: Optional[int] = None
+ """Set a limit on the number of results / records returned by the query"""
+
+ needle: Optional[ParametersNeedle] = None
+ """Define an expression to search using full-text search."""
+
+ order_by: Optional[ParametersOrderBy] = FieldInfo(alias="orderBy", default=None)
+ """Configure the order of the results returned by the query."""
+
+
+class QueryCreateResponse(BaseModel):
+ id: str
+
+ adhoc: bool
+ """If the query wasn't explcitly saved"""
+
+ created: str
+
+ created_by: str = FieldInfo(alias="createdBy")
+
+ description: Optional[str] = None
+
+ name: str
+ """Query name"""
+
+ parameters: Parameters
+
+ updated: str
+
+ updated_by: str = FieldInfo(alias="updatedBy")
diff --git a/src/cloudflare/types/workers/observability/query_list_params.py b/src/cloudflare/types/workers/observability/query_list_params.py
new file mode 100644
index 00000000000..14e14a33f40
--- /dev/null
+++ b/src/cloudflare/types/workers/observability/query_list_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, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["QueryListParams"]
+
+
+class QueryListParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ order: Literal["asc", "desc"]
+
+ order_by: Annotated[Literal["created", "updated"], PropertyInfo(alias="orderBy")]
+
+ page: float
+
+ per_page: Annotated[float, PropertyInfo(alias="perPage")]
diff --git a/src/cloudflare/types/workers/observability/query_list_response.py b/src/cloudflare/types/workers/observability/query_list_response.py
new file mode 100644
index 00000000000..dd19aea58ee
--- /dev/null
+++ b/src/cloudflare/types/workers/observability/query_list_response.py
@@ -0,0 +1,244 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from typing_extensions import Literal, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = [
+ "QueryListResponse",
+ "Parameters",
+ "ParametersCalculation",
+ "ParametersFilter",
+ "ParametersFilterUnionMember0",
+ "ParametersFilterWorkersObservabilityFilterLeaf",
+ "ParametersGroupBy",
+ "ParametersHaving",
+ "ParametersNeedle",
+ "ParametersOrderBy",
+]
+
+
+class ParametersCalculation(BaseModel):
+ operator: Literal[
+ "uniq",
+ "count",
+ "max",
+ "min",
+ "sum",
+ "avg",
+ "median",
+ "p001",
+ "p01",
+ "p05",
+ "p10",
+ "p25",
+ "p75",
+ "p90",
+ "p95",
+ "p99",
+ "p999",
+ "stddev",
+ "variance",
+ "COUNT_DISTINCT",
+ "COUNT",
+ "MAX",
+ "MIN",
+ "SUM",
+ "AVG",
+ "MEDIAN",
+ "P001",
+ "P01",
+ "P05",
+ "P10",
+ "P25",
+ "P75",
+ "P90",
+ "P95",
+ "P99",
+ "P999",
+ "STDDEV",
+ "VARIANCE",
+ ]
+
+ alias: Optional[str] = None
+
+ key: Optional[str] = None
+
+ key_type: Optional[Literal["string", "number", "boolean"]] = FieldInfo(alias="keyType", default=None)
+
+
+class ParametersFilterUnionMember0(BaseModel):
+ filter_combination: Literal["and", "or", "AND", "OR"] = FieldInfo(alias="filterCombination")
+
+ filters: List[object]
+
+ kind: Literal["group"]
+
+
+class ParametersFilterWorkersObservabilityFilterLeaf(BaseModel):
+ """A filter condition applied to query results.
+
+ Use the keys and values endpoints to discover available fields and their values before constructing filters.
+ """
+
+ key: str
+ """Filter field name.
+
+ Use verified keys from previous query results or the keys endpoint. Common keys
+ include $metadata.service, $metadata.origin, $metadata.trigger,
+ $metadata.message, and $metadata.error.
+ """
+
+ operation: Literal[
+ "includes",
+ "not_includes",
+ "starts_with",
+ "ends_with",
+ "regex",
+ "exists",
+ "is_null",
+ "in",
+ "not_in",
+ "eq",
+ "neq",
+ "gt",
+ "gte",
+ "lt",
+ "lte",
+ "=",
+ "!=",
+ ">",
+ ">=",
+ "<",
+ "<=",
+ "INCLUDES",
+ "DOES_NOT_INCLUDE",
+ "MATCH_REGEX",
+ "EXISTS",
+ "DOES_NOT_EXIST",
+ "IN",
+ "NOT_IN",
+ "STARTS_WITH",
+ "ENDS_WITH",
+ ]
+ """Comparison operator.
+
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
+ """
+
+ type: Literal["string", "number", "boolean"]
+ """Data type of the filter field.
+
+ Must match the actual type of the key being filtered.
+ """
+
+ kind: Optional[Literal["filter"]] = None
+ """Discriminator for leaf filter nodes.
+
+ Always 'filter' when present; may be omitted.
+ """
+
+ value: Union[str, float, bool, None] = None
+ """Comparison value.
+
+ Must match actual values in your data — verify with the values endpoint. Ensure
+ the value type (string/number/boolean) matches the field type. String
+ comparisons are case-sensitive. Regex uses RE2 syntax (no
+ lookaheads/lookbehinds).
+ """
+
+
+ParametersFilter: TypeAlias = Union[ParametersFilterUnionMember0, ParametersFilterWorkersObservabilityFilterLeaf]
+
+
+class ParametersGroupBy(BaseModel):
+ type: Literal["string", "number", "boolean"]
+
+ value: str
+
+
+class ParametersHaving(BaseModel):
+ key: str
+
+ operation: Literal["eq", "neq", "gt", "gte", "lt", "lte"]
+
+ value: float
+
+
+class ParametersNeedle(BaseModel):
+ """Define an expression to search using full-text search."""
+
+ value: Union[str, float, bool]
+
+ is_regex: Optional[bool] = FieldInfo(alias="isRegex", default=None)
+
+ match_case: Optional[bool] = FieldInfo(alias="matchCase", default=None)
+
+
+class ParametersOrderBy(BaseModel):
+ """Configure the order of the results returned by the query."""
+
+ value: str
+ """Configure which Calculation to order the results by."""
+
+ order: Optional[Literal["asc", "desc"]] = None
+ """Set the order of the results"""
+
+
+class Parameters(BaseModel):
+ calculations: Optional[List[ParametersCalculation]] = None
+ """Create Calculations to compute as part of the query."""
+
+ datasets: Optional[List[str]] = None
+ """Set the Datasets to query. Leave it empty to query all the datasets."""
+
+ filter_combination: Optional[Literal["and", "or", "AND", "OR"]] = FieldInfo(alias="filterCombination", default=None)
+ """Set a Flag to describe how to combine the filters on the query."""
+
+ filters: Optional[List[ParametersFilter]] = None
+ """Configure the Filters to apply to the query.
+
+ Supports nested groups via kind: 'group'.
+ """
+
+ group_bys: Optional[List[ParametersGroupBy]] = FieldInfo(alias="groupBys", default=None)
+ """Define how to group the results of the query."""
+
+ havings: Optional[List[ParametersHaving]] = None
+ """Configure the Having clauses that filter on calculations in the query result."""
+
+ limit: Optional[int] = None
+ """Set a limit on the number of results / records returned by the query"""
+
+ needle: Optional[ParametersNeedle] = None
+ """Define an expression to search using full-text search."""
+
+ order_by: Optional[ParametersOrderBy] = FieldInfo(alias="orderBy", default=None)
+ """Configure the order of the results returned by the query."""
+
+
+class QueryListResponse(BaseModel):
+ id: str
+
+ adhoc: bool
+ """If the query wasn't explcitly saved"""
+
+ created: str
+
+ created_by: str = FieldInfo(alias="createdBy")
+
+ description: Optional[str] = None
+
+ name: str
+ """Query name"""
+
+ parameters: Parameters
+
+ updated: str
+
+ updated_by: str = FieldInfo(alias="updatedBy")
diff --git a/src/cloudflare/types/workers/observability/telemetry_keys_params.py b/src/cloudflare/types/workers/observability/telemetry_keys_params.py
index 0f9c75cd0e3..79eb57fed26 100644
--- a/src/cloudflare/types/workers/observability/telemetry_keys_params.py
+++ b/src/cloudflare/types/workers/observability/telemetry_keys_params.py
@@ -80,6 +80,7 @@ class FilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict, total=Fa
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -105,13 +106,14 @@ class FilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict, total=Fa
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
@@ -168,6 +170,7 @@ class FilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -193,13 +196,14 @@ class FilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
diff --git a/src/cloudflare/types/workers/observability/telemetry_query_params.py b/src/cloudflare/types/workers/observability/telemetry_query_params.py
index c328f89aad2..ed47560abdf 100644
--- a/src/cloudflare/types/workers/observability/telemetry_query_params.py
+++ b/src/cloudflare/types/workers/observability/telemetry_query_params.py
@@ -174,7 +174,8 @@ class ParametersCalculation(TypedDict, total=False):
]
"""Aggregation operator to apply.
- Examples: count, avg, sum, min, max, p50, p90, p95, p99, uniq, stddev, variance.
+ Examples: count, avg, sum, min, max, median, p90, p95, p99, uniq, stddev,
+ variance.
"""
alias: str
@@ -224,6 +225,7 @@ class ParametersFilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -249,13 +251,14 @@ class ParametersFilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
@@ -312,6 +315,7 @@ class ParametersFilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -337,13 +341,14 @@ class ParametersFilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
diff --git a/src/cloudflare/types/workers/observability/telemetry_query_response.py b/src/cloudflare/types/workers/observability/telemetry_query_response.py
index 6ec793c152f..16cc9fe5fc4 100644
--- a/src/cloudflare/types/workers/observability/telemetry_query_response.py
+++ b/src/cloudflare/types/workers/observability/telemetry_query_response.py
@@ -42,9 +42,11 @@
"EventsEventMetadata",
"EventsEventWorkers",
"EventsEventWorkersUnionMember0",
+ "EventsEventWorkersUnionMember0Preview",
"EventsEventWorkersUnionMember0ScriptVersion",
"EventsEventWorkersUnionMember1",
"EventsEventWorkersUnionMember1DiagnosticsChannelEvent",
+ "EventsEventWorkersUnionMember1Preview",
"EventsEventWorkersUnionMember1ScriptVersion",
"EventsField",
"EventsSeries",
@@ -54,9 +56,11 @@
"InvocationMetadata",
"InvocationWorkers",
"InvocationWorkersUnionMember0",
+ "InvocationWorkersUnionMember0Preview",
"InvocationWorkersUnionMember0ScriptVersion",
"InvocationWorkersUnionMember1",
"InvocationWorkersUnionMember1DiagnosticsChannelEvent",
+ "InvocationWorkersUnionMember1Preview",
"InvocationWorkersUnionMember1ScriptVersion",
"Trace",
]
@@ -137,6 +141,7 @@ class RunQueryParametersFilterWorkersObservabilityFilterLeaf(BaseModel):
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -162,12 +167,13 @@ class RunQueryParametersFilterWorkersObservabilityFilterLeaf(BaseModel):
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Literal["string", "number", "boolean"]
@@ -326,7 +332,7 @@ class RunStatistics(BaseModel):
class Run(BaseModel):
"""
- The query run metadata including the query definition, execution status, and timeframe.
+ Represents a single execution of a query against Workers Observability data, including the query definition, execution status, and performance statistics.
"""
id: str
@@ -551,7 +557,6 @@ class EventsEventMetadata(BaseModel):
"""Cloudflare product that generated this event (e.g. workers, pages)."""
cold_start: Optional[int] = FieldInfo(alias="coldStart", default=None)
- """Whether this was a cold start (1) or warm invocation (0)."""
cost: Optional[int] = None
"""Estimated cost units for this invocation."""
@@ -635,6 +640,14 @@ class EventsEventMetadata(BaseModel):
"""Request URL that triggered the Worker invocation."""
+class EventsEventWorkersUnionMember0Preview(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ slug: Optional[str] = None
+
+
class EventsEventWorkersUnionMember0ScriptVersion(BaseModel):
id: Optional[str] = None
@@ -662,6 +675,8 @@ class EventsEventWorkersUnionMember0(BaseModel):
outcome: Optional[str] = None
+ preview: Optional[EventsEventWorkersUnionMember0Preview] = None
+
script_version: Optional[EventsEventWorkersUnionMember0ScriptVersion] = FieldInfo(
alias="scriptVersion", default=None
)
@@ -681,6 +696,14 @@ class EventsEventWorkersUnionMember1DiagnosticsChannelEvent(BaseModel):
timestamp: float
+class EventsEventWorkersUnionMember1Preview(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ slug: Optional[str] = None
+
+
class EventsEventWorkersUnionMember1ScriptVersion(BaseModel):
id: Optional[str] = None
@@ -718,6 +741,8 @@ class EventsEventWorkersUnionMember1(BaseModel):
execution_model: Optional[Literal["durableObject", "stateless"]] = FieldInfo(alias="executionModel", default=None)
+ preview: Optional[EventsEventWorkersUnionMember1Preview] = None
+
script_version: Optional[EventsEventWorkersUnionMember1ScriptVersion] = FieldInfo(
alias="scriptVersion", default=None
)
@@ -746,7 +771,7 @@ class EventsEvent(BaseModel):
dataset: str
"""The dataset this event belongs to (e.g. cloudflare-workers)."""
- source: Union[str, object]
+ source: Union[str, Dict[str, object]]
"""Raw log payload.
May be a string or a structured object depending on how the log was emitted.
@@ -755,7 +780,7 @@ class EventsEvent(BaseModel):
timestamp: int
"""Event timestamp as a Unix epoch in milliseconds."""
- containers: Optional[object] = FieldInfo(alias="$containers", default=None)
+ containers: Optional[Dict[str, object]] = FieldInfo(alias="$containers", default=None)
"""
Cloudflare Containers event information that enriches your logs for identifying
and debugging issues.
@@ -850,7 +875,6 @@ class InvocationMetadata(BaseModel):
"""Cloudflare product that generated this event (e.g. workers, pages)."""
cold_start: Optional[int] = FieldInfo(alias="coldStart", default=None)
- """Whether this was a cold start (1) or warm invocation (0)."""
cost: Optional[int] = None
"""Estimated cost units for this invocation."""
@@ -934,6 +958,14 @@ class InvocationMetadata(BaseModel):
"""Request URL that triggered the Worker invocation."""
+class InvocationWorkersUnionMember0Preview(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ slug: Optional[str] = None
+
+
class InvocationWorkersUnionMember0ScriptVersion(BaseModel):
id: Optional[str] = None
@@ -961,6 +993,8 @@ class InvocationWorkersUnionMember0(BaseModel):
outcome: Optional[str] = None
+ preview: Optional[InvocationWorkersUnionMember0Preview] = None
+
script_version: Optional[InvocationWorkersUnionMember0ScriptVersion] = FieldInfo(
alias="scriptVersion", default=None
)
@@ -980,6 +1014,14 @@ class InvocationWorkersUnionMember1DiagnosticsChannelEvent(BaseModel):
timestamp: float
+class InvocationWorkersUnionMember1Preview(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ slug: Optional[str] = None
+
+
class InvocationWorkersUnionMember1ScriptVersion(BaseModel):
id: Optional[str] = None
@@ -1017,6 +1059,8 @@ class InvocationWorkersUnionMember1(BaseModel):
execution_model: Optional[Literal["durableObject", "stateless"]] = FieldInfo(alias="executionModel", default=None)
+ preview: Optional[InvocationWorkersUnionMember1Preview] = None
+
script_version: Optional[InvocationWorkersUnionMember1ScriptVersion] = FieldInfo(
alias="scriptVersion", default=None
)
@@ -1045,7 +1089,7 @@ class Invocation(BaseModel):
dataset: str
"""The dataset this event belongs to (e.g. cloudflare-workers)."""
- source: Union[str, object]
+ source: Union[str, Dict[str, object]]
"""Raw log payload.
May be a string or a structured object depending on how the log was emitted.
@@ -1054,7 +1098,7 @@ class Invocation(BaseModel):
timestamp: int
"""Event timestamp as a Unix epoch in milliseconds."""
- containers: Optional[object] = FieldInfo(alias="$containers", default=None)
+ containers: Optional[Dict[str, object]] = FieldInfo(alias="$containers", default=None)
"""
Cloudflare Containers event information that enriches your logs for identifying
and debugging issues.
@@ -1104,8 +1148,8 @@ class TelemetryQueryResponse(BaseModel):
run: Run
"""
- The query run metadata including the query definition, execution status, and
- timeframe.
+ Represents a single execution of a query against Workers Observability data,
+ including the query definition, execution status, and performance statistics.
"""
statistics: Statistics
diff --git a/src/cloudflare/types/workers/observability/telemetry_values_params.py b/src/cloudflare/types/workers/observability/telemetry_values_params.py
index a42192593ea..ec1d331bf9e 100644
--- a/src/cloudflare/types/workers/observability/telemetry_values_params.py
+++ b/src/cloudflare/types/workers/observability/telemetry_values_params.py
@@ -88,6 +88,7 @@ class FilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict, total=Fa
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -113,13 +114,14 @@ class FilterUnionMember0FilterWorkersObservabilityFilterLeaf(TypedDict, total=Fa
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
@@ -176,6 +178,7 @@ class FilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"includes",
"not_includes",
"starts_with",
+ "ends_with",
"regex",
"exists",
"is_null",
@@ -201,13 +204,14 @@ class FilterWorkersObservabilityFilterLeaf(TypedDict, total=False):
"IN",
"NOT_IN",
"STARTS_WITH",
+ "ENDS_WITH",
]
]
"""Comparison operator.
- String operators: includes, not_includes, starts_with, regex. Existence: exists,
- is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq,
- gt, gte, lt, lte.
+ String operators: includes, not_includes, starts_with, ends_with, regex.
+ Existence: exists, is_null. Set membership: in, not_in (comma-separated values).
+ Numeric: eq, neq, gt, gte, lt, lte.
"""
type: Required[Literal["string", "number", "boolean"]]
diff --git a/src/cloudflare/types/workers/script.py b/src/cloudflare/types/workers/script.py
index 8bc9718e169..382799817c8 100644
--- a/src/cloudflare/types/workers/script.py
+++ b/src/cloudflare/types/workers/script.py
@@ -75,6 +75,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/script_list_response.py b/src/cloudflare/types/workers/script_list_response.py
index 20ff69aa419..4b3d6a3f6ef 100644
--- a/src/cloudflare/types/workers/script_list_response.py
+++ b/src/cloudflare/types/workers/script_list_response.py
@@ -76,6 +76,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/script_setting.py b/src/cloudflare/types/workers/script_setting.py
index f6e175f1468..869a74f1944 100644
--- a/src/cloudflare/types/workers/script_setting.py
+++ b/src/cloudflare/types/workers/script_setting.py
@@ -1,6 +1,7 @@
# 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
from .scripts.consumer_script import ConsumerScript
@@ -46,6 +47,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py
index 87d31dee903..ba3f796cc5b 100644
--- a/src/cloudflare/types/workers/script_update_params.py
+++ b/src/cloudflare/types/workers/script_update_params.py
@@ -812,6 +812,15 @@ class MetadataObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class MetadataObservability(TypedDict, total=False):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/script_update_response.py b/src/cloudflare/types/workers/script_update_response.py
index 54fd31792f8..a1832a17698 100644
--- a/src/cloudflare/types/workers/script_update_response.py
+++ b/src/cloudflare/types/workers/script_update_response.py
@@ -75,6 +75,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_params.py b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_params.py
index 6429f45ae6e..87dafb9dfb7 100644
--- a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_params.py
+++ b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_params.py
@@ -744,6 +744,15 @@ class SettingsObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class SettingsObservability(TypedDict, total=False):
"""Observability settings for the Worker."""
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 067b2732892..cefd821f11e 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
@@ -719,6 +719,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""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 0ef9c3aa1d2..e08b13618cd 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
@@ -719,6 +719,15 @@ class ObservabilityTraces(BaseModel):
persist: Optional[bool] = None
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Optional[Literal["authenticated", "accept"]] = None
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(BaseModel):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/workers/scripts/setting_edit_params.py b/src/cloudflare/types/workers/scripts/setting_edit_params.py
index 79602173d79..5f7bb20223b 100644
--- a/src/cloudflare/types/workers/scripts/setting_edit_params.py
+++ b/src/cloudflare/types/workers/scripts/setting_edit_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable, Optional
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ...._types import SequenceNotStr
from .consumer_script_param import ConsumerScriptParam
@@ -66,6 +66,15 @@ class ObservabilityTraces(TypedDict, total=False):
persist: bool
"""Whether trace persistence is enabled for the Worker."""
+ propagation_policy: Literal["authenticated", "accept"]
+ """
+ Controls how inbound trace context (traceparent/tracestate) headers on incoming
+ requests are handled. "authenticated" (default) honors inbound trace context
+ only when accompanied by a valid trace auth token. "accept" unconditionally
+ accepts inbound trace context. Requires the trace propagation feature to be
+ enabled.
+ """
+
class Observability(TypedDict, total=False):
"""Observability settings for the Worker."""
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/__init__.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/__init__.py
index e44bd3633a5..e0e41af8d40 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/__init__.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/__init__.py
@@ -11,6 +11,7 @@
from .server_create_params import ServerCreateParams as ServerCreateParams
from .server_list_response import ServerListResponse as ServerListResponse
from .server_read_response import ServerReadResponse as ServerReadResponse
+from .server_sync_response import ServerSyncResponse as ServerSyncResponse
from .server_update_params import ServerUpdateParams as ServerUpdateParams
from .portal_create_response import PortalCreateResponse as PortalCreateResponse
from .portal_delete_response import PortalDeleteResponse as PortalDeleteResponse
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_params.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_params.py
index 19bc795be10..8ccd9ebd8b6 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_params.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_params.py
@@ -55,6 +55,8 @@ class Server(TypedDict, total=False):
default_disabled: bool
+ is_shared_oauth_callback_enabled: bool
+
on_behalf: bool
updated_prompts: Iterable[ServerUpdatedPrompt]
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_response.py
index 1e6d209fca3..f0546c8d1b8 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_create_response.py
@@ -6,32 +6,67 @@
from ......_models import BaseModel
-__all__ = ["PortalCreateResponse", "Server", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+__all__ = ["PortalCreateResponse", "Server", "ServerErrorDetails", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+
+
+class ServerErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class ServerUpdatedPrompt(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class ServerUpdatedTool(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class Server(BaseModel):
id: str
@@ -57,6 +92,17 @@ class Server(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ServerErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_list_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_list_response.py
index c5b53a3c1cb..e94981027f8 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_list_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_list_response.py
@@ -6,32 +6,67 @@
from ......_models import BaseModel
-__all__ = ["PortalListResponse", "Server", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+__all__ = ["PortalListResponse", "Server", "ServerErrorDetails", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+
+
+class ServerErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class ServerUpdatedPrompt(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class ServerUpdatedTool(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class Server(BaseModel):
id: str
@@ -57,6 +92,17 @@ class Server(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ServerErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_read_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_read_response.py
index 63b28b84b6d..36984ca0db6 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_read_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_read_response.py
@@ -6,32 +6,67 @@
from ......_models import BaseModel
-__all__ = ["PortalReadResponse", "Server", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+__all__ = ["PortalReadResponse", "Server", "ServerErrorDetails", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+
+
+class ServerErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class ServerUpdatedPrompt(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class ServerUpdatedTool(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class Server(BaseModel):
id: str
@@ -57,6 +92,17 @@ class Server(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ServerErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_params.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_params.py
index 1bd9dd5b4a7..46d8141166d 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_params.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_params.py
@@ -52,6 +52,8 @@ class Server(TypedDict, total=False):
default_disabled: bool
+ is_shared_oauth_callback_enabled: bool
+
on_behalf: bool
updated_prompts: Iterable[ServerUpdatedPrompt]
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_response.py
index e42bc36279e..4282865103d 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/portal_update_response.py
@@ -6,32 +6,67 @@
from ......_models import BaseModel
-__all__ = ["PortalUpdateResponse", "Server", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+__all__ = ["PortalUpdateResponse", "Server", "ServerErrorDetails", "ServerUpdatedPrompt", "ServerUpdatedTool"]
+
+
+class ServerErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class ServerUpdatedPrompt(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class ServerUpdatedTool(BaseModel):
name: str
description: Optional[str] = None
+ """Deprecated: use `portal_description` or `server_description` instead.
+
+ Populated for backward compatibility — portal-level wins when present, otherwise
+ falls back to server-level. Will be removed after the deprecation window.
+ """
enabled: Optional[bool] = None
portal_alias: Optional[str] = None
+ portal_description: Optional[str] = None
+
server_alias: Optional[str] = None
+ server_description: Optional[str] = None
+
class Server(BaseModel):
id: str
@@ -57,6 +92,17 @@ class Server(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ServerErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_params.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_params.py
index 57c26163547..07490cd019d 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_params.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_params.py
@@ -24,6 +24,15 @@ class ServerCreateParams(TypedDict, total=False):
description: Optional[str]
+ is_shared_oauth_callback_enabled: bool
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
updated_prompts: Iterable[UpdatedPrompt]
updated_tools: Iterable[UpdatedTool]
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_response.py
index 77a5b5a4684..6ffe1ceb30f 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_create_response.py
@@ -6,7 +6,24 @@
from ......_models import BaseModel
-__all__ = ["ServerCreateResponse", "UpdatedPrompt", "UpdatedTool"]
+__all__ = ["ServerCreateResponse", "ErrorDetails", "UpdatedPrompt", "UpdatedTool"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class UpdatedPrompt(BaseModel):
@@ -51,6 +68,17 @@ class ServerCreateResponse(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_delete_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_delete_response.py
index 6984b12b04d..82afcd053ed 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_delete_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_delete_response.py
@@ -6,7 +6,24 @@
from ......_models import BaseModel
-__all__ = ["ServerDeleteResponse", "UpdatedPrompt", "UpdatedTool"]
+__all__ = ["ServerDeleteResponse", "ErrorDetails", "UpdatedPrompt", "UpdatedTool"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class UpdatedPrompt(BaseModel):
@@ -51,6 +68,17 @@ class ServerDeleteResponse(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_list_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_list_response.py
index 521e0eae885..99940802311 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_list_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_list_response.py
@@ -6,7 +6,24 @@
from ......_models import BaseModel
-__all__ = ["ServerListResponse", "UpdatedPrompt", "UpdatedTool"]
+__all__ = ["ServerListResponse", "ErrorDetails", "UpdatedPrompt", "UpdatedTool"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class UpdatedPrompt(BaseModel):
@@ -51,6 +68,17 @@ class ServerListResponse(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_read_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_read_response.py
index 4b089d0d1dc..f26fde4096a 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_read_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_read_response.py
@@ -6,7 +6,24 @@
from ......_models import BaseModel
-__all__ = ["ServerReadResponse", "UpdatedPrompt", "UpdatedTool"]
+__all__ = ["ServerReadResponse", "ErrorDetails", "UpdatedPrompt", "UpdatedTool"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class UpdatedPrompt(BaseModel):
@@ -51,6 +68,17 @@ class ServerReadResponse(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_sync_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_sync_response.py
new file mode 100644
index 00000000000..fbef94ea13d
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_sync_response.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ......_models import BaseModel
+
+__all__ = ["ServerSyncResponse", "ErrorDetails"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
+
+
+class ServerSyncResponse(BaseModel):
+ error: Optional[str] = None
+
+ error_details: Optional[ErrorDetails] = None
+
+ status: Optional[str] = None
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_params.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_params.py
index 38cf578f571..138cdb7fbbd 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_params.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_params.py
@@ -15,6 +15,15 @@ class ServerUpdateParams(TypedDict, total=False):
description: Optional[str]
+ is_shared_oauth_callback_enabled: bool
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
name: str
updated_prompts: Iterable[UpdatedPrompt]
diff --git a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_response.py b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_response.py
index 54dce259372..92783c68a51 100644
--- a/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_response.py
+++ b/src/cloudflare/types/zero_trust/access/ai_controls/mcp/server_update_response.py
@@ -6,7 +6,24 @@
from ......_models import BaseModel
-__all__ = ["ServerUpdateResponse", "UpdatedPrompt", "UpdatedTool"]
+__all__ = ["ServerUpdateResponse", "ErrorDetails", "UpdatedPrompt", "UpdatedTool"]
+
+
+class ErrorDetails(BaseModel):
+ cause: Optional[str] = None
+ """Underlying error message"""
+
+ is_upstream: Optional[bool] = None
+ """True = MCP server returned an error. False = couldn't reach the server"""
+
+ mcp_code: Optional[float] = None
+ """MCP protocol error code"""
+
+ retryable: Optional[bool] = None
+ """Whether the error is transient and worth retrying"""
+
+ status_code: Optional[float] = None
+ """HTTP status code from the server"""
class UpdatedPrompt(BaseModel):
@@ -51,6 +68,17 @@ class ServerUpdateResponse(BaseModel):
error: Optional[str] = None
+ error_details: Optional[ErrorDetails] = None
+
+ is_shared_oauth_callback_enabled: Optional[bool] = None
+ """
+ When true, the gateway worker uses the shared Cloudflare-owned OAuth callback
+ endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the
+ customer portal hostname. New servers default to true; existing servers default
+ to false. Effective behavior is gated by the gateway worker's per-env rollout
+ mode KV key.
+ """
+
last_successful_sync: Optional[datetime] = None
last_synced: Optional[datetime] = None
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 c9ea53edc3f..8b3777d0507 100644
--- a/src/cloudflare/types/zero_trust/access/applications/access_rule.py
+++ b/src/cloudflare/types/zero_trust/access/applications/access_rule.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union
+from typing import List, Union, Optional
from typing_extensions import Literal, TypeAlias
from .ip_rule import IPRule
@@ -38,6 +38,8 @@
"AccessLinkedAppTokenRuleLinkedAppToken",
"AccessUserRiskScoreRule",
"AccessUserRiskScoreRuleUserRiskScore",
+ "AccessCloudflareAccountMemberRule",
+ "AccessCloudflareAccountMemberRuleCloudflareAccountMember",
]
@@ -130,6 +132,20 @@ class AccessUserRiskScoreRule(BaseModel):
user_risk_score: AccessUserRiskScoreRuleUserRiskScore
+class AccessCloudflareAccountMemberRuleCloudflareAccountMember(BaseModel):
+ account_id: Optional[str] = None
+ """Identifier."""
+
+
+class AccessCloudflareAccountMemberRule(BaseModel):
+ """
+ Matches users who are members of a specific Cloudflare account.
+ Requires a Cloudflare identity provider.
+ """
+
+ cloudflare_account_member: AccessCloudflareAccountMemberRuleCloudflareAccountMember
+
+
AccessRule: TypeAlias = Union[
GroupRule,
AnyValidServiceTokenRule,
@@ -156,4 +172,5 @@ class AccessUserRiskScoreRule(BaseModel):
ServiceTokenRule,
AccessLinkedAppTokenRule,
AccessUserRiskScoreRule,
+ AccessCloudflareAccountMemberRule,
]
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 65d2137c1aa..dc92fec6309 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
@@ -39,6 +39,8 @@
"AccessLinkedAppTokenRuleLinkedAppToken",
"AccessUserRiskScoreRule",
"AccessUserRiskScoreRuleUserRiskScore",
+ "AccessCloudflareAccountMemberRule",
+ "AccessCloudflareAccountMemberRuleCloudflareAccountMember",
]
@@ -131,6 +133,20 @@ class AccessUserRiskScoreRule(TypedDict, total=False):
user_risk_score: Required[AccessUserRiskScoreRuleUserRiskScore]
+class AccessCloudflareAccountMemberRuleCloudflareAccountMember(TypedDict, total=False):
+ account_id: str
+ """Identifier."""
+
+
+class AccessCloudflareAccountMemberRule(TypedDict, total=False):
+ """
+ Matches users who are members of a specific Cloudflare account.
+ Requires a Cloudflare identity provider.
+ """
+
+ cloudflare_account_member: Required[AccessCloudflareAccountMemberRuleCloudflareAccountMember]
+
+
AccessRuleParam: TypeAlias = Union[
GroupRuleParam,
AnyValidServiceTokenRuleParam,
@@ -157,4 +173,5 @@ class AccessUserRiskScoreRule(TypedDict, total=False):
ServiceTokenRuleParam,
AccessLinkedAppTokenRule,
AccessUserRiskScoreRule,
+ AccessCloudflareAccountMemberRule,
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider.py b/src/cloudflare/types/zero_trust/identity_provider.py
index 0a6b1df5be9..ece6f406022 100644
--- a/src/cloudflare/types/zero_trust/identity_provider.py
+++ b/src/cloudflare/types/zero_trust/identity_provider.py
@@ -61,6 +61,10 @@
"AccessOnetimepinConfig",
"AccessOnetimepinSAMLCertificateSet",
"AccessOnetimepinSAMLCertificateSetCurrentCertificate",
+ "AccessCloudflare",
+ "AccessCloudflareConfig",
+ "AccessCloudflareSAMLCertificateSet",
+ "AccessCloudflareSAMLCertificateSetCurrentCertificate",
]
@@ -1474,6 +1478,112 @@ class AccessOnetimepin(BaseModel):
"""
+class AccessCloudflareConfig(BaseModel):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ redirect_url: Optional[str] = None
+
+ restrict_to_account_members: Optional[bool] = None
+ """
+ When enabled, only users who are members of your Cloudflare account can
+ authenticate through this identity provider. When disabled, any user with a
+ Cloudflare account can authenticate, subject to your Access policies.
+ """
+
+
+class AccessCloudflareSAMLCertificateSetCurrentCertificate(BaseModel):
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ is_current: bool
+ """Indicates whether this is the currently active certificate"""
+
+ not_after: datetime
+ """Certificate expiration date.
+
+ Certificates are automatically rotated 30 days before expiration.
+ """
+
+ public_certificate: str
+ """
+ PEM-encoded X.509 certificate containing the public key. Configure this
+ certificate in your external SAML Identity Provider to enable encryption.
+ """
+
+ uid: str
+ """Unique identifier for the certificate"""
+
+
+class AccessCloudflareSAMLCertificateSet(BaseModel):
+ """
+ The SAML encryption certificate set details, including current and previous certificates.
+ Only present for SAML identity providers with a certificate set assigned.
+ """
+
+ created_at: datetime
+ """Timestamp when the certificate set was created"""
+
+ uid: str
+ """Unique identifier for the certificate set"""
+
+ updated_at: datetime
+ """Timestamp when the certificate set was last updated (e.g., during rotation)"""
+
+ current_certificate: Optional[AccessCloudflareSAMLCertificateSetCurrentCertificate] = None
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ previous_certificate: Optional[object] = None
+ """The previous certificate, maintained during rotation to ensure continuity.
+
+ Null if no rotation has occurred. Mirrors the structure of `saml_certificate`.
+ """
+
+
+class AccessCloudflare(BaseModel):
+ config: AccessCloudflareConfig
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: str
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: IdentityProviderType
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ id: Optional[str] = None
+ """UUID."""
+
+ saml_certificate_set: Optional[AccessCloudflareSAMLCertificateSet] = None
+ """
+ The SAML encryption certificate set details, including current and previous
+ certificates. Only present for SAML identity providers with a certificate set
+ assigned.
+ """
+
+ saml_certificate_set_id: Optional[str] = None
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: Optional[IdentityProviderSCIMConfig] = None
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
IdentityProvider: TypeAlias = Union[
AzureAD,
AccessCentrify,
@@ -1489,4 +1599,5 @@ class AccessOnetimepin(BaseModel):
AccessSAML,
AccessYandex,
AccessOnetimepin,
+ AccessCloudflare,
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider_create_params.py b/src/cloudflare/types/zero_trust/identity_provider_create_params.py
index 182213746f7..0884b625905 100644
--- a/src/cloudflare/types/zero_trust/identity_provider_create_params.py
+++ b/src/cloudflare/types/zero_trust/identity_provider_create_params.py
@@ -37,6 +37,8 @@
"AccessYandex",
"AccessOnetimepin",
"AccessOnetimepinConfig",
+ "AccessCloudflare",
+ "AccessCloudflareConfig",
]
@@ -867,6 +869,59 @@ class AccessOnetimepinConfig(TypedDict, total=False):
pass
+class AccessCloudflare(TypedDict, total=False):
+ config: Required[AccessCloudflareConfig]
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: Required[str]
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: Required[IdentityProviderType]
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ account_id: str
+ """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID."""
+
+ zone_id: str
+ """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID."""
+
+ saml_certificate_set_id: str
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: IdentityProviderSCIMConfigParam
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
+class AccessCloudflareConfig(TypedDict, total=False):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ restrict_to_account_members: bool
+ """
+ When enabled, only users who are members of your Cloudflare account can
+ authenticate through this identity provider. When disabled, any user with a
+ Cloudflare account can authenticate, subject to your Access policies.
+ """
+
+
IdentityProviderCreateParams: TypeAlias = Union[
AzureAD,
AccessCentrify,
@@ -882,4 +937,5 @@ class AccessOnetimepinConfig(TypedDict, total=False):
AccessSAML,
AccessYandex,
AccessOnetimepin,
+ AccessCloudflare,
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider_list_response.py b/src/cloudflare/types/zero_trust/identity_provider_list_response.py
index 7fc58c503e9..b90176a0792 100644
--- a/src/cloudflare/types/zero_trust/identity_provider_list_response.py
+++ b/src/cloudflare/types/zero_trust/identity_provider_list_response.py
@@ -57,6 +57,14 @@
"AccessYandex",
"AccessYandexSAMLCertificateSet",
"AccessYandexSAMLCertificateSetCurrentCertificate",
+ "AccessOnetimepin",
+ "AccessOnetimepinConfig",
+ "AccessOnetimepinSAMLCertificateSet",
+ "AccessOnetimepinSAMLCertificateSetCurrentCertificate",
+ "AccessCloudflare",
+ "AccessCloudflareConfig",
+ "AccessCloudflareSAMLCertificateSet",
+ "AccessCloudflareSAMLCertificateSetCurrentCertificate",
]
@@ -1371,6 +1379,211 @@ class AccessYandex(BaseModel):
"""
+class AccessOnetimepinConfig(BaseModel):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ redirect_url: Optional[str] = None
+
+
+class AccessOnetimepinSAMLCertificateSetCurrentCertificate(BaseModel):
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ is_current: bool
+ """Indicates whether this is the currently active certificate"""
+
+ not_after: datetime
+ """Certificate expiration date.
+
+ Certificates are automatically rotated 30 days before expiration.
+ """
+
+ public_certificate: str
+ """
+ PEM-encoded X.509 certificate containing the public key. Configure this
+ certificate in your external SAML Identity Provider to enable encryption.
+ """
+
+ uid: str
+ """Unique identifier for the certificate"""
+
+
+class AccessOnetimepinSAMLCertificateSet(BaseModel):
+ """
+ The SAML encryption certificate set details, including current and previous certificates.
+ Only present for SAML identity providers with a certificate set assigned.
+ """
+
+ created_at: datetime
+ """Timestamp when the certificate set was created"""
+
+ uid: str
+ """Unique identifier for the certificate set"""
+
+ updated_at: datetime
+ """Timestamp when the certificate set was last updated (e.g., during rotation)"""
+
+ current_certificate: Optional[AccessOnetimepinSAMLCertificateSetCurrentCertificate] = None
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ previous_certificate: Optional[object] = None
+ """The previous certificate, maintained during rotation to ensure continuity.
+
+ Null if no rotation has occurred. Mirrors the structure of `saml_certificate`.
+ """
+
+
+class AccessOnetimepin(BaseModel):
+ config: AccessOnetimepinConfig
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: str
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: IdentityProviderType
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ id: Optional[str] = None
+ """UUID."""
+
+ saml_certificate_set: Optional[AccessOnetimepinSAMLCertificateSet] = None
+ """
+ The SAML encryption certificate set details, including current and previous
+ certificates. Only present for SAML identity providers with a certificate set
+ assigned.
+ """
+
+ saml_certificate_set_id: Optional[str] = None
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: Optional[IdentityProviderSCIMConfig] = None
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
+class AccessCloudflareConfig(BaseModel):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ redirect_url: Optional[str] = None
+
+ restrict_to_account_members: Optional[bool] = None
+ """
+ When enabled, only users who are members of your Cloudflare account can
+ authenticate through this identity provider. When disabled, any user with a
+ Cloudflare account can authenticate, subject to your Access policies.
+ """
+
+
+class AccessCloudflareSAMLCertificateSetCurrentCertificate(BaseModel):
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ is_current: bool
+ """Indicates whether this is the currently active certificate"""
+
+ not_after: datetime
+ """Certificate expiration date.
+
+ Certificates are automatically rotated 30 days before expiration.
+ """
+
+ public_certificate: str
+ """
+ PEM-encoded X.509 certificate containing the public key. Configure this
+ certificate in your external SAML Identity Provider to enable encryption.
+ """
+
+ uid: str
+ """Unique identifier for the certificate"""
+
+
+class AccessCloudflareSAMLCertificateSet(BaseModel):
+ """
+ The SAML encryption certificate set details, including current and previous certificates.
+ Only present for SAML identity providers with a certificate set assigned.
+ """
+
+ created_at: datetime
+ """Timestamp when the certificate set was created"""
+
+ uid: str
+ """Unique identifier for the certificate set"""
+
+ updated_at: datetime
+ """Timestamp when the certificate set was last updated (e.g., during rotation)"""
+
+ current_certificate: Optional[AccessCloudflareSAMLCertificateSetCurrentCertificate] = None
+ """The currently active certificate used for encrypting SAML assertions"""
+
+ previous_certificate: Optional[object] = None
+ """The previous certificate, maintained during rotation to ensure continuity.
+
+ Null if no rotation has occurred. Mirrors the structure of `saml_certificate`.
+ """
+
+
+class AccessCloudflare(BaseModel):
+ config: AccessCloudflareConfig
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: str
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: IdentityProviderType
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ id: Optional[str] = None
+ """UUID."""
+
+ saml_certificate_set: Optional[AccessCloudflareSAMLCertificateSet] = None
+ """
+ The SAML encryption certificate set details, including current and previous
+ certificates. Only present for SAML identity providers with a certificate set
+ assigned.
+ """
+
+ saml_certificate_set_id: Optional[str] = None
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: Optional[IdentityProviderSCIMConfig] = None
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
IdentityProviderListResponse: TypeAlias = Union[
AzureAD,
AccessCentrify,
@@ -1385,4 +1598,6 @@ class AccessYandex(BaseModel):
AccessPingone,
AccessSAML,
AccessYandex,
+ AccessOnetimepin,
+ AccessCloudflare,
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider_param.py b/src/cloudflare/types/zero_trust/identity_provider_param.py
index 9628da53696..96b084904ea 100644
--- a/src/cloudflare/types/zero_trust/identity_provider_param.py
+++ b/src/cloudflare/types/zero_trust/identity_provider_param.py
@@ -36,6 +36,8 @@
"AccessYandex",
"AccessOnetimepin",
"AccessOnetimepinConfig",
+ "AccessCloudflare",
+ "AccessCloudflareConfig",
]
@@ -708,6 +710,53 @@ class AccessOnetimepin(TypedDict, total=False):
"""
+class AccessCloudflareConfig(TypedDict, total=False):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ restrict_to_account_members: bool
+ """
+ When enabled, only users who are members of your Cloudflare account can
+ authenticate through this identity provider. When disabled, any user with a
+ Cloudflare account can authenticate, subject to your Access policies.
+ """
+
+
+class AccessCloudflare(TypedDict, total=False):
+ config: Required[AccessCloudflareConfig]
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: Required[str]
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: Required[IdentityProviderType]
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ saml_certificate_set_id: str
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: IdentityProviderSCIMConfigParam
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
IdentityProviderParam: TypeAlias = Union[
AzureADParam,
AccessCentrify,
@@ -723,4 +772,5 @@ class AccessOnetimepin(TypedDict, total=False):
AccessSAML,
AccessYandex,
AccessOnetimepin,
+ AccessCloudflare,
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider_type.py b/src/cloudflare/types/zero_trust/identity_provider_type.py
index 13dba5ce2c5..7dca466f5cb 100644
--- a/src/cloudflare/types/zero_trust/identity_provider_type.py
+++ b/src/cloudflare/types/zero_trust/identity_provider_type.py
@@ -19,4 +19,5 @@
"onelogin",
"pingone",
"yandex",
+ "cloudflare",
]
diff --git a/src/cloudflare/types/zero_trust/identity_provider_update_params.py b/src/cloudflare/types/zero_trust/identity_provider_update_params.py
index a59af62faef..88dc8719499 100644
--- a/src/cloudflare/types/zero_trust/identity_provider_update_params.py
+++ b/src/cloudflare/types/zero_trust/identity_provider_update_params.py
@@ -37,6 +37,8 @@
"AccessYandex",
"AccessOnetimepin",
"AccessOnetimepinConfig",
+ "AccessCloudflare",
+ "AccessCloudflareConfig",
]
@@ -867,6 +869,59 @@ class AccessOnetimepinConfig(TypedDict, total=False):
pass
+class AccessCloudflare(TypedDict, total=False):
+ config: Required[AccessCloudflareConfig]
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ name: Required[str]
+ """The name of the identity provider, shown to users on the login page."""
+
+ type: Required[IdentityProviderType]
+ """The type of identity provider.
+
+ To determine the value for a specific provider, refer to our
+ [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ account_id: str
+ """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID."""
+
+ zone_id: str
+ """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID."""
+
+ saml_certificate_set_id: str
+ """
+ The UID of the SAML encryption certificate set assigned to this Identity
+ Provider. Only present for SAML identity providers with encryption configured.
+ Create a certificate set via POST to
+ `/identity_providers/{id}/saml_certificate`.
+ """
+
+ scim_config: IdentityProviderSCIMConfigParam
+ """
+ The configuration settings for enabling a System for Cross-Domain Identity
+ Management (SCIM) with the identity provider.
+ """
+
+
+class AccessCloudflareConfig(TypedDict, total=False):
+ """The configuration parameters for the identity provider.
+
+ To view the required parameters for a specific provider, refer to our [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
+ """
+
+ restrict_to_account_members: bool
+ """
+ When enabled, only users who are members of your Cloudflare account can
+ authenticate through this identity provider. When disabled, any user with a
+ Cloudflare account can authenticate, subject to your Access policies.
+ """
+
+
IdentityProviderUpdateParams: TypeAlias = Union[
AzureAD,
AccessCentrify,
@@ -882,4 +937,5 @@ class AccessOnetimepinConfig(TypedDict, total=False):
AccessSAML,
AccessYandex,
AccessOnetimepin,
+ AccessCloudflare,
]
diff --git a/tests/api_resources/addressing/regional_hostnames/test_regions.py b/tests/api_resources/addressing/regional_hostnames/test_regions.py
deleted file mode 100644
index e06d39e8cf3..00000000000
--- a/tests/api_resources/addressing/regional_hostnames/test_regions.py
+++ /dev/null
@@ -1,101 +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.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.addressing.regional_hostnames import RegionListResponse
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestRegions:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_list(self, client: Cloudflare) -> None:
- region = client.addressing.regional_hostnames.regions.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(SyncSinglePage[RegionListResponse], region, path=["response"])
-
- @parametrize
- def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.regions.with_raw_response.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- region = response.parse()
- assert_matches_type(SyncSinglePage[RegionListResponse], region, path=["response"])
-
- @parametrize
- def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.regions.with_streaming_response.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- region = response.parse()
- assert_matches_type(SyncSinglePage[RegionListResponse], region, 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.addressing.regional_hostnames.regions.with_raw_response.list(
- account_id="",
- )
-
-
-class TestAsyncRegions:
- 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:
- region = await async_client.addressing.regional_hostnames.regions.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(AsyncSinglePage[RegionListResponse], region, path=["response"])
-
- @parametrize
- async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.regions.with_raw_response.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- region = await response.parse()
- assert_matches_type(AsyncSinglePage[RegionListResponse], region, path=["response"])
-
- @parametrize
- async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.regions.with_streaming_response.list(
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- region = await response.parse()
- assert_matches_type(AsyncSinglePage[RegionListResponse], region, 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.addressing.regional_hostnames.regions.with_raw_response.list(
- account_id="",
- )
diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py
deleted file mode 100644
index 6f9c356c87a..00000000000
--- a/tests/api_resources/addressing/test_regional_hostnames.py
+++ /dev/null
@@ -1,517 +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, 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.addressing import (
- RegionalHostnameGetResponse,
- RegionalHostnameEditResponse,
- RegionalHostnameListResponse,
- RegionalHostnameCreateResponse,
- RegionalHostnameDeleteResponse,
-)
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestRegionalHostnames:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_create(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- )
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- routing="dns",
- )
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.with_raw_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.with_streaming_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.create(
- zone_id="",
- hostname="foo.example.com",
- region_key="ca",
- )
-
- @parametrize
- def test_method_list(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(SyncSinglePage[RegionalHostnameListResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = response.parse()
- assert_matches_type(SyncSinglePage[RegionalHostnameListResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = response.parse()
- assert_matches_type(SyncSinglePage[RegionalHostnameListResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.list(
- zone_id="",
- )
-
- @parametrize
- def test_method_delete(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"])
-
- @parametrize
- def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.with_raw_response.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = response.parse()
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"])
-
- @parametrize
- def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.with_streaming_response.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = response.parse()
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, 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.addressing.regional_hostnames.with_raw_response.delete(
- hostname="foo.example.com",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- client.addressing.regional_hostnames.with_raw_response.delete(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- @parametrize
- def test_method_edit(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.with_raw_response.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.with_streaming_response.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.edit(
- hostname="foo.example.com",
- zone_id="",
- region_key="ca",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- client.addressing.regional_hostnames.with_raw_response.edit(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
-
- @parametrize
- def test_method_get(self, client: Cloudflare) -> None:
- regional_hostname = client.addressing.regional_hostnames.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.addressing.regional_hostnames.with_raw_response.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"])
-
- @parametrize
- def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.addressing.regional_hostnames.with_streaming_response.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = response.parse()
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.get(
- hostname="foo.example.com",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- client.addressing.regional_hostnames.with_raw_response.get(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
-
-class TestAsyncRegionalHostnames:
- 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:
- regional_hostname = await async_client.addressing.regional_hostnames.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- )
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- regional_hostname = await async_client.addressing.regional_hostnames.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- routing="dns",
- )
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.with_raw_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.with_streaming_response.create(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hostname="foo.example.com",
- region_key="ca",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameCreateResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.create(
- zone_id="",
- hostname="foo.example.com",
- region_key="ca",
- )
-
- @parametrize
- async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- regional_hostname = await async_client.addressing.regional_hostnames.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(AsyncSinglePage[RegionalHostnameListResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.with_raw_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = await response.parse()
- assert_matches_type(AsyncSinglePage[RegionalHostnameListResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.with_streaming_response.list(
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = await response.parse()
- assert_matches_type(AsyncSinglePage[RegionalHostnameListResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.list(
- zone_id="",
- )
-
- @parametrize
- async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- regional_hostname = await async_client.addressing.regional_hostnames.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"])
-
- @parametrize
- async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.with_raw_response.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = await response.parse()
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"])
-
- @parametrize
- async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.with_streaming_response.delete(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = await response.parse()
- assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, 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.addressing.regional_hostnames.with_raw_response.delete(
- hostname="foo.example.com",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- await async_client.addressing.regional_hostnames.with_raw_response.delete(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- @parametrize
- async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- regional_hostname = await async_client.addressing.regional_hostnames.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.with_raw_response.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.with_streaming_response.edit(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameEditResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.edit(
- hostname="foo.example.com",
- zone_id="",
- region_key="ca",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- await async_client.addressing.regional_hostnames.with_raw_response.edit(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- region_key="ca",
- )
-
- @parametrize
- async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- regional_hostname = await async_client.addressing.regional_hostnames.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.addressing.regional_hostnames.with_raw_response.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"])
-
- @parametrize
- async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.addressing.regional_hostnames.with_streaming_response.get(
- hostname="foo.example.com",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- regional_hostname = await response.parse()
- assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, 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.addressing.regional_hostnames.with_raw_response.get(
- hostname="foo.example.com",
- zone_id="",
- )
-
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"):
- await async_client.addressing.regional_hostnames.with_raw_response.get(
- hostname="",
- zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- )
diff --git a/tests/api_resources/billing/test_usage.py b/tests/api_resources/billing/test_usage.py
index 70d56fd6427..23c30190b53 100644
--- a/tests/api_resources/billing/test_usage.py
+++ b/tests/api_resources/billing/test_usage.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare._utils import parse_date
-from cloudflare.types.billing import UsagePaygoResponse
+from cloudflare.types.billing import UsageGetResponse, UsagePaygoResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -18,6 +18,54 @@
class TestUsage:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ usage = client.billing.usage.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ usage = client.billing.usage.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ from_=parse_date("2025-05-01"),
+ metric="workers_standard_requests",
+ to=parse_date("2025-05-31"),
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.billing.usage.with_raw_response.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ usage = response.parse()
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.billing.usage.with_streaming_response.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ usage = response.parse()
+ assert_matches_type(UsageGetResponse, usage, 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.billing.usage.with_raw_response.get(
+ account_id="",
+ )
+
@parametrize
def test_method_paygo(self, client: Cloudflare) -> None:
usage = client.billing.usage.paygo(
@@ -29,8 +77,8 @@ def test_method_paygo(self, client: Cloudflare) -> None:
def test_method_paygo_with_all_params(self, client: Cloudflare) -> None:
usage = client.billing.usage.paygo(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- from_=parse_date("2025-02-01"),
- to=parse_date("2025-03-01"),
+ from_=parse_date("2025-05-01"),
+ to=parse_date("2025-05-31"),
)
assert_matches_type(UsagePaygoResponse, usage, path=["response"])
@@ -71,6 +119,54 @@ class TestAsyncUsage:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ usage = await async_client.billing.usage.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ usage = await async_client.billing.usage.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ from_=parse_date("2025-05-01"),
+ metric="workers_standard_requests",
+ to=parse_date("2025-05-31"),
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.billing.usage.with_raw_response.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ usage = await response.parse()
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.billing.usage.with_streaming_response.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ usage = await response.parse()
+ assert_matches_type(UsageGetResponse, usage, 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.billing.usage.with_raw_response.get(
+ account_id="",
+ )
+
@parametrize
async def test_method_paygo(self, async_client: AsyncCloudflare) -> None:
usage = await async_client.billing.usage.paygo(
@@ -82,8 +178,8 @@ async def test_method_paygo(self, async_client: AsyncCloudflare) -> None:
async def test_method_paygo_with_all_params(self, async_client: AsyncCloudflare) -> None:
usage = await async_client.billing.usage.paygo(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- from_=parse_date("2025-02-01"),
- to=parse_date("2025-03-01"),
+ from_=parse_date("2025-05-01"),
+ to=parse_date("2025-05-31"),
)
assert_matches_type(UsagePaygoResponse, usage, path=["response"])
diff --git a/tests/api_resources/addressing/regional_hostnames/__init__.py b/tests/api_resources/dls/__init__.py
similarity index 100%
rename from tests/api_resources/addressing/regional_hostnames/__init__.py
rename to tests/api_resources/dls/__init__.py
diff --git a/tests/api_resources/dls/regional_services/__init__.py b/tests/api_resources/dls/regional_services/__init__.py
new file mode 100644
index 00000000000..fd8019a9a1a
--- /dev/null
+++ b/tests/api_resources/dls/regional_services/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/dls/regional_services/test_prefix_bindings.py b/tests/api_resources/dls/regional_services/test_prefix_bindings.py
new file mode 100644
index 00000000000..c6cc27cecce
--- /dev/null
+++ b/tests/api_resources/dls/regional_services/test_prefix_bindings.py
@@ -0,0 +1,451 @@
+# 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.pagination import SyncCursorPagination, AsyncCursorPagination
+from cloudflare.types.dls.regional_services import (
+ PrefixBindingGetResponse,
+ PrefixBindingEditResponse,
+ PrefixBindingListResponse,
+ PrefixBindingCreateResponse,
+ PrefixBindingDeleteResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestPrefixBindings:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ )
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.dls.regional_services.prefix_bindings.with_raw_response.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.dls.regional_services.prefix_bindings.with_streaming_response.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.list(
+ account_id=0,
+ )
+ assert_matches_type(SyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.list(
+ account_id=0,
+ cursor="cursor",
+ per_page=1,
+ )
+ assert_matches_type(SyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.dls.regional_services.prefix_bindings.with_raw_response.list(
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = response.parse()
+ assert_matches_type(SyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.dls.regional_services.prefix_bindings.with_streaming_response.list(
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = response.parse()
+ assert_matches_type(SyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_delete(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.dls.regional_services.prefix_bindings.with_raw_response.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.dls.regional_services.prefix_bindings.with_streaming_response.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, 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 `binding_id` but received ''"):
+ client.dls.regional_services.prefix_bindings.with_raw_response.delete(
+ binding_id="",
+ account_id=0,
+ )
+
+ @parametrize
+ def test_method_edit(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ )
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_raw_response_edit(self, client: Cloudflare) -> None:
+ response = client.dls.regional_services.prefix_bindings.with_raw_response.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_streaming_response_edit(self, client: Cloudflare) -> None:
+ with client.dls.regional_services.prefix_bindings.with_streaming_response.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, 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 `binding_id` but received ''"):
+ client.dls.regional_services.prefix_bindings.with_raw_response.edit(
+ binding_id="",
+ account_id=0,
+ region_key="eu",
+ )
+
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ prefix_binding = client.dls.regional_services.prefix_bindings.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.dls.regional_services.prefix_bindings.with_raw_response.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.dls.regional_services.prefix_bindings.with_streaming_response.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = response.parse()
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, 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 `binding_id` but received ''"):
+ client.dls.regional_services.prefix_bindings.with_raw_response.get(
+ binding_id="",
+ account_id=0,
+ )
+
+
+class TestAsyncPrefixBindings:
+ 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:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ )
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regional_services.prefix_bindings.with_raw_response.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regional_services.prefix_bindings.with_streaming_response.create(
+ account_id=0,
+ cidr="10.0.1.0/24",
+ prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ region_key="eu",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingCreateResponse, prefix_binding, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.list(
+ account_id=0,
+ )
+ assert_matches_type(AsyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.list(
+ account_id=0,
+ cursor="cursor",
+ per_page=1,
+ )
+ assert_matches_type(AsyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regional_services.prefix_bindings.with_raw_response.list(
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = await response.parse()
+ assert_matches_type(AsyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regional_services.prefix_bindings.with_streaming_response.list(
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = await response.parse()
+ assert_matches_type(AsyncCursorPagination[PrefixBindingListResponse], prefix_binding, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regional_services.prefix_bindings.with_raw_response.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regional_services.prefix_bindings.with_streaming_response.delete(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingDeleteResponse, prefix_binding, 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 `binding_id` but received ''"):
+ await async_client.dls.regional_services.prefix_bindings.with_raw_response.delete(
+ binding_id="",
+ account_id=0,
+ )
+
+ @parametrize
+ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ )
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regional_services.prefix_bindings.with_raw_response.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regional_services.prefix_bindings.with_streaming_response.edit(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ region_key="eu",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingEditResponse, prefix_binding, 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 `binding_id` but received ''"):
+ await async_client.dls.regional_services.prefix_bindings.with_raw_response.edit(
+ binding_id="",
+ account_id=0,
+ region_key="eu",
+ )
+
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ prefix_binding = await async_client.dls.regional_services.prefix_bindings.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regional_services.prefix_bindings.with_raw_response.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regional_services.prefix_bindings.with_streaming_response.get(
+ binding_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ prefix_binding = await response.parse()
+ assert_matches_type(PrefixBindingGetResponse, prefix_binding, 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 `binding_id` but received ''"):
+ await async_client.dls.regional_services.prefix_bindings.with_raw_response.get(
+ binding_id="",
+ account_id=0,
+ )
diff --git a/tests/api_resources/dls/test_regions.py b/tests/api_resources/dls/test_regions.py
new file mode 100644
index 00000000000..bfa3a8e6ef5
--- /dev/null
+++ b/tests/api_resources/dls/test_regions.py
@@ -0,0 +1,191 @@
+# 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.dls import RegionGetResponse, RegionListResponse
+from cloudflare.pagination import SyncCursorPagination, AsyncCursorPagination
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestRegions:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ region = client.dls.regions.list(
+ account_id=0,
+ )
+ assert_matches_type(SyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ region = client.dls.regions.list(
+ account_id=0,
+ cursor="cursor",
+ per_page=1,
+ type="managed",
+ )
+ assert_matches_type(SyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.dls.regions.with_raw_response.list(
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ region = response.parse()
+ assert_matches_type(SyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.dls.regions.with_streaming_response.list(
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ region = response.parse()
+ assert_matches_type(SyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ region = client.dls.regions.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(RegionGetResponse, region, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.dls.regions.with_raw_response.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ region = response.parse()
+ assert_matches_type(RegionGetResponse, region, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.dls.regions.with_streaming_response.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ region = response.parse()
+ assert_matches_type(RegionGetResponse, region, 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 `region_id` but received ''"):
+ client.dls.regions.with_raw_response.get(
+ region_id="",
+ account_id=0,
+ )
+
+
+class TestAsyncRegions:
+ 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:
+ region = await async_client.dls.regions.list(
+ account_id=0,
+ )
+ assert_matches_type(AsyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ region = await async_client.dls.regions.list(
+ account_id=0,
+ cursor="cursor",
+ per_page=1,
+ type="managed",
+ )
+ assert_matches_type(AsyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regions.with_raw_response.list(
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ region = await response.parse()
+ assert_matches_type(AsyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regions.with_streaming_response.list(
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ region = await response.parse()
+ assert_matches_type(AsyncCursorPagination[RegionListResponse], region, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ region = await async_client.dls.regions.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+ assert_matches_type(RegionGetResponse, region, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.dls.regions.with_raw_response.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ region = await response.parse()
+ assert_matches_type(RegionGetResponse, region, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.dls.regions.with_streaming_response.get(
+ region_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
+ account_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ region = await response.parse()
+ assert_matches_type(RegionGetResponse, region, 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 `region_id` but received ''"):
+ await async_client.dls.regions.with_raw_response.get(
+ region_id="",
+ account_id=0,
+ )
diff --git a/tests/api_resources/email_security/test_investigate.py b/tests/api_resources/email_security/test_investigate.py
index 127d0f0f75a..c0b05f42966 100644
--- a/tests/api_resources/email_security/test_investigate.py
+++ b/tests/api_resources/email_security/test_investigate.py
@@ -33,7 +33,6 @@ def test_method_list(self, client: Cloudflare) -> None:
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
investigate = client.email_security.investigate.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- action_log=True,
alert_id="alert_id",
cursor="cursor",
delivery_status="delivered",
@@ -159,7 +158,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
investigate = await async_client.email_security.investigate.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- action_log=True,
alert_id="alert_id",
cursor="cursor",
delivery_status="delivered",
diff --git a/tests/api_resources/organizations/billing/__init__.py b/tests/api_resources/organizations/billing/__init__.py
new file mode 100644
index 00000000000..fd8019a9a1a
--- /dev/null
+++ b/tests/api_resources/organizations/billing/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/organizations/billing/test_usage.py b/tests/api_resources/organizations/billing/test_usage.py
new file mode 100644
index 00000000000..24fbddeb340
--- /dev/null
+++ b/tests/api_resources/organizations/billing/test_usage.py
@@ -0,0 +1,121 @@
+# 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_date
+from cloudflare.types.organizations.billing import UsageGetResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestUsage:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ usage = client.organizations.billing.usage.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ usage = client.organizations.billing.usage.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ from_=parse_date("2025-05-01"),
+ metric="workers_standard_requests",
+ to=parse_date("2025-05-31"),
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.organizations.billing.usage.with_raw_response.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ usage = response.parse()
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.organizations.billing.usage.with_streaming_response.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ usage = response.parse()
+ assert_matches_type(UsageGetResponse, usage, 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 `organization_id` but received ''"):
+ client.organizations.billing.usage.with_raw_response.get(
+ organization_id="",
+ )
+
+
+class TestAsyncUsage:
+ 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:
+ usage = await async_client.organizations.billing.usage.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ usage = await async_client.organizations.billing.usage.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ from_=parse_date("2025-05-01"),
+ metric="workers_standard_requests",
+ to=parse_date("2025-05-31"),
+ )
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.organizations.billing.usage.with_raw_response.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ usage = await response.parse()
+ assert_matches_type(UsageGetResponse, usage, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.organizations.billing.usage.with_streaming_response.get(
+ organization_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ usage = await response.parse()
+ assert_matches_type(UsageGetResponse, usage, 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 `organization_id` but received ''"):
+ await async_client.organizations.billing.usage.with_raw_response.get(
+ organization_id="",
+ )
diff --git a/tests/api_resources/organizations/logs/test_audit.py b/tests/api_resources/organizations/logs/test_audit.py
index 44322e0a484..9d37c73f240 100644
--- a/tests/api_resources/organizations/logs/test_audit.py
+++ b/tests/api_resources/organizations/logs/test_audit.py
@@ -19,7 +19,7 @@
class TestAudit:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
audit = client.organizations.logs.audit.list(
@@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
audit = client.organizations.logs.audit.list(
@@ -60,7 +60,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
response = client.organizations.logs.audit.with_raw_response.list(
@@ -74,7 +74,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
audit = response.parse()
assert_matches_type(SyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
with client.organizations.logs.audit.with_streaming_response.list(
@@ -90,7 +90,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"):
@@ -106,7 +106,7 @@ class TestAsyncAudit:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
audit = await async_client.organizations.logs.audit.list(
@@ -116,7 +116,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(AsyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
audit = await async_client.organizations.logs.audit.list(
@@ -147,7 +147,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
)
assert_matches_type(AsyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
response = await async_client.organizations.logs.audit.with_raw_response.list(
@@ -161,7 +161,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
audit = await response.parse()
assert_matches_type(AsyncCursorPaginationAfter[AuditListResponse], audit, path=["response"])
- @pytest.mark.skip(reason="TODO: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
async with async_client.organizations.logs.audit.with_streaming_response.list(
@@ -177,7 +177,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: required params 'since' and 'before' not populated by Prism mock")
+ @pytest.mark.skip(reason="TODO DS-16345: required params 'since' and 'before' not populated by Prism mock")
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"):
diff --git a/tests/api_resources/radar/test_http.py b/tests/api_resources/radar/test_http.py
index 44621bfb621..c9bd5dad192 100644
--- a/tests/api_resources/radar/test_http.py
+++ b/tests/api_resources/radar/test_http.py
@@ -36,6 +36,7 @@ def test_method_summary_v2_with_all_params(self, client: Cloudflare) -> None:
api_traffic=["API"],
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
@@ -91,6 +92,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
browser_family=["CHROME"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
@@ -144,6 +146,7 @@ def test_method_timeseries_groups_v2_with_all_params(self, client: Cloudflare) -
api_traffic=["API"],
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
@@ -207,6 +210,7 @@ async def test_method_summary_v2_with_all_params(self, async_client: AsyncCloudf
api_traffic=["API"],
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
@@ -262,6 +266,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
browser_family=["CHROME"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
@@ -315,6 +320,7 @@ async def test_method_timeseries_groups_v2_with_all_params(self, async_client: A
api_traffic=["API"],
asn=["string"],
bot_class=["LIKELY_AUTOMATED"],
+ content_type=["HTML"],
continent=["string"],
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
date_range=["7d"],
diff --git a/tests/api_resources/realtime_kit/test_apps.py b/tests/api_resources/realtime_kit/test_apps.py
index b9cdf522f05..eb8b0bc15dc 100644
--- a/tests/api_resources/realtime_kit/test_apps.py
+++ b/tests/api_resources/realtime_kit/test_apps.py
@@ -25,6 +25,18 @@ def test_method_get(self, client: Cloudflare) -> None:
)
assert_matches_type(AppGetResponse, app, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
+ app = client.realtime_kit.apps.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page_no=1,
+ per_page=1,
+ search="search",
+ sort_order="ASC",
+ )
+ assert_matches_type(AppGetResponse, app, path=["response"])
+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -63,8 +75,8 @@ def test_path_params_get(self, client: Cloudflare) -> None:
@parametrize
def test_method_post(self, client: Cloudflare) -> None:
app = client.realtime_kit.apps.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
)
assert_matches_type(AppPostResponse, app, path=["response"])
@@ -72,8 +84,8 @@ def test_method_post(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_post(self, client: Cloudflare) -> None:
response = client.realtime_kit.apps.with_raw_response.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
)
assert response.is_closed is True
@@ -85,8 +97,8 @@ def test_raw_response_post(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_post(self, client: Cloudflare) -> None:
with client.realtime_kit.apps.with_streaming_response.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -102,7 +114,7 @@ def test_path_params_post(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.apps.with_raw_response.post(
account_id="",
- name="name",
+ name="x",
)
@@ -119,6 +131,18 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(AppGetResponse, app, path=["response"])
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ app = await async_client.realtime_kit.apps.get(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ page_no=1,
+ per_page=1,
+ search="search",
+ sort_order="ASC",
+ )
+ assert_matches_type(AppGetResponse, app, path=["response"])
+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -157,8 +181,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_post(self, async_client: AsyncCloudflare) -> None:
app = await async_client.realtime_kit.apps.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
)
assert_matches_type(AppPostResponse, app, path=["response"])
@@ -166,8 +190,8 @@ async def test_method_post(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_raw_response_post(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.apps.with_raw_response.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
)
assert response.is_closed is True
@@ -179,8 +203,8 @@ async def test_raw_response_post(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_post(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.apps.with_streaming_response.post(
- account_id="account_id",
- name="name",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -196,5 +220,5 @@ async def test_path_params_post(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.apps.with_raw_response.post(
account_id="",
- name="name",
+ name="x",
)
diff --git a/tests/api_resources/realtime_kit/test_livestreams.py b/tests/api_resources/realtime_kit/test_livestreams.py
index aa6ad20d78f..e60e9d59164 100644
--- a/tests/api_resources/realtime_kit/test_livestreams.py
+++ b/tests/api_resources/realtime_kit/test_livestreams.py
@@ -17,6 +17,7 @@
LivestreamStartLivestreamingAMeetingResponse,
LivestreamCreateIndependentLivestreamResponse,
LivestreamGetMeetingActiveLivestreamsResponse,
+ LivestreamGetLivestreamAnalyticsDaywiseResponse,
LivestreamGetLivestreamAnalyticsCompleteResponse,
LivestreamGetActiveLivestreamsForLivestreamIDResponse,
LivestreamGetLivestreamSessionForLivestreamIDResponse,
@@ -238,8 +239,9 @@ def test_method_get_livestream_analytics_complete_with_all_params(self, client:
livestream = client.realtime_kit.livestreams.get_livestream_analytics_complete(
app_id="app_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- end_time=parse_datetime("2019-12-27T18:11:19.117Z"),
- start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ end_time=0,
+ filters="filters",
+ start_time=0,
)
assert_matches_type(LivestreamGetLivestreamAnalyticsCompleteResponse, livestream, path=["response"])
@@ -286,6 +288,70 @@ def test_path_params_get_livestream_analytics_complete(self, client: Cloudflare)
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_method_get_livestream_analytics_daywise(self, client: Cloudflare) -> None:
+ livestream = client.realtime_kit.livestreams.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_method_get_livestream_analytics_daywise_with_all_params(self, client: Cloudflare) -> None:
+ livestream = client.realtime_kit.livestreams.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ end_time=0,
+ filters="filters",
+ start_time=0,
+ )
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_raw_response_get_livestream_analytics_daywise(self, client: Cloudflare) -> None:
+ response = client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ livestream = response.parse()
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_streaming_response_get_livestream_analytics_daywise(self, client: Cloudflare) -> None:
+ with client.realtime_kit.livestreams.with_streaming_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ livestream = response.parse()
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ def test_path_params_get_livestream_analytics_daywise(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
+ client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
def test_method_get_livestream_session_details_for_session_id(self, client: Cloudflare) -> None:
@@ -921,8 +987,9 @@ async def test_method_get_livestream_analytics_complete_with_all_params(
livestream = await async_client.realtime_kit.livestreams.get_livestream_analytics_complete(
app_id="app_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- end_time=parse_datetime("2019-12-27T18:11:19.117Z"),
- start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ end_time=0,
+ filters="filters",
+ start_time=0,
)
assert_matches_type(LivestreamGetLivestreamAnalyticsCompleteResponse, livestream, path=["response"])
@@ -969,6 +1036,70 @@ async def test_path_params_get_livestream_analytics_complete(self, async_client:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_method_get_livestream_analytics_daywise(self, async_client: AsyncCloudflare) -> None:
+ livestream = await async_client.realtime_kit.livestreams.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_method_get_livestream_analytics_daywise_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ livestream = await async_client.realtime_kit.livestreams.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ end_time=0,
+ filters="filters",
+ start_time=0,
+ )
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_raw_response_get_livestream_analytics_daywise(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ livestream = await response.parse()
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_streaming_response_get_livestream_analytics_daywise(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.realtime_kit.livestreams.with_streaming_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ livestream = await response.parse()
+ assert_matches_type(LivestreamGetLivestreamAnalyticsDaywiseResponse, livestream, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
+ @parametrize
+ async def test_path_params_get_livestream_analytics_daywise(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
+ await async_client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="app_id",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
+ await async_client.realtime_kit.livestreams.with_raw_response.get_livestream_analytics_daywise(
+ app_id="",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ )
+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
async def test_method_get_livestream_session_details_for_session_id(self, async_client: AsyncCloudflare) -> None:
diff --git a/tests/api_resources/realtime_kit/test_meetings.py b/tests/api_resources/realtime_kit/test_meetings.py
index 75e1393a93d..b03cc327d2c 100644
--- a/tests/api_resources/realtime_kit/test_meetings.py
+++ b/tests/api_resources/realtime_kit/test_meetings.py
@@ -102,6 +102,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
session_keep_alive_time_in_secs=60,
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingCreateResponse, meeting, path=["response"])
@@ -428,6 +429,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
per_page=0,
search="search",
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="ACTIVE",
)
assert_matches_type(MeetingGetResponse, meeting, path=["response"])
@@ -855,6 +857,7 @@ def test_method_replace_meeting_by_id_with_all_params(self, client: Cloudflare)
session_keep_alive_time_in_secs=60,
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingReplaceMeetingByIDResponse, meeting, path=["response"])
@@ -944,10 +947,50 @@ def test_method_update_meeting_by_id_with_all_params(self, client: Cloudflare) -
live_stream_on_start=True,
persist_chat=True,
record_on_start=True,
+ recording_config={
+ "audio_config": {
+ "channel": "mono",
+ "codec": "MP3",
+ "export_file": True,
+ },
+ "file_name_prefix": "file_name_prefix",
+ "live_streaming_config": {"rtmp_url": "rtmp://a.rtmp.youtube.com/live2"},
+ "max_seconds": 60,
+ "realtimekit_bucket_config": {"enabled": True},
+ "storage_config": {
+ "type": "aws",
+ "access_key": "access_key",
+ "auth_method": "KEY",
+ "bucket": "bucket",
+ "host": "host",
+ "password": "password",
+ "path": "path",
+ "port": 0,
+ "private_key": "private_key",
+ "region": "us-east-1",
+ "secret": "secret",
+ "username": "username",
+ },
+ "video_config": {
+ "codec": "H264",
+ "export_file": True,
+ "height": 720,
+ "watermark": {
+ "position": "left top",
+ "size": {
+ "height": 1,
+ "width": 1,
+ },
+ "url": "https://example.com",
+ },
+ "width": 1280,
+ },
+ },
session_keep_alive_time_in_secs=60,
status="INACTIVE",
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingUpdateMeetingByIDResponse, meeting, path=["response"])
@@ -1083,6 +1126,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
session_keep_alive_time_in_secs=60,
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingCreateResponse, meeting, path=["response"])
@@ -1409,6 +1453,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
per_page=0,
search="search",
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="ACTIVE",
)
assert_matches_type(MeetingGetResponse, meeting, path=["response"])
@@ -1836,6 +1881,7 @@ async def test_method_replace_meeting_by_id_with_all_params(self, async_client:
session_keep_alive_time_in_secs=60,
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingReplaceMeetingByIDResponse, meeting, path=["response"])
@@ -1925,10 +1971,50 @@ async def test_method_update_meeting_by_id_with_all_params(self, async_client: A
live_stream_on_start=True,
persist_chat=True,
record_on_start=True,
+ recording_config={
+ "audio_config": {
+ "channel": "mono",
+ "codec": "MP3",
+ "export_file": True,
+ },
+ "file_name_prefix": "file_name_prefix",
+ "live_streaming_config": {"rtmp_url": "rtmp://a.rtmp.youtube.com/live2"},
+ "max_seconds": 60,
+ "realtimekit_bucket_config": {"enabled": True},
+ "storage_config": {
+ "type": "aws",
+ "access_key": "access_key",
+ "auth_method": "KEY",
+ "bucket": "bucket",
+ "host": "host",
+ "password": "password",
+ "path": "path",
+ "port": 0,
+ "private_key": "private_key",
+ "region": "us-east-1",
+ "secret": "secret",
+ "username": "username",
+ },
+ "video_config": {
+ "codec": "H264",
+ "export_file": True,
+ "height": 720,
+ "watermark": {
+ "position": "left top",
+ "size": {
+ "height": 1,
+ "width": 1,
+ },
+ "url": "https://example.com",
+ },
+ "width": 1280,
+ },
+ },
session_keep_alive_time_in_secs=60,
status="INACTIVE",
summarize_on_end=True,
title="title",
+ transcribe_on_end=True,
)
assert_matches_type(MeetingUpdateMeetingByIDResponse, meeting, path=["response"])
diff --git a/tests/api_resources/realtime_kit/test_sessions.py b/tests/api_resources/realtime_kit/test_sessions.py
index a6f3998237c..d914e59e203 100644
--- a/tests/api_resources/realtime_kit/test_sessions.py
+++ b/tests/api_resources/realtime_kit/test_sessions.py
@@ -31,7 +31,7 @@ class TestSessions:
@parametrize
def test_method_generate_summary_of_transcripts(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -41,7 +41,7 @@ def test_method_generate_summary_of_transcripts(self, client: Cloudflare) -> Non
@parametrize
def test_raw_response_generate_summary_of_transcripts(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -55,7 +55,7 @@ def test_raw_response_generate_summary_of_transcripts(self, client: Cloudflare)
@parametrize
def test_streaming_response_generate_summary_of_transcripts(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -72,14 +72,14 @@ def test_streaming_response_generate_summary_of_transcripts(self, client: Cloudf
def test_path_params_generate_summary_of_transcripts(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -95,7 +95,7 @@ def test_path_params_generate_summary_of_transcripts(self, client: Cloudflare) -
@parametrize
def test_method_get_participant_data_from_peer_id(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -105,7 +105,7 @@ def test_method_get_participant_data_from_peer_id(self, client: Cloudflare) -> N
@parametrize
def test_method_get_participant_data_from_peer_id_with_all_params(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
filters="device_info",
@@ -116,7 +116,7 @@ def test_method_get_participant_data_from_peer_id_with_all_params(self, client:
@parametrize
def test_raw_response_get_participant_data_from_peer_id(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -130,7 +130,7 @@ def test_raw_response_get_participant_data_from_peer_id(self, client: Cloudflare
@parametrize
def test_streaming_response_get_participant_data_from_peer_id(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -147,14 +147,14 @@ def test_streaming_response_get_participant_data_from_peer_id(self, client: Clou
def test_path_params_get_participant_data_from_peer_id(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -170,7 +170,7 @@ def test_path_params_get_participant_data_from_peer_id(self, client: Cloudflare)
@parametrize
def test_method_get_session_chat(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -180,7 +180,7 @@ def test_method_get_session_chat(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_get_session_chat(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -194,7 +194,7 @@ def test_raw_response_get_session_chat(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get_session_chat(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -211,14 +211,14 @@ def test_streaming_response_get_session_chat(self, client: Cloudflare) -> None:
def test_path_params_get_session_chat(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -234,7 +234,7 @@ def test_path_params_get_session_chat(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_details(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -244,7 +244,7 @@ def test_method_get_session_details(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_details_with_all_params(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
include_breakout_rooms=True,
@@ -255,7 +255,7 @@ def test_method_get_session_details_with_all_params(self, client: Cloudflare) ->
@parametrize
def test_raw_response_get_session_details(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -269,7 +269,7 @@ def test_raw_response_get_session_details(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get_session_details(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -286,14 +286,14 @@ def test_streaming_response_get_session_details(self, client: Cloudflare) -> Non
def test_path_params_get_session_details(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -309,10 +309,10 @@ def test_path_params_get_session_details(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_participant_details(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(SessionGetSessionParticipantDetailsResponse, session, path=["response"])
@@ -320,10 +320,10 @@ def test_method_get_session_participant_details(self, client: Cloudflare) -> Non
@parametrize
def test_method_get_session_participant_details_with_all_params(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
filters="device_info",
include_peer_events=True,
)
@@ -333,10 +333,10 @@ def test_method_get_session_participant_details_with_all_params(self, client: Cl
@parametrize
def test_raw_response_get_session_participant_details(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert response.is_closed is True
@@ -348,10 +348,10 @@ def test_raw_response_get_session_participant_details(self, client: Cloudflare)
@parametrize
def test_streaming_response_get_session_participant_details(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -366,23 +366,23 @@ def test_streaming_response_get_session_participant_details(self, client: Cloudf
def test_path_params_get_session_participant_details(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `session_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
session_id="",
@@ -393,14 +393,14 @@ def test_path_params_get_session_participant_details(self, client: Cloudflare) -
participant_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
def test_method_get_session_participants(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -410,7 +410,7 @@ def test_method_get_session_participants(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_participants_with_all_params(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
include_peer_events=True,
@@ -427,7 +427,7 @@ def test_method_get_session_participants_with_all_params(self, client: Cloudflar
@parametrize
def test_raw_response_get_session_participants(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -441,7 +441,7 @@ def test_raw_response_get_session_participants(self, client: Cloudflare) -> None
@parametrize
def test_streaming_response_get_session_participants(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -458,14 +458,14 @@ def test_streaming_response_get_session_participants(self, client: Cloudflare) -
def test_path_params_get_session_participants(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -481,7 +481,7 @@ def test_path_params_get_session_participants(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_summary(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -491,7 +491,7 @@ def test_method_get_session_summary(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_get_session_summary(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -505,7 +505,7 @@ def test_raw_response_get_session_summary(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get_session_summary(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -522,14 +522,14 @@ def test_streaming_response_get_session_summary(self, client: Cloudflare) -> Non
def test_path_params_get_session_summary(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -545,7 +545,7 @@ def test_path_params_get_session_summary(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_session_transcripts(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -555,7 +555,7 @@ def test_method_get_session_transcripts(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_get_session_transcripts(self, client: Cloudflare) -> None:
response = client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -569,7 +569,7 @@ def test_raw_response_get_session_transcripts(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get_session_transcripts(self, client: Cloudflare) -> None:
with client.realtime_kit.sessions.with_streaming_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -586,14 +586,14 @@ def test_streaming_response_get_session_transcripts(self, client: Cloudflare) ->
def test_path_params_get_session_transcripts(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -620,7 +620,7 @@ def test_method_get_sessions_with_all_params(self, client: Cloudflare) -> None:
session = client.realtime_kit.sessions.get_sessions(
app_id="app_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- associated_id="associated_id",
+ associated_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_time=parse_datetime("2019-12-27T18:11:19.117Z"),
page_no=0,
participants="1:10",
@@ -686,7 +686,7 @@ class TestAsyncSessions:
@parametrize
async def test_method_generate_summary_of_transcripts(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -696,7 +696,7 @@ async def test_method_generate_summary_of_transcripts(self, async_client: AsyncC
@parametrize
async def test_raw_response_generate_summary_of_transcripts(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -710,7 +710,7 @@ async def test_raw_response_generate_summary_of_transcripts(self, async_client:
@parametrize
async def test_streaming_response_generate_summary_of_transcripts(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -727,14 +727,14 @@ async def test_streaming_response_generate_summary_of_transcripts(self, async_cl
async def test_path_params_generate_summary_of_transcripts(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.generate_summary_of_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -750,7 +750,7 @@ async def test_path_params_generate_summary_of_transcripts(self, async_client: A
@parametrize
async def test_method_get_participant_data_from_peer_id(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -762,7 +762,7 @@ async def test_method_get_participant_data_from_peer_id_with_all_params(
self, async_client: AsyncCloudflare
) -> None:
session = await async_client.realtime_kit.sessions.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
filters="device_info",
@@ -773,7 +773,7 @@ async def test_method_get_participant_data_from_peer_id_with_all_params(
@parametrize
async def test_raw_response_get_participant_data_from_peer_id(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -787,7 +787,7 @@ async def test_raw_response_get_participant_data_from_peer_id(self, async_client
@parametrize
async def test_streaming_response_get_participant_data_from_peer_id(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -804,14 +804,14 @@ async def test_streaming_response_get_participant_data_from_peer_id(self, async_
async def test_path_params_get_participant_data_from_peer_id(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_participant_data_from_peer_id(
- peer_id="peer_id",
+ peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -827,7 +827,7 @@ async def test_path_params_get_participant_data_from_peer_id(self, async_client:
@parametrize
async def test_method_get_session_chat(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -837,7 +837,7 @@ async def test_method_get_session_chat(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_raw_response_get_session_chat(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -851,7 +851,7 @@ async def test_raw_response_get_session_chat(self, async_client: AsyncCloudflare
@parametrize
async def test_streaming_response_get_session_chat(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -868,14 +868,14 @@ async def test_streaming_response_get_session_chat(self, async_client: AsyncClou
async def test_path_params_get_session_chat(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_chat(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -891,7 +891,7 @@ async def test_path_params_get_session_chat(self, async_client: AsyncCloudflare)
@parametrize
async def test_method_get_session_details(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -901,7 +901,7 @@ async def test_method_get_session_details(self, async_client: AsyncCloudflare) -
@parametrize
async def test_method_get_session_details_with_all_params(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
include_breakout_rooms=True,
@@ -912,7 +912,7 @@ async def test_method_get_session_details_with_all_params(self, async_client: As
@parametrize
async def test_raw_response_get_session_details(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -926,7 +926,7 @@ async def test_raw_response_get_session_details(self, async_client: AsyncCloudfl
@parametrize
async def test_streaming_response_get_session_details(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -943,14 +943,14 @@ async def test_streaming_response_get_session_details(self, async_client: AsyncC
async def test_path_params_get_session_details(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_details(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -966,10 +966,10 @@ async def test_path_params_get_session_details(self, async_client: AsyncCloudfla
@parametrize
async def test_method_get_session_participant_details(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(SessionGetSessionParticipantDetailsResponse, session, path=["response"])
@@ -977,10 +977,10 @@ async def test_method_get_session_participant_details(self, async_client: AsyncC
@parametrize
async def test_method_get_session_participant_details_with_all_params(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
filters="device_info",
include_peer_events=True,
)
@@ -990,10 +990,10 @@ async def test_method_get_session_participant_details_with_all_params(self, asyn
@parametrize
async def test_raw_response_get_session_participant_details(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert response.is_closed is True
@@ -1005,10 +1005,10 @@ async def test_raw_response_get_session_participant_details(self, async_client:
@parametrize
async def test_streaming_response_get_session_participant_details(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1023,23 +1023,23 @@ async def test_streaming_response_get_session_participant_details(self, async_cl
async def test_path_params_get_session_participant_details(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `session_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_participant_details(
- participant_id="participant_id",
+ participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
session_id="",
@@ -1050,14 +1050,14 @@ async def test_path_params_get_session_participant_details(self, async_client: A
participant_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
@pytest.mark.skip(reason="TODO: HTTP 401 from prism, support api tokens")
@parametrize
async def test_method_get_session_participants(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1067,7 +1067,7 @@ async def test_method_get_session_participants(self, async_client: AsyncCloudfla
@parametrize
async def test_method_get_session_participants_with_all_params(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
include_peer_events=True,
@@ -1084,7 +1084,7 @@ async def test_method_get_session_participants_with_all_params(self, async_clien
@parametrize
async def test_raw_response_get_session_participants(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1098,7 +1098,7 @@ async def test_raw_response_get_session_participants(self, async_client: AsyncCl
@parametrize
async def test_streaming_response_get_session_participants(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -1115,14 +1115,14 @@ async def test_streaming_response_get_session_participants(self, async_client: A
async def test_path_params_get_session_participants(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_participants(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -1138,7 +1138,7 @@ async def test_path_params_get_session_participants(self, async_client: AsyncClo
@parametrize
async def test_method_get_session_summary(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1148,7 +1148,7 @@ async def test_method_get_session_summary(self, async_client: AsyncCloudflare) -
@parametrize
async def test_raw_response_get_session_summary(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1162,7 +1162,7 @@ async def test_raw_response_get_session_summary(self, async_client: AsyncCloudfl
@parametrize
async def test_streaming_response_get_session_summary(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -1179,14 +1179,14 @@ async def test_streaming_response_get_session_summary(self, async_client: AsyncC
async def test_path_params_get_session_summary(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_summary(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -1202,7 +1202,7 @@ async def test_path_params_get_session_summary(self, async_client: AsyncCloudfla
@parametrize
async def test_method_get_session_transcripts(self, async_client: AsyncCloudflare) -> None:
session = await async_client.realtime_kit.sessions.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1212,7 +1212,7 @@ async def test_method_get_session_transcripts(self, async_client: AsyncCloudflar
@parametrize
async def test_raw_response_get_session_transcripts(self, async_client: AsyncCloudflare) -> None:
response = await async_client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
)
@@ -1226,7 +1226,7 @@ async def test_raw_response_get_session_transcripts(self, async_client: AsyncClo
@parametrize
async def test_streaming_response_get_session_transcripts(self, async_client: AsyncCloudflare) -> None:
async with async_client.realtime_kit.sessions.with_streaming_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="app_id",
) as response:
@@ -1243,14 +1243,14 @@ async def test_streaming_response_get_session_transcripts(self, async_client: As
async def test_path_params_get_session_transcripts(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="",
app_id="app_id",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"):
await async_client.realtime_kit.sessions.with_raw_response.get_session_transcripts(
- session_id="session_id",
+ session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="",
)
@@ -1277,7 +1277,7 @@ async def test_method_get_sessions_with_all_params(self, async_client: AsyncClou
session = await async_client.realtime_kit.sessions.get_sessions(
app_id="app_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- associated_id="associated_id",
+ associated_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_time=parse_datetime("2019-12-27T18:11:19.117Z"),
page_no=0,
participants="1:10",
diff --git a/tests/api_resources/secrets_store/test_stores.py b/tests/api_resources/secrets_store/test_stores.py
index e6f88e29d67..99bd2bb66a1 100644
--- a/tests/api_resources/secrets_store/test_stores.py
+++ b/tests/api_resources/secrets_store/test_stores.py
@@ -11,6 +11,7 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.secrets_store import (
+ StoreGetResponse,
StoreListResponse,
StoreCreateResponse,
)
@@ -183,6 +184,58 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
account_id="985e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ def test_method_get(self, client: Cloudflare) -> None:
+ store = client.secrets_store.stores.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ def test_raw_response_get(self, client: Cloudflare) -> None:
+ response = client.secrets_store.stores.with_raw_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ store = response.parse()
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ def test_streaming_response_get(self, client: Cloudflare) -> None:
+ with client.secrets_store.stores.with_streaming_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ store = response.parse()
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @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.secrets_store.stores.with_raw_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
+ client.secrets_store.stores.with_raw_response.get(
+ store_id="",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
+
class TestAsyncStores:
parametrize = pytest.mark.parametrize(
@@ -350,3 +403,55 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
store_id="",
account_id="985e105f4ecef8ad9ca31a8372d0c353",
)
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
+ store = await async_client.secrets_store.stores.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.secrets_store.stores.with_raw_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ store = await response.parse()
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.secrets_store.stores.with_streaming_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ store = await response.parse()
+ assert_matches_type(Optional[StoreGetResponse], store, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="SKIP: prism error for 422 Unprocessable Entity")
+ @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.secrets_store.stores.with_raw_response.get(
+ store_id="023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_id` but received ''"):
+ await async_client.secrets_store.stores.with_raw_response.get(
+ store_id="",
+ account_id="985e105f4ecef8ad9ca31a8372d0c353",
+ )
diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py
index 3e29932b05b..bcfccb7aafa 100644
--- a/tests/api_resources/spectrum/test_apps.py
+++ b/tests/api_resources/spectrum/test_apps.py
@@ -61,6 +61,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
origin_port=22,
proxy_protocol="off",
tls="off",
+ virtual_network_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(Optional[AppCreateResponse], app, path=["response"])
@@ -210,6 +211,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
origin_port=22,
proxy_protocol="off",
tls="off",
+ virtual_network_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(Optional[AppUpdateResponse], app, path=["response"])
@@ -538,6 +540,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
origin_port=22,
proxy_protocol="off",
tls="off",
+ virtual_network_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(Optional[AppCreateResponse], app, path=["response"])
@@ -687,6 +690,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
origin_port=22,
proxy_protocol="off",
tls="off",
+ virtual_network_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert_matches_type(Optional[AppUpdateResponse], app, path=["response"])
diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py
index 9b7e3939a74..67422475de0 100644
--- a/tests/api_resources/test_custom_certificates.py
+++ b/tests/api_resources/test_custom_certificates.py
@@ -21,36 +21,37 @@
class TestCustomCertificates:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
custom_certificate = client.custom_certificates.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
custom_certificate = client.custom_certificates.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
bundle_method="ubiquitous",
custom_csr_id="7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
deploy="staging",
geo_restrictions={"label": "us"},
policy="(country: US) or (region: EU)",
+ private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
type="sni_custom",
)
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.custom_certificates.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
assert response.is_closed is True
@@ -58,12 +59,12 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
custom_certificate = response.parse()
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.custom_certificates.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -73,13 +74,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@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.custom_certificates.with_raw_response.create(
zone_id="",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
@parametrize
@@ -299,36 +300,37 @@ class TestAsyncCustomCertificates:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
custom_certificate = await async_client.custom_certificates.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
custom_certificate = await async_client.custom_certificates.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
bundle_method="ubiquitous",
custom_csr_id="7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
deploy="staging",
geo_restrictions={"label": "us"},
policy="(country: US) or (region: EU)",
+ private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
type="sni_custom",
)
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.custom_certificates.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
assert response.is_closed is True
@@ -336,12 +338,12 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
custom_certificate = await response.parse()
assert_matches_type(Optional[CustomCertificate], custom_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.custom_certificates.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -351,13 +353,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 422 error 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 `zone_id` but received ''"):
await async_client.custom_certificates.with_raw_response.create(
zone_id="",
certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n",
- private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n",
)
@parametrize
diff --git a/tests/api_resources/workers/beta/test_workers.py b/tests/api_resources/workers/beta/test_workers.py
index 64ee91aac7e..880ee801c49 100644
--- a/tests/api_resources/workers/beta/test_workers.py
+++ b/tests/api_resources/workers/beta/test_workers.py
@@ -52,6 +52,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
@@ -133,6 +134,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
@@ -324,6 +326,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
@@ -484,6 +487,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
@@ -565,6 +569,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
@@ -756,6 +761,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"enabled": True,
"head_sampling_rate": 1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
subdomain={
diff --git a/tests/api_resources/workers/observability/test_queries.py b/tests/api_resources/workers/observability/test_queries.py
new file mode 100644
index 00000000000..0b35362c9c1
--- /dev/null
+++ b/tests/api_resources/workers/observability/test_queries.py
@@ -0,0 +1,338 @@
+# 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.pagination import SyncSinglePage, AsyncSinglePage
+from cloudflare.types.workers.observability import (
+ QueryListResponse,
+ QueryCreateResponse,
+)
+
+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="HTTP 422 error from prism")
+ @parametrize
+ def test_method_create(self, client: Cloudflare) -> None:
+ query = client.workers.observability.queries.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ query = client.workers.observability.queries.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={
+ "calculations": [
+ {
+ "operator": "uniq",
+ "alias": "alias",
+ "key": "key",
+ "key_type": "string",
+ }
+ ],
+ "datasets": ["string"],
+ "filter_combination": "and",
+ "filters": [
+ {
+ "filter_combination": "and",
+ "filters": [{}],
+ "kind": "group",
+ }
+ ],
+ "group_bys": [
+ {
+ "type": "string",
+ "value": "value",
+ }
+ ],
+ "havings": [
+ {
+ "key": "key",
+ "operation": "eq",
+ "value": 0,
+ }
+ ],
+ "limit": 0,
+ "needle": {
+ "value": "string",
+ "is_regex": True,
+ "match_case": True,
+ },
+ "order_by": {
+ "value": "value",
+ "order": "asc",
+ },
+ },
+ )
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ def test_raw_response_create(self, client: Cloudflare) -> None:
+ response = client.workers.observability.queries.with_raw_response.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = response.parse()
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ def test_streaming_response_create(self, client: Cloudflare) -> None:
+ with client.workers.observability.queries.with_streaming_response.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = response.parse()
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="HTTP 422 error 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.workers.observability.queries.with_raw_response.create(
+ account_id="",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ query = client.workers.observability.queries.list(
+ account_id="account_id",
+ )
+ assert_matches_type(SyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ query = client.workers.observability.queries.list(
+ account_id="account_id",
+ order="asc",
+ order_by="created",
+ page=1,
+ per_page=5,
+ )
+ assert_matches_type(SyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.workers.observability.queries.with_raw_response.list(
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = response.parse()
+ assert_matches_type(SyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.workers.observability.queries.with_streaming_response.list(
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = response.parse()
+ assert_matches_type(SyncSinglePage[QueryListResponse], query, 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.observability.queries.with_raw_response.list(
+ 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="HTTP 422 error from prism")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.workers.observability.queries.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.workers.observability.queries.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={
+ "calculations": [
+ {
+ "operator": "uniq",
+ "alias": "alias",
+ "key": "key",
+ "key_type": "string",
+ }
+ ],
+ "datasets": ["string"],
+ "filter_combination": "and",
+ "filters": [
+ {
+ "filter_combination": "and",
+ "filters": [{}],
+ "kind": "group",
+ }
+ ],
+ "group_bys": [
+ {
+ "type": "string",
+ "value": "value",
+ }
+ ],
+ "havings": [
+ {
+ "key": "key",
+ "operation": "eq",
+ "value": 0,
+ }
+ ],
+ "limit": 0,
+ "needle": {
+ "value": "string",
+ "is_regex": True,
+ "match_case": True,
+ },
+ "order_by": {
+ "value": "value",
+ "order": "asc",
+ },
+ },
+ )
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.workers.observability.queries.with_raw_response.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = await response.parse()
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ @pytest.mark.skip(reason="HTTP 422 error from prism")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.workers.observability.queries.with_streaming_response.create(
+ account_id="account_id",
+ description="Query description",
+ name="x",
+ parameters={},
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = await response.parse()
+ assert_matches_type(QueryCreateResponse, query, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="HTTP 422 error 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.workers.observability.queries.with_raw_response.create(
+ account_id="",
+ description="Query description",
+ name="x",
+ parameters={},
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.workers.observability.queries.list(
+ account_id="account_id",
+ )
+ assert_matches_type(AsyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ query = await async_client.workers.observability.queries.list(
+ account_id="account_id",
+ order="asc",
+ order_by="created",
+ page=1,
+ per_page=5,
+ )
+ assert_matches_type(AsyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.workers.observability.queries.with_raw_response.list(
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ query = await response.parse()
+ assert_matches_type(AsyncSinglePage[QueryListResponse], query, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.workers.observability.queries.with_streaming_response.list(
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ query = await response.parse()
+ assert_matches_type(AsyncSinglePage[QueryListResponse], query, 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.observability.queries.with_raw_response.list(
+ account_id="",
+ )
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 2d94e27e6c6..aeb8e910906 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
@@ -89,6 +89,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
"placement": {"mode": "smart"},
@@ -271,6 +272,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
"placement": {"mode": "smart"},
diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py
index 63d6c265a99..7508f6a9516 100644
--- a/tests/api_resources/workers/scripts/test_settings.py
+++ b/tests/api_resources/workers/scripts/test_settings.py
@@ -46,6 +46,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
tags=["my-team", "my-public-api"],
@@ -182,6 +183,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
tags=["my-team", "my-public-api"],
diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py
index 6658a0b723e..a7be535f949 100644
--- a/tests/api_resources/workers/test_scripts.py
+++ b/tests/api_resources/workers/test_scripts.py
@@ -107,6 +107,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
"placement": {"mode": "smart"},
@@ -468,6 +469,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"enabled": True,
"head_sampling_rate": 0.1,
"persist": True,
+ "propagation_policy": "authenticated",
},
},
"placement": {"mode": "smart"},
diff --git a/tests/api_resources/zero_trust/access/ai_controls/mcp/test_portals.py b/tests/api_resources/zero_trust/access/ai_controls/mcp/test_portals.py
index 2b50c840c3c..7674cf7d047 100644
--- a/tests/api_resources/zero_trust/access/ai_controls/mcp/test_portals.py
+++ b/tests/api_resources/zero_trust/access/ai_controls/mcp/test_portals.py
@@ -48,6 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
{
"server_id": "my-mcp-server",
"default_disabled": True,
+ "is_shared_oauth_callback_enabled": True,
"on_behalf": True,
"updated_prompts": [
{
@@ -132,6 +133,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
{
"server_id": "my-mcp-server",
"default_disabled": True,
+ "is_shared_oauth_callback_enabled": True,
"on_behalf": True,
"updated_prompts": [
{
@@ -368,6 +370,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
{
"server_id": "my-mcp-server",
"default_disabled": True,
+ "is_shared_oauth_callback_enabled": True,
"on_behalf": True,
"updated_prompts": [
{
@@ -452,6 +455,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
{
"server_id": "my-mcp-server",
"default_disabled": True,
+ "is_shared_oauth_callback_enabled": True,
"on_behalf": True,
"updated_prompts": [
{
diff --git a/tests/api_resources/zero_trust/access/ai_controls/mcp/test_servers.py b/tests/api_resources/zero_trust/access/ai_controls/mcp/test_servers.py
index d4749de040a..33145a04d0d 100644
--- a/tests/api_resources/zero_trust/access/ai_controls/mcp/test_servers.py
+++ b/tests/api_resources/zero_trust/access/ai_controls/mcp/test_servers.py
@@ -13,6 +13,7 @@
from cloudflare.types.zero_trust.access.ai_controls.mcp import (
ServerListResponse,
ServerReadResponse,
+ ServerSyncResponse,
ServerCreateResponse,
ServerDeleteResponse,
ServerUpdateResponse,
@@ -45,6 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
name="My MCP Server",
auth_credentials="auth_credentials",
description="This is one remote mcp server",
+ is_shared_oauth_callback_enabled=True,
updated_prompts=[
{
"name": "name",
@@ -122,6 +124,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
account_id="a86a8f5c339544d7bdc89926de14fb8c",
auth_credentials="auth_credentials",
description="This is one remote mcp server",
+ is_shared_oauth_callback_enabled=True,
name="My MCP Server",
updated_prompts=[
{
@@ -332,7 +335,7 @@ def test_method_sync(self, client: Cloudflare) -> None:
id="my-mcp-portal",
account_id="a86a8f5c339544d7bdc89926de14fb8c",
)
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
@parametrize
def test_raw_response_sync(self, client: Cloudflare) -> None:
@@ -344,7 +347,7 @@ def test_raw_response_sync(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
server = response.parse()
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
@parametrize
def test_streaming_response_sync(self, client: Cloudflare) -> None:
@@ -356,7 +359,7 @@ def test_streaming_response_sync(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
server = response.parse()
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -401,6 +404,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
name="My MCP Server",
auth_credentials="auth_credentials",
description="This is one remote mcp server",
+ is_shared_oauth_callback_enabled=True,
updated_prompts=[
{
"name": "name",
@@ -478,6 +482,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
account_id="a86a8f5c339544d7bdc89926de14fb8c",
auth_credentials="auth_credentials",
description="This is one remote mcp server",
+ is_shared_oauth_callback_enabled=True,
name="My MCP Server",
updated_prompts=[
{
@@ -688,7 +693,7 @@ async def test_method_sync(self, async_client: AsyncCloudflare) -> None:
id="my-mcp-portal",
account_id="a86a8f5c339544d7bdc89926de14fb8c",
)
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
@parametrize
async def test_raw_response_sync(self, async_client: AsyncCloudflare) -> None:
@@ -700,7 +705,7 @@ async def test_raw_response_sync(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
server = await response.parse()
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
@parametrize
async def test_streaming_response_sync(self, async_client: AsyncCloudflare) -> None:
@@ -712,7 +717,7 @@ async def test_streaming_response_sync(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
server = await response.parse()
- assert_matches_type(object, server, path=["response"])
+ assert_matches_type(ServerSyncResponse, server, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_saml_certificates.py b/tests/api_resources/zero_trust/access/test_saml_certificates.py
index 59bc50aeb62..7e20dfb8c5f 100644
--- a/tests/api_resources/zero_trust/access/test_saml_certificates.py
+++ b/tests/api_resources/zero_trust/access/test_saml_certificates.py
@@ -30,6 +30,7 @@
class TestSAMLCertificates:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
saml_certificate = client.zero_trust.access.saml_certificates.list(
@@ -37,6 +38,7 @@ def test_method_list(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
saml_certificate = client.zero_trust.access.saml_certificates.list(
@@ -47,6 +49,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
)
assert_matches_type(SyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
response = client.zero_trust.access.saml_certificates.with_raw_response.list(
@@ -58,6 +61,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
saml_certificate = response.parse()
assert_matches_type(SyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
with client.zero_trust.access.saml_certificates.with_streaming_response.list(
@@ -73,6 +77,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@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 ''"):
@@ -80,6 +85,7 @@ def test_path_params_list(self, client: Cloudflare) -> None:
account_id="",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
saml_certificate = client.zero_trust.access.saml_certificates.get(
@@ -88,6 +94,7 @@ def test_method_get(self, client: Cloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateGetResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.zero_trust.access.saml_certificates.with_raw_response.get(
@@ -100,6 +107,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
saml_certificate = response.parse()
assert_matches_type(Optional[SAMLCertificateGetResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.zero_trust.access.saml_certificates.with_streaming_response.get(
@@ -114,6 +122,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error 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 ''"):
@@ -128,6 +137,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_method_get_pem(self, client: Cloudflare, respx_mock: MockRouter) -> None:
@@ -143,6 +153,7 @@ def test_method_get_pem(self, client: Cloudflare, respx_mock: MockRouter) -> Non
assert cast(Any, saml_certificate.is_closed) is True
assert isinstance(saml_certificate, BinaryAPIResponse)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_raw_response_get_pem(self, client: Cloudflare, respx_mock: MockRouter) -> None:
@@ -160,6 +171,7 @@ def test_raw_response_get_pem(self, client: Cloudflare, respx_mock: MockRouter)
assert saml_certificate.json() == {"foo": "bar"}
assert isinstance(saml_certificate, BinaryAPIResponse)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_streaming_response_get_pem(self, client: Cloudflare, respx_mock: MockRouter) -> None:
@@ -179,6 +191,7 @@ def test_streaming_response_get_pem(self, client: Cloudflare, respx_mock: MockRo
assert cast(Any, saml_certificate.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_path_params_get_pem(self, client: Cloudflare) -> None:
@@ -194,6 +207,7 @@ def test_path_params_get_pem(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_method_rotate(self, client: Cloudflare) -> None:
saml_certificate = client.zero_trust.access.saml_certificates.rotate(
@@ -202,6 +216,7 @@ def test_method_rotate(self, client: Cloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateRotateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_raw_response_rotate(self, client: Cloudflare) -> None:
response = client.zero_trust.access.saml_certificates.with_raw_response.rotate(
@@ -214,6 +229,7 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None:
saml_certificate = response.parse()
assert_matches_type(Optional[SAMLCertificateRotateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_streaming_response_rotate(self, client: Cloudflare) -> None:
with client.zero_trust.access.saml_certificates.with_streaming_response.rotate(
@@ -228,6 +244,7 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_path_params_rotate(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -248,6 +265,7 @@ class TestAsyncSAMLCertificates:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await async_client.zero_trust.access.saml_certificates.list(
@@ -257,6 +275,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
AsyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"]
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await async_client.zero_trust.access.saml_certificates.list(
@@ -269,6 +288,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
AsyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"]
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.access.saml_certificates.with_raw_response.list(
@@ -282,6 +302,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
AsyncV4PagePaginationArray[SAMLCertificateListResponse], saml_certificate, path=["response"]
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.access.saml_certificates.with_streaming_response.list(
@@ -297,6 +318,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@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 ''"):
@@ -304,6 +326,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
account_id="",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await async_client.zero_trust.access.saml_certificates.get(
@@ -312,6 +335,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateGetResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.access.saml_certificates.with_raw_response.get(
@@ -324,6 +348,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await response.parse()
assert_matches_type(Optional[SAMLCertificateGetResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.access.saml_certificates.with_streaming_response.get(
@@ -338,6 +363,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error 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 ''"):
@@ -352,6 +378,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_method_get_pem(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
@@ -367,6 +394,7 @@ async def test_method_get_pem(self, async_client: AsyncCloudflare, respx_mock: M
assert cast(Any, saml_certificate.is_closed) is True
assert isinstance(saml_certificate, AsyncBinaryAPIResponse)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_raw_response_get_pem(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
@@ -384,6 +412,7 @@ async def test_raw_response_get_pem(self, async_client: AsyncCloudflare, respx_m
assert await saml_certificate.json() == {"foo": "bar"}
assert isinstance(saml_certificate, AsyncBinaryAPIResponse)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_streaming_response_get_pem(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None:
@@ -403,6 +432,7 @@ async def test_streaming_response_get_pem(self, async_client: AsyncCloudflare, r
assert cast(Any, saml_certificate.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_path_params_get_pem(self, async_client: AsyncCloudflare) -> None:
@@ -418,6 +448,7 @@ async def test_path_params_get_pem(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_method_rotate(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await async_client.zero_trust.access.saml_certificates.rotate(
@@ -426,6 +457,7 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateRotateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.access.saml_certificates.with_raw_response.rotate(
@@ -438,6 +470,7 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await response.parse()
assert_matches_type(Optional[SAMLCertificateRotateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.access.saml_certificates.with_streaming_response.rotate(
@@ -452,6 +485,7 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) ->
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_path_params_rotate(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/zero_trust/identity_providers/test_saml_certificate.py b/tests/api_resources/zero_trust/identity_providers/test_saml_certificate.py
index 528832c7cec..479da47989c 100644
--- a/tests/api_resources/zero_trust/identity_providers/test_saml_certificate.py
+++ b/tests/api_resources/zero_trust/identity_providers/test_saml_certificate.py
@@ -17,6 +17,7 @@
class TestSAMLCertificate:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
saml_certificate = client.zero_trust.identity_providers.saml_certificate.create(
@@ -25,6 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateCreateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.zero_trust.identity_providers.saml_certificate.with_raw_response.create(
@@ -37,6 +39,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
saml_certificate = response.parse()
assert_matches_type(Optional[SAMLCertificateCreateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.zero_trust.identity_providers.saml_certificate.with_streaming_response.create(
@@ -51,6 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error 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 ''"):
@@ -71,6 +75,7 @@ class TestAsyncSAMLCertificate:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await async_client.zero_trust.identity_providers.saml_certificate.create(
@@ -79,6 +84,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(Optional[SAMLCertificateCreateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.identity_providers.saml_certificate.with_raw_response.create(
@@ -91,6 +97,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
saml_certificate = await response.parse()
assert_matches_type(Optional[SAMLCertificateCreateResponse], saml_certificate, path=["response"])
+ @pytest.mark.skip(reason="HTTP 404 error from prism")
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.identity_providers.saml_certificate.with_streaming_response.create(
@@ -105,6 +112,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="HTTP 404 error 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 ''"):
diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py
index 7800d045040..6e0633b0887 100644
--- a/tests/api_resources/zero_trust/test_identity_providers.py
+++ b/tests/api_resources/zero_trust/test_identity_providers.py
@@ -1224,6 +1224,86 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None:
account_id="account_id",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_create_overload_15(self, client: Cloudflare) -> None:
+ identity_provider = client.zero_trust.identity_providers.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None:
+ identity_provider = client.zero_trust.identity_providers.create(
+ config={"restrict_to_account_members": True},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ saml_certificate_set_id="c409ef44-e72c-41c8-8c0b-278c8a6f4fd8",
+ scim_config={
+ "enabled": True,
+ "identity_update_behavior": "automatic",
+ "seat_deprovision": True,
+ "user_deprovision": True,
+ },
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None:
+ response = client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ identity_provider = response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None:
+ with client.zero_trust.identity_providers.with_streaming_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ identity_provider = response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_path_params_create_overload_15(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_method_update_overload_1(self, client: Cloudflare) -> None:
@@ -2636,6 +2716,101 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None:
account_id="account_id",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_update_overload_15(self, client: Cloudflare) -> None:
+ identity_provider = client.zero_trust.identity_providers.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None:
+ identity_provider = client.zero_trust.identity_providers.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={"restrict_to_account_members": True},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ saml_certificate_set_id="c409ef44-e72c-41c8-8c0b-278c8a6f4fd8",
+ scim_config={
+ "enabled": True,
+ "identity_update_behavior": "automatic",
+ "seat_deprovision": True,
+ "user_deprovision": True,
+ },
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None:
+ response = client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ identity_provider = response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None:
+ with client.zero_trust.identity_providers.with_streaming_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ identity_provider = response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ def test_path_params_update_overload_15(self, client: Cloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"):
+ client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
@@ -4044,6 +4219,86 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar
account_id="account_id",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None:
+ identity_provider = await async_client.zero_trust.identity_providers.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None:
+ identity_provider = await async_client.zero_trust.identity_providers.create(
+ config={"restrict_to_account_members": True},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ saml_certificate_set_id="c409ef44-e72c-41c8-8c0b-278c8a6f4fd8",
+ scim_config={
+ "enabled": True,
+ "identity_update_behavior": "automatic",
+ "seat_deprovision": True,
+ "user_deprovision": True,
+ },
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ identity_provider = await response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.identity_providers.with_streaming_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ identity_provider = await response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ await async_client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ await async_client.zero_trust.identity_providers.with_raw_response.create(
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None:
@@ -5456,6 +5711,101 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar
account_id="account_id",
)
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None:
+ identity_provider = await async_client.zero_trust.identity_providers.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None:
+ identity_provider = await async_client.zero_trust.identity_providers.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={"restrict_to_account_members": True},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ saml_certificate_set_id="c409ef44-e72c-41c8-8c0b-278c8a6f4fd8",
+ scim_config={
+ "enabled": True,
+ "identity_update_behavior": "automatic",
+ "seat_deprovision": True,
+ "user_deprovision": True,
+ },
+ )
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ identity_provider = await response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.identity_providers.with_streaming_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ identity_provider = await response.parse()
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="TODO: investigate broken test")
+ @parametrize
+ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflare) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"):
+ await async_client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ await async_client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"):
+ await async_client.zero_trust.identity_providers.with_raw_response.update(
+ identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
+ config={},
+ name="Widget Corps IDP",
+ type="onetimepin",
+ account_id="account_id",
+ )
+
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
diff --git a/uv.lock b/uv.lock
index 8cf32e45271..d9973e37a7d 100644
--- a/uv.lock
+++ b/uv.lock
@@ -259,7 +259,7 @@ wheels = [
[[package]]
name = "cloudflare"
-version = "5.1.0"
+version = "5.0.0b2"
source = { editable = "." }
dependencies = [
{ name = "anyio", version = "4.12.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10' or (extra == 'group-10-cloudflare-pydantic-v1' and extra == 'group-10-cloudflare-pydantic-v2')" },