From fe47b0334d3ceb6596a245ae8d2e8b2fffb4d733 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 19 Sep 2024 22:14:49 +0000
Subject: [PATCH] feat(api): Config update for yjp20/dev (#1749)
---
.stats.yml | 4 +-
api.md | 10 +-
.../resources/ai_gateway/ai_gateway.py | 4 +-
src/cloudflare/resources/ai_gateway/logs.py | 48 +---
src/cloudflare/resources/alerting/policies.py | 4 -
src/cloudflare/resources/audit_logs.py | 26 +-
.../cloudforce_one/requests/message.py | 58 ++++-
.../cloudforce_one/requests/priority.py | 8 +-
.../cloudforce_one/requests/requests.py | 8 +-
.../custom_hostnames/custom_hostnames.py | 22 +-
.../resources/dns/firewall/firewall.py | 100 +++----
.../r2/configuration/configuration.py | 8 +-
.../r2/configuration/queues.py | 24 +-
.../intel/attack_surface_report/issues.py | 48 ++--
.../resources/kv/namespaces/values.py | 8 +
.../configs/configs.py | 126 ++-------
.../magic_network_monitoring/configs/full.py | 4 +-
.../magic_network_monitoring/rules/rules.py | 244 +-----------------
.../resources/page_shield/connections.py | 20 +-
.../resources/page_shield/cookies.py | 14 +-
.../resources/page_shield/scripts.py | 18 +-
src/cloudflare/resources/queues/consumers.py | 40 +--
src/cloudflare/resources/queues/messages.py | 16 +-
src/cloudflare/resources/queues/queues.py | 32 +--
src/cloudflare/resources/r2/domains/custom.py | 35 +--
src/cloudflare/resources/user/audit_logs.py | 26 +-
src/cloudflare/resources/workers/ai/ai.py | 20 +-
.../devices/posture/integrations.py | 16 +-
.../zero_trust/devices/posture/posture.py | 4 -
.../resources/zero_trust/dex/tests/tests.py | 160 ++++++++++++
.../resources/zero_trust/dlp/patterns.py | 38 +--
.../resources/zones/custom_nameservers.py | 32 +--
.../ai_gateway/ai_gateway_list_params.py | 2 +-
.../types/ai_gateway/log_list_params.py | 20 +-
src/cloudflare/types/alerting/policy.py | 1 -
.../types/alerting/policy_create_params.py | 1 -
.../types/alerting/policy_filter.py | 3 -
.../types/alerting/policy_filter_param.py | 3 -
.../types/alerting/policy_update_params.py | 1 -
.../types/audit_logs/audit_log_list_params.py | 12 +-
.../types/cloudforce_one/requests/message.py | 2 +-
.../requests/message_update_params.py | 16 +-
.../custom_hostname_create_params.py | 16 +-
.../custom_hostname_create_response.py | 15 +-
.../custom_hostname_edit_params.py | 16 +-
.../custom_hostname_edit_response.py | 15 +-
.../custom_hostname_get_response.py | 15 +-
.../custom_hostname_list_response.py | 15 +-
src/cloudflare/types/dns/attack_mitigation.py | 6 +-
.../types/dns/attack_mitigation_param.py | 6 +-
src/cloudflare/types/dns/dns_setting.py | 7 -
src/cloudflare/types/dns/dns_setting_param.py | 7 -
.../types/dns/firewall_create_params.py | 37 +--
.../types/dns/firewall_create_response.py | 39 +--
.../types/dns/firewall_edit_params.py | 37 +--
.../types/dns/firewall_edit_response.py | 39 +--
.../types/dns/firewall_get_response.py | 39 +--
.../types/dns/firewall_list_params.py | 4 +-
.../types/dns/firewall_list_response.py | 39 +--
src/cloudflare/types/dns/nameserver.py | 2 +-
src/cloudflare/types/dns/nameserver_param.py | 4 +-
.../types/dns/record_create_response.py | 27 +-
.../types/dns/record_edit_response.py | 27 +-
.../types/dns/record_get_response.py | 27 +-
.../types/dns/record_list_response.py | 27 +-
.../types/dns/record_update_response.py | 27 +-
.../types/durable_objects/namespace.py | 2 -
.../investigate_get_response.py | 16 --
.../investigate_list_response.py | 16 --
.../r2/configuration/queue_update_params.py | 4 +-
.../issue_dismiss_response.py | 16 +-
.../config_create_params.py | 24 +-
.../config_edit_params.py | 24 +-
.../config_update_params.py | 24 +-
.../magic_network_monitoring/configuration.py | 12 +-
.../rule_create_params.py | 41 +--
.../rule_edit_params.py | 41 +--
.../rule_update_params.py | 44 +---
.../origin_ca_certificate.py | 3 +-
.../origin_ca_certificate_delete_response.py | 29 ++-
.../page_shield/connection_list_params.py | 12 +-
.../types/page_shield/cookie_list_params.py | 12 +-
.../types/page_shield/script_list_params.py | 11 +-
.../types/queues/consumer_create_params.py | 2 +-
.../types/queues/consumer_update_params.py | 4 +-
.../types/queues/message_ack_params.py | 2 +-
.../types/queues/message_pull_params.py | 2 +-
.../types/queues/queue_create_params.py | 2 +-
.../types/queues/queue_update_params.py | 2 +-
.../types/r2/domains/custom_create_params.py | 8 +-
.../r2/domains/custom_create_response.py | 9 -
.../types/r2/domains/custom_list_response.py | 6 -
.../types/r2/domains/custom_update_params.py | 10 +-
.../r2/domains/custom_update_response.py | 9 -
.../types/rulesets/rule_create_params.py | 2 +-
.../types/rulesets/rule_edit_params.py | 2 +-
.../types/rulesets/set_cache_settings_rule.py | 2 +-
.../rulesets/set_cache_settings_rule_param.py | 2 +-
.../types/user/audit_log_list_params.py | 12 +-
src/cloudflare/types/workers/ai_run_params.py | 4 -
.../types/workers/migration_step.py | 3 -
.../types/workers/migration_step_param.py | 3 -
.../types/workers/single_step_migration.py | 3 -
.../workers/single_step_migration_param.py | 3 -
.../zero_trust/authentication_method_rule.py | 3 +-
.../authentication_method_rule_param.py | 3 +-
.../types/zero_trust/azure_group_rule.py | 2 +-
.../zero_trust/azure_group_rule_param.py | 2 +-
.../types/zero_trust/devices/device_input.py | 15 --
.../zero_trust/devices/device_input_param.py | 15 --
.../zero_trust/devices/device_posture_rule.py | 1 -
.../zero_trust/devices/posture/integration.py | 4 +-
.../posture/integration_create_params.py | 23 +-
.../posture/integration_edit_params.py | 23 +-
.../devices/posture_create_params.py | 1 -
.../devices/posture_update_params.py | 1 -
.../types/zero_trust/dex/__init__.py | 4 +
.../zero_trust/dex/aggregate_time_period.py | 13 +
.../types/zero_trust/dex/test_list_params.py | 35 +++
.../zero_trust/dex/test_list_response.py | 38 +++
.../zero_trust/dlp/pattern_validate_params.py | 13 -
.../zero_trust/github_organization_rule.py | 2 +-
.../github_organization_rule_param.py | 2 +-
.../types/zero_trust/gsuite_group_rule.py | 6 +-
.../zero_trust/gsuite_group_rule_param.py | 6 +-
.../types/zero_trust/okta_group_rule.py | 6 +-
.../types/zero_trust/okta_group_rule_param.py | 6 +-
.../types/zero_trust/saml_group_rule.py | 3 -
.../types/zero_trust/saml_group_rule_param.py | 3 -
.../zones/custom_nameserver_get_response.py | 40 +--
tests/api_resources/ai_gateway/test_logs.py | 20 +-
tests/api_resources/alerting/test_policies.py | 4 -
.../cloudforce_one/requests/test_message.py | 12 +-
tests/api_resources/dns/test_settings.py | 2 -
.../email_security/settings/test_domains.py | 4 +-
.../attack_surface_report/test_issues.py | 16 +-
.../magic_network_monitoring/test_configs.py | 200 ++------------
.../magic_network_monitoring/test_rules.py | 140 ++--------
tests/api_resources/r2/domains/test_custom.py | 4 -
tests/api_resources/rulesets/test_rules.py | 8 +-
tests/api_resources/test_ai_gateway.py | 4 +-
tests/api_resources/test_audit_logs.py | 10 +-
tests/api_resources/test_custom_hostnames.py | 8 +-
tests/api_resources/user/test_audit_logs.py | 10 +-
tests/api_resources/workers/test_ai.py | 30 +--
tests/api_resources/workers/test_scripts.py | 2 -
.../namespaces/scripts/test_settings.py | 2 -
.../dispatch/namespaces/test_scripts.py | 2 -
.../zero_trust/dex/test_tests.py | 123 +++++++++
.../zero_trust/dlp/test_patterns.py | 18 --
.../zones/test_custom_nameservers.py | 12 +-
151 files changed, 1238 insertions(+), 1865 deletions(-)
create mode 100644 src/cloudflare/types/zero_trust/dex/aggregate_time_period.py
create mode 100644 src/cloudflare/types/zero_trust/dex/test_list_params.py
create mode 100644 src/cloudflare/types/zero_trust/dex/test_list_response.py
create mode 100644 tests/api_resources/zero_trust/dex/test_tests.py
diff --git a/.stats.yml b/.stats.yml
index 2a1bbf149507..dd47a10f28f6 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 1330
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c3cd4c1b3d10ea035cd202f12f4157a15c89826346ecece251da05916303098e.yml
+configured_endpoints: 1331
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39b038356da795b90be9cf01748bbbfc58b3ea7c73bb33bf2a4b5b4969342c22.yml
diff --git a/api.md b/api.md
index 9b658267e621..157df695c861 100644
--- a/api.md
+++ b/api.md
@@ -394,7 +394,7 @@ from cloudflare.types.zones import CustomNameserverUpdateResponse, CustomNameser
Methods:
- client.zones.custom_nameservers.update(\*, zone_id, \*\*params) -> Optional
-- client.zones.custom_nameservers.get(\*, zone_id) -> CustomNameserverGetResponse
+- client.zones.custom_nameservers.get(\*, zone_id) -> Optional
## Holds
@@ -3512,7 +3512,7 @@ Methods:
- client.intel.attack_surface_report.issues.list(\*, account_id, \*\*params) -> SyncV4PagePagination[IssueListResponse]
- client.intel.attack*surface_report.issues.class*(\*, account_id, \*\*params) -> Optional
-- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> IssueDismissResponse
+- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> Optional
- client.intel.attack_surface_report.issues.severity(\*, account_id, \*\*params) -> Optional
- client.intel.attack_surface_report.issues.type(\*, account_id, \*\*params) -> Optional
@@ -5381,9 +5381,13 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust.dex import AggregateTimePeriod, Tests
+from cloudflare.types.zero_trust.dex import AggregateTimePeriod, Tests, TestListResponse
```
+Methods:
+
+- client.zero_trust.dex.tests.list(\*, account_id, \*\*params) -> SyncV4PagePagination[TestListResponse]
+
#### UniqueDevices
Types:
diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py
index 4a164e9f97fc..d5d2b76e83c9 100644
--- a/src/cloudflare/resources/ai_gateway/ai_gateway.py
+++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py
@@ -188,7 +188,7 @@ def list(
account_id: str,
id: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
- order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ order_by_direction: Literal["ASC", "DESC"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -470,7 +470,7 @@ def list(
account_id: str,
id: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
- order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ order_by_direction: Literal["ASC", "DESC"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/cloudflare/resources/ai_gateway/logs.py b/src/cloudflare/resources/ai_gateway/logs.py
index ed303ca12d86..43fbec2d030b 100644
--- a/src/cloudflare/resources/ai_gateway/logs.py
+++ b/src/cloudflare/resources/ai_gateway/logs.py
@@ -52,24 +52,18 @@ def list(
*,
account_id: str,
cached: bool | NotGiven = NOT_GIVEN,
- direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ direction: Literal["asc", "desc", "ASC", "DESC"] | NotGiven = NOT_GIVEN,
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
- feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
max_cost: float | NotGiven = NOT_GIVEN,
max_duration: float | NotGiven = NOT_GIVEN,
- max_tokens_in: float | NotGiven = NOT_GIVEN,
- max_tokens_out: float | NotGiven = NOT_GIVEN,
- max_total_tokens: float | NotGiven = NOT_GIVEN,
- meta_info: bool | NotGiven = NOT_GIVEN,
+ max_tokens: float | NotGiven = NOT_GIVEN,
min_cost: float | NotGiven = NOT_GIVEN,
min_duration: float | NotGiven = NOT_GIVEN,
- min_tokens_in: float | NotGiven = NOT_GIVEN,
- min_tokens_out: float | NotGiven = NOT_GIVEN,
- min_total_tokens: float | NotGiven = NOT_GIVEN,
+ min_tokens: float | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
model_type: str | NotGiven = NOT_GIVEN,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | NotGiven = NOT_GIVEN,
- order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ order_by_direction: Literal["asc", "desc", "ASC", "DESC"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
provider: str | NotGiven = NOT_GIVEN,
@@ -116,18 +110,12 @@ def list(
"cached": cached,
"direction": direction,
"end_date": end_date,
- "feedback": feedback,
"max_cost": max_cost,
"max_duration": max_duration,
- "max_tokens_in": max_tokens_in,
- "max_tokens_out": max_tokens_out,
- "max_total_tokens": max_total_tokens,
- "meta_info": meta_info,
+ "max_tokens": max_tokens,
"min_cost": min_cost,
"min_duration": min_duration,
- "min_tokens_in": min_tokens_in,
- "min_tokens_out": min_tokens_out,
- "min_total_tokens": min_total_tokens,
+ "min_tokens": min_tokens,
"model": model,
"model_type": model_type,
"order_by": order_by,
@@ -174,24 +162,18 @@ def list(
*,
account_id: str,
cached: bool | NotGiven = NOT_GIVEN,
- direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ direction: Literal["asc", "desc", "ASC", "DESC"] | NotGiven = NOT_GIVEN,
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
- feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
max_cost: float | NotGiven = NOT_GIVEN,
max_duration: float | NotGiven = NOT_GIVEN,
- max_tokens_in: float | NotGiven = NOT_GIVEN,
- max_tokens_out: float | NotGiven = NOT_GIVEN,
- max_total_tokens: float | NotGiven = NOT_GIVEN,
- meta_info: bool | NotGiven = NOT_GIVEN,
+ max_tokens: float | NotGiven = NOT_GIVEN,
min_cost: float | NotGiven = NOT_GIVEN,
min_duration: float | NotGiven = NOT_GIVEN,
- min_tokens_in: float | NotGiven = NOT_GIVEN,
- min_tokens_out: float | NotGiven = NOT_GIVEN,
- min_total_tokens: float | NotGiven = NOT_GIVEN,
+ min_tokens: float | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
model_type: str | NotGiven = NOT_GIVEN,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | NotGiven = NOT_GIVEN,
- order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
+ order_by_direction: Literal["asc", "desc", "ASC", "DESC"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
provider: str | NotGiven = NOT_GIVEN,
@@ -238,18 +220,12 @@ def list(
"cached": cached,
"direction": direction,
"end_date": end_date,
- "feedback": feedback,
"max_cost": max_cost,
"max_duration": max_duration,
- "max_tokens_in": max_tokens_in,
- "max_tokens_out": max_tokens_out,
- "max_total_tokens": max_total_tokens,
- "meta_info": meta_info,
+ "max_tokens": max_tokens,
"min_cost": min_cost,
"min_duration": min_duration,
- "min_tokens_in": min_tokens_in,
- "min_tokens_out": min_tokens_out,
- "min_total_tokens": min_total_tokens,
+ "min_tokens": min_tokens,
"model": model,
"model_type": model_type,
"order_by": order_by,
diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py
index 57e6112996fe..23d98746854a 100644
--- a/src/cloudflare/resources/alerting/policies.py
+++ b/src/cloudflare/resources/alerting/policies.py
@@ -89,7 +89,6 @@ def create(
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -233,7 +232,6 @@ def update(
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -520,7 +518,6 @@ async def create(
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
@@ -664,7 +661,6 @@ async def update(
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
diff --git a/src/cloudflare/resources/audit_logs.py b/src/cloudflare/resources/audit_logs.py
index 8e3020f4b33b..94075acd8033 100644
--- a/src/cloudflare/resources/audit_logs.py
+++ b/src/cloudflare/resources/audit_logs.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Union
-from datetime import date, datetime
+from datetime import datetime
from typing_extensions import Literal
import httpx
@@ -53,13 +53,13 @@ def list(
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
- before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ before: Union[str, datetime] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ since: Union[str, datetime] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -78,8 +78,8 @@ def list(
id: Finds a specific log by its ID.
- before: Limits the returned results to logs older than the specified date. A `full-date`
- that conforms to RFC3339.
+ before: Limits the returned results to logs older than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
direction: Changes the direction of the chronological sorting.
@@ -91,8 +91,8 @@ def list(
per_page: Sets the number of results to return per page.
- since: Limits the returned results to logs newer than the specified date. A `full-date`
- that conforms to RFC3339.
+ since: Limits the returned results to logs newer than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
extra_headers: Send extra headers
@@ -160,13 +160,13 @@ def list(
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
- before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ before: Union[str, datetime] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ since: Union[str, datetime] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -185,8 +185,8 @@ def list(
id: Finds a specific log by its ID.
- before: Limits the returned results to logs older than the specified date. A `full-date`
- that conforms to RFC3339.
+ before: Limits the returned results to logs older than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
direction: Changes the direction of the chronological sorting.
@@ -198,8 +198,8 @@ def list(
per_page: Sets the number of results to return per page.
- since: Limits the returned results to logs newer than the specified date. A `full-date`
- that conforms to RFC3339.
+ since: Limits the returned results to logs newer than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/cloudforce_one/requests/message.py b/src/cloudflare/resources/cloudforce_one/requests/message.py
index 1127fbd6e4df..683fed3d59f8 100644
--- a/src/cloudflare/resources/cloudforce_one/requests/message.py
+++ b/src/cloudflare/resources/cloudforce_one/requests/message.py
@@ -65,7 +65,9 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Message]:
"""
- Create a New Request Message
+ Creating a request adds the request into the Cloudforce One queue for analysis.
+ In addition to the content, a short title, type, priority, and releasability
+ should be provided. If one is not provided a default will be assigned.
Args:
account_identifier: Identifier
@@ -106,6 +108,10 @@ def update(
account_identifier: str,
request_identifier: str,
content: str | NotGiven = NOT_GIVEN,
+ priority: str | NotGiven = NOT_GIVEN,
+ request_type: str | NotGiven = NOT_GIVEN,
+ summary: str | NotGiven = NOT_GIVEN,
+ tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via 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,7 +127,15 @@ def update(
request_identifier: UUID
- content: Content of message
+ content: Request content
+
+ priority: Priority for analyzing the request
+
+ request_type: Requested information from request
+
+ summary: Brief description of the request
+
+ tlp: The CISA defined Traffic Light Protocol (TLP)
extra_headers: Send extra headers
@@ -137,7 +151,16 @@ def update(
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
return self._put(
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}",
- body=maybe_transform({"content": content}, message_update_params.MessageUpdateParams),
+ body=maybe_transform(
+ {
+ "content": content,
+ "priority": priority,
+ "request_type": request_type,
+ "summary": summary,
+ "tlp": tlp,
+ },
+ message_update_params.MessageUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -297,7 +320,9 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Message]:
"""
- Create a New Request Message
+ Creating a request adds the request into the Cloudforce One queue for analysis.
+ In addition to the content, a short title, type, priority, and releasability
+ should be provided. If one is not provided a default will be assigned.
Args:
account_identifier: Identifier
@@ -338,6 +363,10 @@ async def update(
account_identifier: str,
request_identifier: str,
content: str | NotGiven = NOT_GIVEN,
+ priority: str | NotGiven = NOT_GIVEN,
+ request_type: str | NotGiven = NOT_GIVEN,
+ summary: str | NotGiven = NOT_GIVEN,
+ tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -353,7 +382,15 @@ async def update(
request_identifier: UUID
- content: Content of message
+ content: Request content
+
+ priority: Priority for analyzing the request
+
+ request_type: Requested information from request
+
+ summary: Brief description of the request
+
+ tlp: The CISA defined Traffic Light Protocol (TLP)
extra_headers: Send extra headers
@@ -369,7 +406,16 @@ async def update(
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
return await self._put(
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}",
- body=await async_maybe_transform({"content": content}, message_update_params.MessageUpdateParams),
+ body=await async_maybe_transform(
+ {
+ "content": content,
+ "priority": priority,
+ "request_type": request_type,
+ "summary": summary,
+ "tlp": tlp,
+ },
+ message_update_params.MessageUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/cloudforce_one/requests/priority.py b/src/cloudflare/resources/cloudforce_one/requests/priority.py
index 8c80893b5d20..6ef850caf9e2 100644
--- a/src/cloudflare/resources/cloudforce_one/requests/priority.py
+++ b/src/cloudflare/resources/cloudforce_one/requests/priority.py
@@ -68,7 +68,7 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Priority]:
"""
- Create a New Priority Intelligence Requirement
+ Create a New Priority Requirement
Args:
account_identifier: Identifier
@@ -190,7 +190,7 @@ def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PriorityDeleteResponse:
"""
- Delete a Priority Intelligence Requirement
+ Delete a Priority Intelligence Report
Args:
account_identifier: Identifier
@@ -337,7 +337,7 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Priority]:
"""
- Create a New Priority Intelligence Requirement
+ Create a New Priority Requirement
Args:
account_identifier: Identifier
@@ -459,7 +459,7 @@ async def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PriorityDeleteResponse:
"""
- Delete a Priority Intelligence Requirement
+ Delete a Priority Intelligence Report
Args:
account_identifier: Identifier
diff --git a/src/cloudflare/resources/cloudforce_one/requests/requests.py b/src/cloudflare/resources/cloudforce_one/requests/requests.py
index c23a9fb2c052..c0b9d3d8a81b 100644
--- a/src/cloudflare/resources/cloudforce_one/requests/requests.py
+++ b/src/cloudflare/resources/cloudforce_one/requests/requests.py
@@ -98,7 +98,7 @@ def create(
"""
Creating a request adds the request into the Cloudforce One queue for analysis.
In addition to the content, a short title, type, priority, and releasability
- should be provided. If one is not provided, a default will be assigned.
+ should be provided. If one is not provided a default will be assigned.
Args:
account_identifier: Identifier
@@ -166,7 +166,7 @@ def update(
This API may
be used to update any attributes of the request after the initial submission.
- Only fields that you choose to update need to be add to the request body.
+ Only fields that you choose to update need to be add to the request body
Args:
account_identifier: Identifier
@@ -548,7 +548,7 @@ async def create(
"""
Creating a request adds the request into the Cloudforce One queue for analysis.
In addition to the content, a short title, type, priority, and releasability
- should be provided. If one is not provided, a default will be assigned.
+ should be provided. If one is not provided a default will be assigned.
Args:
account_identifier: Identifier
@@ -616,7 +616,7 @@ async def update(
This API may
be used to update any attributes of the request after the initial submission.
- Only fields that you choose to update need to be add to the request body.
+ Only fields that you choose to update need to be add to the request body
Args:
account_identifier: Identifier
diff --git a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
index 34a0517e6080..0b158f6b3846 100644
--- a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
+++ b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Type, Optional, cast
+from typing import Type, Optional, cast
from typing_extensions import Literal
import httpx
@@ -75,7 +75,7 @@ def create(
zone_id: str,
hostname: str,
ssl: custom_hostname_create_params.SSL,
- custom_metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_create_params.CustomMetadata | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -99,8 +99,7 @@ def create(
ssl: SSL properties used when creating the custom hostname.
- custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
- settings.
+ custom_metadata: These are per-hostname (customer) settings.
extra_headers: Send extra headers
@@ -252,7 +251,7 @@ def edit(
custom_hostname_id: str,
*,
zone_id: str,
- custom_metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_edit_params.CustomMetadata | NotGiven = NOT_GIVEN,
custom_origin_server: str | NotGiven = NOT_GIVEN,
custom_origin_sni: str | NotGiven = NOT_GIVEN,
ssl: custom_hostname_edit_params.SSL | NotGiven = NOT_GIVEN,
@@ -275,8 +274,7 @@ def edit(
custom_hostname_id: Identifier
- custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
- settings.
+ custom_metadata: These are per-hostname (customer) settings.
custom_origin_server: a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
record.
@@ -397,7 +395,7 @@ async def create(
zone_id: str,
hostname: str,
ssl: custom_hostname_create_params.SSL,
- custom_metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_create_params.CustomMetadata | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -421,8 +419,7 @@ async def create(
ssl: SSL properties used when creating the custom hostname.
- custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
- settings.
+ custom_metadata: These are per-hostname (customer) settings.
extra_headers: Send extra headers
@@ -574,7 +571,7 @@ async def edit(
custom_hostname_id: str,
*,
zone_id: str,
- custom_metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_edit_params.CustomMetadata | NotGiven = NOT_GIVEN,
custom_origin_server: str | NotGiven = NOT_GIVEN,
custom_origin_sni: str | NotGiven = NOT_GIVEN,
ssl: custom_hostname_edit_params.SSL | NotGiven = NOT_GIVEN,
@@ -597,8 +594,7 @@ async def edit(
custom_hostname_id: Identifier
- custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
- settings.
+ custom_metadata: These are per-hostname (customer) settings.
custom_origin_server: a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
record.
diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py
index 00c278916571..40041cd90154 100644
--- a/src/cloudflare/resources/dns/firewall/firewall.py
+++ b/src/cloudflare/resources/dns/firewall/firewall.py
@@ -89,35 +89,35 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallCreateResponse]:
"""
- Create a DNS Firewall cluster
+ Create a configured DNS Firewall Cluster.
Args:
account_id: Identifier
- name: DNS Firewall cluster name
+ name: DNS Firewall Cluster Name.
- attack_mitigation: Attack mitigation settings
+ attack_mitigation: Attack mitigation settings.
- deprecate_any_requests: Whether to refuse to answer queries for the ANY type
+ deprecate_any_requests: Deprecate the response to ANY requests.
- ecs_fallback: Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
+ ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
- maximum_cache_ttl: Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
+ maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Higher TTLs will be
decreased to the maximum defined here for caching purposes.
- minimum_cache_ttl: Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
+ minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Lower TTLs will be
increased to the minimum defined here for caching purposes.
- negative_cache_ttl: Negative DNS cache TTL This setting controls how long DNS Firewall should cache
+ negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache
negative responses (e.g., NXDOMAIN) from the upstream servers.
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
retries: Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
extra_headers: Send extra headers
@@ -170,14 +170,14 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[FirewallListResponse]:
"""
- List DNS Firewall clusters for an account
+ List configured DNS Firewall clusters for an account.
Args:
account_id: Identifier
- page: Page number of paginated results
+ page: Page number of paginated results.
- per_page: Number of clusters per page
+ per_page: Number of clusters per page.
extra_headers: Send extra headers
@@ -221,7 +221,7 @@ def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallDeleteResponse]:
"""
- Delete a DNS Firewall cluster
+ Delete a configured DNS Firewall Cluster.
Args:
account_id: Identifier
@@ -275,37 +275,37 @@ def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallEditResponse]:
"""
- Modify the configuration of a DNS Firewall cluster
+ Modify a DNS Firewall Cluster configuration.
Args:
account_id: Identifier
dns_firewall_id: Identifier
- attack_mitigation: Attack mitigation settings
+ attack_mitigation: Attack mitigation settings.
- deprecate_any_requests: Whether to refuse to answer queries for the ANY type
+ deprecate_any_requests: Deprecate the response to ANY requests.
- ecs_fallback: Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
+ ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
- maximum_cache_ttl: Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
+ maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Higher TTLs will be
decreased to the maximum defined here for caching purposes.
- minimum_cache_ttl: Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
+ minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Lower TTLs will be
increased to the minimum defined here for caching purposes.
- name: DNS Firewall cluster name
+ name: DNS Firewall Cluster Name.
- negative_cache_ttl: Negative DNS cache TTL This setting controls how long DNS Firewall should cache
+ negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache
negative responses (e.g., NXDOMAIN) from the upstream servers.
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
retries: Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
extra_headers: Send extra headers
@@ -359,7 +359,7 @@ def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallGetResponse]:
"""
- Show a single DNS Firewall cluster for an account
+ Show a single configured DNS Firewall cluster for an account.
Args:
account_id: Identifier
@@ -437,35 +437,35 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallCreateResponse]:
"""
- Create a DNS Firewall cluster
+ Create a configured DNS Firewall Cluster.
Args:
account_id: Identifier
- name: DNS Firewall cluster name
+ name: DNS Firewall Cluster Name.
- attack_mitigation: Attack mitigation settings
+ attack_mitigation: Attack mitigation settings.
- deprecate_any_requests: Whether to refuse to answer queries for the ANY type
+ deprecate_any_requests: Deprecate the response to ANY requests.
- ecs_fallback: Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
+ ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
- maximum_cache_ttl: Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
+ maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Higher TTLs will be
decreased to the maximum defined here for caching purposes.
- minimum_cache_ttl: Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
+ minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Lower TTLs will be
increased to the minimum defined here for caching purposes.
- negative_cache_ttl: Negative DNS cache TTL This setting controls how long DNS Firewall should cache
+ negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache
negative responses (e.g., NXDOMAIN) from the upstream servers.
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
retries: Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
extra_headers: Send extra headers
@@ -518,14 +518,14 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[FirewallListResponse, AsyncV4PagePaginationArray[FirewallListResponse]]:
"""
- List DNS Firewall clusters for an account
+ List configured DNS Firewall clusters for an account.
Args:
account_id: Identifier
- page: Page number of paginated results
+ page: Page number of paginated results.
- per_page: Number of clusters per page
+ per_page: Number of clusters per page.
extra_headers: Send extra headers
@@ -569,7 +569,7 @@ async def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallDeleteResponse]:
"""
- Delete a DNS Firewall cluster
+ Delete a configured DNS Firewall Cluster.
Args:
account_id: Identifier
@@ -623,37 +623,37 @@ async def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallEditResponse]:
"""
- Modify the configuration of a DNS Firewall cluster
+ Modify a DNS Firewall Cluster configuration.
Args:
account_id: Identifier
dns_firewall_id: Identifier
- attack_mitigation: Attack mitigation settings
+ attack_mitigation: Attack mitigation settings.
- deprecate_any_requests: Whether to refuse to answer queries for the ANY type
+ deprecate_any_requests: Deprecate the response to ANY requests.
- ecs_fallback: Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
+ ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
- maximum_cache_ttl: Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
+ maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Higher TTLs will be
decreased to the maximum defined here for caching purposes.
- minimum_cache_ttl: Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
+ minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes
of caching between DNS Firewall and the upstream servers. Lower TTLs will be
increased to the minimum defined here for caching purposes.
- name: DNS Firewall cluster name
+ name: DNS Firewall Cluster Name.
- negative_cache_ttl: Negative DNS cache TTL This setting controls how long DNS Firewall should cache
+ negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache
negative responses (e.g., NXDOMAIN) from the upstream servers.
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
retries: Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
extra_headers: Send extra headers
@@ -707,7 +707,7 @@ async def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FirewallGetResponse]:
"""
- Show a single DNS Firewall cluster for an account
+ Show a single configured DNS Firewall cluster for an account.
Args:
account_id: Identifier
diff --git a/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py b/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py
index 6f5dd9132522..15cb326386f6 100644
--- a/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py
+++ b/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py
@@ -71,9 +71,9 @@ def get(
produced.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
extra_headers: Send extra headers
@@ -141,9 +141,9 @@ async def get(
produced.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/event_notifications/r2/configuration/queues.py b/src/cloudflare/resources/event_notifications/r2/configuration/queues.py
index 76d0dc352189..bd59dc69311d 100644
--- a/src/cloudflare/resources/event_notifications/r2/configuration/queues.py
+++ b/src/cloudflare/resources/event_notifications/r2/configuration/queues.py
@@ -67,11 +67,11 @@ def update(
production.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
rules: Array of rules to drive notifications
@@ -121,11 +121,11 @@ def delete(
further notifications will be produced for the queue once complete.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -198,11 +198,11 @@ async def update(
production.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
rules: Array of rules to drive notifications
@@ -252,11 +252,11 @@ async def delete(
further notifications will be produced for the queue once complete.
Args:
- account_id: Identifier.
+ account_id: Identifier
- bucket_name: Identifier.
+ bucket_name: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py
index f2816075a6a1..faa9ba09c90d 100644
--- a/src/cloudflare/resources/intel/attack_surface_report/issues.py
+++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Type, Optional, cast
+from typing import Any, List, Type, Optional, cast
import httpx
@@ -212,7 +212,7 @@ def dismiss(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueDismissResponse:
+ ) -> Optional[IssueDismissResponse]:
"""
Archive Security Center Insight
@@ -231,13 +231,22 @@ def dismiss(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not issue_id:
raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
- return self._put(
- f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
- body=maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ return cast(
+ Optional[IssueDismissResponse],
+ self._put(
+ f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
+ body=maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[IssueDismissResponse]
+ ), # Union types cannot be passed in as arguments in the type system
),
- cast_to=IssueDismissResponse,
)
def severity(
@@ -545,7 +554,7 @@ async def dismiss(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueDismissResponse:
+ ) -> Optional[IssueDismissResponse]:
"""
Archive Security Center Insight
@@ -564,13 +573,22 @@ async def dismiss(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not issue_id:
raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
- return await self._put(
- f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
- body=await async_maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ return cast(
+ Optional[IssueDismissResponse],
+ await self._put(
+ f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
+ body=await async_maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[IssueDismissResponse]
+ ), # Union types cannot be passed in as arguments in the type system
),
- cast_to=IssueDismissResponse,
)
async def severity(
diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py
index 84ed73dcb0c3..a5d9be0726b1 100644
--- a/src/cloudflare/resources/kv/namespaces/values.py
+++ b/src/cloudflare/resources/kv/namespaces/values.py
@@ -104,6 +104,10 @@ def update(
raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}")
if not key_name:
raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}")
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}",
body=maybe_transform(
@@ -298,6 +302,10 @@ async def update(
raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}")
if not key_name:
raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}")
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}",
body=await async_maybe_transform(
diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py
index 81996968348d..b66a9a4d5c9f 100644
--- a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py
+++ b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Type, Iterable, cast
+from typing import Type, cast
import httpx
@@ -63,10 +63,7 @@ def create(
self,
*,
account_id: str,
- default_sampling: float,
- name: str,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_create_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -78,11 +75,6 @@ def create(
Create a new network monitoring configuration.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -95,15 +87,7 @@ def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._post(
f"/accounts/{account_id}/mnm/config",
- body=maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_create_params.ConfigCreateParams,
- ),
+ body=maybe_transform(body, config_create_params.ConfigCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -118,10 +102,7 @@ def update(
self,
*,
account_id: str,
- default_sampling: float,
- name: str,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_update_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -134,11 +115,6 @@ def update(
configuration to be updated at once.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -151,15 +127,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._put(
f"/accounts/{account_id}/mnm/config",
- body=maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_update_params.ConfigUpdateParams,
- ),
+ body=maybe_transform(body, config_update_params.ConfigUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -211,10 +179,7 @@ def edit(
self,
*,
account_id: str,
- default_sampling: float | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_edit_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -226,11 +191,6 @@ def edit(
Update fields in an existing network monitoring configuration.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -243,15 +203,7 @@ def edit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._patch(
f"/accounts/{account_id}/mnm/config",
- body=maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_edit_params.ConfigEditParams,
- ),
+ body=maybe_transform(body, config_edit_params.ConfigEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -274,7 +226,7 @@ def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Configuration:
"""
- Lists default sampling, router IPs and warp devices for account.
+ Lists default sampling and router IPs for account.
Args:
extra_headers: Send extra headers
@@ -328,10 +280,7 @@ async def create(
self,
*,
account_id: str,
- default_sampling: float,
- name: str,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_create_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -343,11 +292,6 @@ async def create(
Create a new network monitoring configuration.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -360,15 +304,7 @@ async def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._post(
f"/accounts/{account_id}/mnm/config",
- body=await async_maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_create_params.ConfigCreateParams,
- ),
+ body=await async_maybe_transform(body, config_create_params.ConfigCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -383,10 +319,7 @@ async def update(
self,
*,
account_id: str,
- default_sampling: float,
- name: str,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_update_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -399,11 +332,6 @@ async def update(
configuration to be updated at once.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -416,15 +344,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._put(
f"/accounts/{account_id}/mnm/config",
- body=await async_maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_update_params.ConfigUpdateParams,
- ),
+ body=await async_maybe_transform(body, config_update_params.ConfigUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -476,10 +396,7 @@ async def edit(
self,
*,
account_id: str,
- default_sampling: float | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- router_ips: List[str] | NotGiven = NOT_GIVEN,
- warp_devices: Iterable[config_edit_params.WARPDevice] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -491,11 +408,6 @@ async def edit(
Update fields in an existing network monitoring configuration.
Args:
- default_sampling: Fallback sampling rate of flow messages being sent in packets per second. This
- should match the packet sampling rate configured on the router.
-
- name: The account name.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -508,15 +420,7 @@ async def edit(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._patch(
f"/accounts/{account_id}/mnm/config",
- body=await async_maybe_transform(
- {
- "default_sampling": default_sampling,
- "name": name,
- "router_ips": router_ips,
- "warp_devices": warp_devices,
- },
- config_edit_params.ConfigEditParams,
- ),
+ body=await async_maybe_transform(body, config_edit_params.ConfigEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -539,7 +443,7 @@ async def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Configuration:
"""
- Lists default sampling, router IPs and warp devices for account.
+ Lists default sampling and router IPs for account.
Args:
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/full.py b/src/cloudflare/resources/magic_network_monitoring/configs/full.py
index bdfd8e8bbf6a..dd1520aad82e 100644
--- a/src/cloudflare/resources/magic_network_monitoring/configs/full.py
+++ b/src/cloudflare/resources/magic_network_monitoring/configs/full.py
@@ -54,7 +54,7 @@ def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Configuration:
"""
- Lists default sampling, router IPs, warp devices, and rules for account.
+ Lists default sampling, router IPs, and rules for account.
Args:
extra_headers: Send extra headers
@@ -112,7 +112,7 @@ async def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Configuration:
"""
- Lists default sampling, router IPs, warp devices, and rules for account.
+ Lists default sampling, router IPs, and rules for account.
Args:
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
index 80062c1b4871..db06768dcbe5 100644
--- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
+++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Type, Optional, cast
+from typing import Type, Optional, cast
import httpx
@@ -64,12 +64,7 @@ def create(
self,
*,
account_id: str,
- duration: str,
- name: str,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -83,26 +78,6 @@ def create(
single rule per API request.
Args:
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -115,17 +90,7 @@ def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._post(
f"/accounts/{account_id}/mnm/rules",
- body=maybe_transform(
- {
- "duration": duration,
- "name": name,
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_create_params.RuleCreateParams,
- ),
+ body=maybe_transform(body, rule_create_params.RuleCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -140,13 +105,7 @@ def update(
self,
*,
account_id: str,
- duration: str,
- name: str,
- id: str | NotGiven = NOT_GIVEN,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -158,28 +117,6 @@ def update(
Update network monitoring rules for account.
Args:
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- id: The id of the rule. Must be unique.
-
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -192,18 +129,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._put(
f"/accounts/{account_id}/mnm/rules",
- body=maybe_transform(
- {
- "duration": duration,
- "name": name,
- "id": id,
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_update_params.RuleUpdateParams,
- ),
+ body=maybe_transform(body, rule_update_params.RuleUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -295,12 +221,7 @@ def edit(
rule_id: str,
*,
account_id: str,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- duration: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -314,26 +235,6 @@ def edit(
Args:
rule_id: The id of the rule. Must be unique.
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -348,17 +249,7 @@ def edit(
raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}")
return self._patch(
f"/accounts/{account_id}/mnm/rules/{rule_id}",
- body=maybe_transform(
- {
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "duration": duration,
- "name": name,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_edit_params.RuleEditParams,
- ),
+ body=maybe_transform(body, rule_edit_params.RuleEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -440,12 +331,7 @@ async def create(
self,
*,
account_id: str,
- duration: str,
- name: str,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -459,26 +345,6 @@ async def create(
single rule per API request.
Args:
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -491,17 +357,7 @@ async def create(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._post(
f"/accounts/{account_id}/mnm/rules",
- body=await async_maybe_transform(
- {
- "duration": duration,
- "name": name,
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_create_params.RuleCreateParams,
- ),
+ body=await async_maybe_transform(body, rule_create_params.RuleCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -516,13 +372,7 @@ async def update(
self,
*,
account_id: str,
- duration: str,
- name: str,
- id: str | NotGiven = NOT_GIVEN,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -534,28 +384,6 @@ async def update(
Update network monitoring rules for account.
Args:
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- id: The id of the rule. Must be unique.
-
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -568,18 +396,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._put(
f"/accounts/{account_id}/mnm/rules",
- body=await async_maybe_transform(
- {
- "duration": duration,
- "name": name,
- "id": id,
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_update_params.RuleUpdateParams,
- ),
+ body=await async_maybe_transform(body, rule_update_params.RuleUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -671,12 +488,7 @@ async def edit(
rule_id: str,
*,
account_id: str,
- automatic_advertisement: Optional[bool] | NotGiven = NOT_GIVEN,
- bandwidth: float | NotGiven = NOT_GIVEN,
- duration: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- packet_threshold: float | NotGiven = NOT_GIVEN,
- prefixes: List[str] | NotGiven = NOT_GIVEN,
+ body: object,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -690,26 +502,6 @@ async def edit(
Args:
rule_id: The id of the rule. Must be unique.
- automatic_advertisement: Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
-
- bandwidth: The number of bits per second for the rule. When this value is exceeded for the
- set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
- duration: The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
-
- name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
- underscore (\\__), dash (-), period (.), and tilde (~). You can’t have a space in
- the rule name. Max 256 characters.
-
- packet_threshold: The number of packets per second for the rule. When this value is exceeded for
- the set duration, an alert notification is sent. Minimum of 1 and no maximum.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -724,17 +516,7 @@ async def edit(
raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}")
return await self._patch(
f"/accounts/{account_id}/mnm/rules/{rule_id}",
- body=await async_maybe_transform(
- {
- "automatic_advertisement": automatic_advertisement,
- "bandwidth": bandwidth,
- "duration": duration,
- "name": name,
- "packet_threshold": packet_threshold,
- "prefixes": prefixes,
- },
- rule_edit_params.RuleEditParams,
- ),
+ body=await async_maybe_transform(body, rule_edit_params.RuleEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/page_shield/connections.py b/src/cloudflare/resources/page_shield/connections.py
index c18a2ffc6f2b..832e2d394e4c 100644
--- a/src/cloudflare/resources/page_shield/connections.py
+++ b/src/cloudflare/resources/page_shield/connections.py
@@ -83,7 +83,8 @@ def list(
exclude_urls: Excludes connections whose URL contains one of the URL-encoded URLs separated by
commas.
- export: Export the list of connections as a file.
+ export: Export the list of connections as a file. Cannot be used with per_page or page
+ options.
hosts: Includes connections that match one or more URL-encoded hostnames separated by
commas.
@@ -97,9 +98,10 @@ def list(
page: The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the connections with the applied filters in a single page. This
- feature is best-effort and it may only work for zones with a low number of
- connections
+ return all the connections with the applied filters in a single page.
+ Additionally, when using this value, the API will not return the categorisation
+ data for the URL and domain of the connections. This feature is best-effort and
+ it may only work for zones with a low number of connections
page_url: Includes connections that match one or more page URLs (separated by commas)
where they were last seen
@@ -260,7 +262,8 @@ def list(
exclude_urls: Excludes connections whose URL contains one of the URL-encoded URLs separated by
commas.
- export: Export the list of connections as a file.
+ export: Export the list of connections as a file. Cannot be used with per_page or page
+ options.
hosts: Includes connections that match one or more URL-encoded hostnames separated by
commas.
@@ -274,9 +277,10 @@ def list(
page: The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the connections with the applied filters in a single page. This
- feature is best-effort and it may only work for zones with a low number of
- connections
+ return all the connections with the applied filters in a single page.
+ Additionally, when using this value, the API will not return the categorisation
+ data for the URL and domain of the connections. This feature is best-effort and
+ it may only work for zones with a low number of connections
page_url: Includes connections that match one or more page URLs (separated by commas)
where they were last seen
diff --git a/src/cloudflare/resources/page_shield/cookies.py b/src/cloudflare/resources/page_shield/cookies.py
index 8250d18ce36e..0c9b467e5c54 100644
--- a/src/cloudflare/resources/page_shield/cookies.py
+++ b/src/cloudflare/resources/page_shield/cookies.py
@@ -82,7 +82,8 @@ def list(
domain: Filters the returned cookies that match the specified domain attribute
- export: Export the list of cookies as a file.
+ export: Export the list of cookies as a file. Cannot be used with per_page or page
+ options.
hosts: Includes cookies that match one or more URL-encoded hostnames separated by
commas.
@@ -101,10 +102,6 @@ def list(
page: The current page number of the paginated results.
- We additionally support a special value "all". When "all" is used, the API will
- return all the cookies with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of cookies
-
page_url: Includes connections that match one or more page URLs (separated by commas)
where they were last seen
@@ -263,7 +260,8 @@ def list(
domain: Filters the returned cookies that match the specified domain attribute
- export: Export the list of cookies as a file.
+ export: Export the list of cookies as a file. Cannot be used with per_page or page
+ options.
hosts: Includes cookies that match one or more URL-encoded hostnames separated by
commas.
@@ -282,10 +280,6 @@ def list(
page: The current page number of the paginated results.
- We additionally support a special value "all". When "all" is used, the API will
- return all the cookies with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of cookies
-
page_url: Includes connections that match one or more page URLs (separated by commas)
where they were last seen
diff --git a/src/cloudflare/resources/page_shield/scripts.py b/src/cloudflare/resources/page_shield/scripts.py
index 2a3f630ba23d..f5eb34e98011 100644
--- a/src/cloudflare/resources/page_shield/scripts.py
+++ b/src/cloudflare/resources/page_shield/scripts.py
@@ -90,7 +90,8 @@ def list(
exclude_urls: Excludes scripts whose URL contains one of the URL-encoded URLs separated by
commas.
- export: Export the list of scripts as a file.
+ export: Export the list of scripts as a file. Cannot be used with per_page or page
+ options.
hosts: Includes scripts that match one or more URL-encoded hostnames separated by
commas.
@@ -104,8 +105,10 @@ def list(
page: The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the scripts with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of scripts
+ return all the scripts with the applied filters in a single page. Additionally,
+ when using this value, the API will not return the script versions or
+ categorisation data for the URL and domain of the scripts. This feature is
+ best-effort and it may only work for zones with a low number of scripts
page_url: Includes scripts that match one or more page URLs (separated by commas) where
they were last seen
@@ -273,7 +276,8 @@ def list(
exclude_urls: Excludes scripts whose URL contains one of the URL-encoded URLs separated by
commas.
- export: Export the list of scripts as a file.
+ export: Export the list of scripts as a file. Cannot be used with per_page or page
+ options.
hosts: Includes scripts that match one or more URL-encoded hostnames separated by
commas.
@@ -287,8 +291,10 @@ def list(
page: The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the scripts with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of scripts
+ return all the scripts with the applied filters in a single page. Additionally,
+ when using this value, the API will not return the script versions or
+ categorisation data for the URL and domain of the scripts. This feature is
+ best-effort and it may only work for zones with a low number of scripts
page_url: Includes scripts that match one or more page URLs (separated by commas) where
they were last seen
diff --git a/src/cloudflare/resources/queues/consumers.py b/src/cloudflare/resources/queues/consumers.py
index daae51d8e5b3..ccb4a88fdc5c 100644
--- a/src/cloudflare/resources/queues/consumers.py
+++ b/src/cloudflare/resources/queues/consumers.py
@@ -67,9 +67,9 @@ def create(
Creates a new consumer for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -114,11 +114,11 @@ def update(
Updates the consumer for a queue, or creates one if it does not exist.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
- consumer_id: Identifier.
+ consumer_id: Identifier
extra_headers: Send extra headers
@@ -164,11 +164,11 @@ def delete(
Deletes the consumer for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
- consumer_id: Identifier.
+ consumer_id: Identifier
extra_headers: Send extra headers
@@ -217,9 +217,9 @@ def get(
Returns the consumers for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -283,9 +283,9 @@ async def create(
Creates a new consumer for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -330,11 +330,11 @@ async def update(
Updates the consumer for a queue, or creates one if it does not exist.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
- consumer_id: Identifier.
+ consumer_id: Identifier
extra_headers: Send extra headers
@@ -380,11 +380,11 @@ async def delete(
Deletes the consumer for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
- consumer_id: Identifier.
+ consumer_id: Identifier
extra_headers: Send extra headers
@@ -433,9 +433,9 @@ async def get(
Returns the consumers for a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/queues/messages.py b/src/cloudflare/resources/queues/messages.py
index 3438d6f04225..faabf0485655 100644
--- a/src/cloudflare/resources/queues/messages.py
+++ b/src/cloudflare/resources/queues/messages.py
@@ -66,9 +66,9 @@ def ack(
Acknowledge + Retry messages from a Queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -119,9 +119,9 @@ def pull(
Pull a batch of messages from a Queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
batch_size: The maximum number of messages to include in a batch.
@@ -198,9 +198,9 @@ async def ack(
Acknowledge + Retry messages from a Queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -251,9 +251,9 @@ async def pull(
Pull a batch of messages from a Queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
batch_size: The maximum number of messages to include in a batch.
diff --git a/src/cloudflare/resources/queues/queues.py b/src/cloudflare/resources/queues/queues.py
index 44423332450b..0e0a8180de37 100644
--- a/src/cloudflare/resources/queues/queues.py
+++ b/src/cloudflare/resources/queues/queues.py
@@ -91,7 +91,7 @@ def create(
Creates a new queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
extra_headers: Send extra headers
@@ -133,9 +133,9 @@ def update(
Updates a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -177,7 +177,7 @@ def list(
Returns the queues owned by an account.
Args:
- account_id: Identifier.
+ account_id: Identifier
extra_headers: Send extra headers
@@ -214,9 +214,9 @@ def delete(
Deletes a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -263,9 +263,9 @@ def get(
Get information about a specific queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -336,7 +336,7 @@ async def create(
Creates a new queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
extra_headers: Send extra headers
@@ -378,9 +378,9 @@ async def update(
Updates a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -422,7 +422,7 @@ def list(
Returns the queues owned by an account.
Args:
- account_id: Identifier.
+ account_id: Identifier
extra_headers: Send extra headers
@@ -459,9 +459,9 @@ async def delete(
Deletes a queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
@@ -508,9 +508,9 @@ async def get(
Get information about a specific queue.
Args:
- account_id: Identifier.
+ account_id: Identifier
- queue_id: Identifier.
+ queue_id: Identifier
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/r2/domains/custom.py b/src/cloudflare/resources/r2/domains/custom.py
index 8e8b84785d8c..101628f507e3 100755
--- a/src/cloudflare/resources/r2/domains/custom.py
+++ b/src/cloudflare/resources/r2/domains/custom.py
@@ -3,7 +3,6 @@
from __future__ import annotations
from typing import Type, cast
-from typing_extensions import Literal
import httpx
@@ -59,7 +58,6 @@ def create(
domain: str,
zone_id: str,
enabled: bool | NotGiven = NOT_GIVEN,
- min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -82,9 +80,6 @@ def create(
enabled: Whether to enable public bucket access at the custom domain. If undefined, the
domain will be enabled.
- min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
- not set, defaults to 1.0.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -104,7 +99,6 @@ def create(
"domain": domain,
"zone_id": zone_id,
"enabled": enabled,
- "min_tls": min_tls,
},
custom_create_params.CustomCreateParams,
),
@@ -125,7 +119,6 @@ def update(
account_id: str,
bucket_name: str,
enabled: bool | NotGiven = NOT_GIVEN,
- min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -145,9 +138,6 @@ def update(
enabled: Whether to enable public bucket access at the specified custom domain
- min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
- not set, defaults to previous value.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -164,13 +154,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `domain_name` but received {domain_name!r}")
return self._put(
f"/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain_name}",
- body=maybe_transform(
- {
- "enabled": enabled,
- "min_tls": min_tls,
- },
- custom_update_params.CustomUpdateParams,
- ),
+ body=maybe_transform({"enabled": enabled}, custom_update_params.CustomUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -303,7 +287,6 @@ async def create(
domain: str,
zone_id: str,
enabled: bool | NotGiven = NOT_GIVEN,
- min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -326,9 +309,6 @@ async def create(
enabled: Whether to enable public bucket access at the custom domain. If undefined, the
domain will be enabled.
- min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
- not set, defaults to 1.0.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -348,7 +328,6 @@ async def create(
"domain": domain,
"zone_id": zone_id,
"enabled": enabled,
- "min_tls": min_tls,
},
custom_create_params.CustomCreateParams,
),
@@ -369,7 +348,6 @@ async def update(
account_id: str,
bucket_name: str,
enabled: bool | NotGiven = NOT_GIVEN,
- min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -389,9 +367,6 @@ async def update(
enabled: Whether to enable public bucket access at the specified custom domain
- min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
- not set, defaults to previous value.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -408,13 +383,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `domain_name` but received {domain_name!r}")
return await self._put(
f"/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain_name}",
- body=await async_maybe_transform(
- {
- "enabled": enabled,
- "min_tls": min_tls,
- },
- custom_update_params.CustomUpdateParams,
- ),
+ body=await async_maybe_transform({"enabled": enabled}, custom_update_params.CustomUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/user/audit_logs.py b/src/cloudflare/resources/user/audit_logs.py
index b6829de3650b..9d25892c1aa9 100644
--- a/src/cloudflare/resources/user/audit_logs.py
+++ b/src/cloudflare/resources/user/audit_logs.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Union
-from datetime import date, datetime
+from datetime import datetime
from typing_extensions import Literal
import httpx
@@ -52,13 +52,13 @@ def list(
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
- before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ before: Union[str, datetime] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ since: Union[str, datetime] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -75,8 +75,8 @@ def list(
Args:
id: Finds a specific log by its ID.
- before: Limits the returned results to logs older than the specified date. A `full-date`
- that conforms to RFC3339.
+ before: Limits the returned results to logs older than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
direction: Changes the direction of the chronological sorting.
@@ -88,8 +88,8 @@ def list(
per_page: Sets the number of results to return per page.
- since: Limits the returned results to logs newer than the specified date. A `full-date`
- that conforms to RFC3339.
+ since: Limits the returned results to logs newer than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
extra_headers: Send extra headers
@@ -154,13 +154,13 @@ def list(
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
- before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ before: Union[str, datetime] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
- since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
+ since: Union[str, datetime] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -177,8 +177,8 @@ def list(
Args:
id: Finds a specific log by its ID.
- before: Limits the returned results to logs older than the specified date. A `full-date`
- that conforms to RFC3339.
+ before: Limits the returned results to logs older than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
direction: Changes the direction of the chronological sorting.
@@ -190,8 +190,8 @@ def list(
per_page: Sets the number of results to return per page.
- since: Limits the returned results to logs newer than the specified date. A `full-date`
- that conforms to RFC3339.
+ since: Limits the returned results to logs newer than the specified date. This can be a
+ date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py
index 781be8f801ea..5489e20c865f 100644
--- a/src/cloudflare/resources/workers/ai/ai.py
+++ b/src/cloudflare/resources/workers/ai/ai.py
@@ -186,8 +186,6 @@ def run(
*,
account_id: str,
audio: Iterable[float],
- source_lang: str | NotGiven = NOT_GIVEN,
- target_lang: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -527,8 +525,6 @@ def run(
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
audio: Iterable[float] | NotGiven = NOT_GIVEN,
- source_lang: str | NotGiven = NOT_GIVEN,
- target_lang: str | NotGiven = NOT_GIVEN,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
@@ -542,6 +538,8 @@ def run(
messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.Variant7Function] | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN,
+ target_lang: str | NotGiven = NOT_GIVEN,
+ source_lang: str | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -574,8 +572,6 @@ def run(
"strength": strength,
"width": width,
"audio": audio,
- "source_lang": source_lang,
- "target_lang": target_lang,
"frequency_penalty": frequency_penalty,
"lora": lora,
"max_tokens": max_tokens,
@@ -589,6 +585,8 @@ def run(
"messages": messages,
"functions": functions,
"tools": tools,
+ "target_lang": target_lang,
+ "source_lang": source_lang,
"input_text": input_text,
"max_length": max_length,
},
@@ -757,8 +755,6 @@ async def run(
*,
account_id: str,
audio: Iterable[float],
- source_lang: str | NotGiven = NOT_GIVEN,
- target_lang: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1098,8 +1094,6 @@ async def run(
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
audio: Iterable[float] | NotGiven = NOT_GIVEN,
- source_lang: str | NotGiven = NOT_GIVEN,
- target_lang: str | NotGiven = NOT_GIVEN,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
@@ -1113,6 +1107,8 @@ async def run(
messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.Variant7Function] | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN,
+ target_lang: str | NotGiven = NOT_GIVEN,
+ source_lang: str | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1145,8 +1141,6 @@ async def run(
"strength": strength,
"width": width,
"audio": audio,
- "source_lang": source_lang,
- "target_lang": target_lang,
"frequency_penalty": frequency_penalty,
"lora": lora,
"max_tokens": max_tokens,
@@ -1160,6 +1154,8 @@ async def run(
"messages": messages,
"functions": functions,
"tools": tools,
+ "target_lang": target_lang,
+ "source_lang": source_lang,
"input_text": input_text,
"max_length": max_length,
},
diff --git a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py
index c02ac6559f6d..23a9aef9004d 100644
--- a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py
+++ b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py
@@ -57,9 +57,7 @@ def create(
config: integration_create_params.Config,
interval: str,
name: str,
- type: Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ],
+ type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -200,9 +198,7 @@ def edit(
config: integration_edit_params.Config | NotGiven = NOT_GIVEN,
interval: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
- type: Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ]
+ type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -329,9 +325,7 @@ async def create(
config: integration_create_params.Config,
interval: str,
name: str,
- type: Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ],
+ type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -472,9 +466,7 @@ async def edit(
config: integration_edit_params.Config | NotGiven = NOT_GIVEN,
interval: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
- type: Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ]
+ type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
diff --git a/src/cloudflare/resources/zero_trust/devices/posture/posture.py b/src/cloudflare/resources/zero_trust/devices/posture/posture.py
index ada32cf3d5d3..29f1f980f032 100644
--- a/src/cloudflare/resources/zero_trust/devices/posture/posture.py
+++ b/src/cloudflare/resources/zero_trust/devices/posture/posture.py
@@ -90,7 +90,6 @@ def create(
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
],
description: str | NotGiven = NOT_GIVEN,
expiration: str | NotGiven = NOT_GIVEN,
@@ -185,7 +184,6 @@ def update(
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
],
description: str | NotGiven = NOT_GIVEN,
expiration: str | NotGiven = NOT_GIVEN,
@@ -426,7 +424,6 @@ async def create(
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
],
description: str | NotGiven = NOT_GIVEN,
expiration: str | NotGiven = NOT_GIVEN,
@@ -521,7 +518,6 @@ async def update(
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
],
description: str | NotGiven = NOT_GIVEN,
expiration: str | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/zero_trust/dex/tests/tests.py b/src/cloudflare/resources/zero_trust/dex/tests/tests.py
index 2160115eff8d..c2c0314d3d37 100644
--- a/src/cloudflare/resources/zero_trust/dex/tests/tests.py
+++ b/src/cloudflare/resources/zero_trust/dex/tests/tests.py
@@ -2,8 +2,21 @@
from __future__ import annotations
+from typing import List
+
+import httpx
+
+from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ....._utils import maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
+from ....._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from .....pagination import SyncV4PagePagination, AsyncV4PagePagination
from .unique_devices import (
UniqueDevicesResource,
AsyncUniqueDevicesResource,
@@ -12,6 +25,9 @@
UniqueDevicesResourceWithStreamingResponse,
AsyncUniqueDevicesResourceWithStreamingResponse,
)
+from ....._base_client import AsyncPaginator, make_request_options
+from .....types.zero_trust.dex import test_list_params
+from .....types.zero_trust.dex.test_list_response import TestListResponse
__all__ = ["TestsResource", "AsyncTestsResource"]
@@ -42,6 +58,70 @@ def with_streaming_response(self) -> TestsResourceWithStreamingResponse:
"""
return TestsResourceWithStreamingResponse(self)
+ def list(
+ self,
+ *,
+ account_id: str,
+ colo: str | NotGiven = NOT_GIVEN,
+ device_id: List[str] | NotGiven = NOT_GIVEN,
+ page: float | NotGiven = NOT_GIVEN,
+ per_page: float | NotGiven = NOT_GIVEN,
+ test_name: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> SyncV4PagePagination[TestListResponse]:
+ """
+ List DEX tests
+
+ Args:
+ colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
+ combination with deviceId param.
+
+ device_id: Optionally filter result stats to a specific device(s). Cannot be used in
+ combination with colo param.
+
+ page: Page number of paginated results
+
+ per_page: Number of items per page
+
+ test_name: Optionally filter results by test 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._get_api_list(
+ f"/accounts/{account_id}/dex/tests",
+ page=SyncV4PagePagination[TestListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "colo": colo,
+ "device_id": device_id,
+ "page": page,
+ "per_page": per_page,
+ "test_name": test_name,
+ },
+ test_list_params.TestListParams,
+ ),
+ ),
+ model=TestListResponse,
+ )
+
class AsyncTestsResource(AsyncAPIResource):
@cached_property
@@ -67,6 +147,70 @@ def with_streaming_response(self) -> AsyncTestsResourceWithStreamingResponse:
"""
return AsyncTestsResourceWithStreamingResponse(self)
+ def list(
+ self,
+ *,
+ account_id: str,
+ colo: str | NotGiven = NOT_GIVEN,
+ device_id: List[str] | NotGiven = NOT_GIVEN,
+ page: float | NotGiven = NOT_GIVEN,
+ per_page: float | NotGiven = NOT_GIVEN,
+ test_name: str | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> AsyncPaginator[TestListResponse, AsyncV4PagePagination[TestListResponse]]:
+ """
+ List DEX tests
+
+ Args:
+ colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
+ combination with deviceId param.
+
+ device_id: Optionally filter result stats to a specific device(s). Cannot be used in
+ combination with colo param.
+
+ page: Page number of paginated results
+
+ per_page: Number of items per page
+
+ test_name: Optionally filter results by test 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._get_api_list(
+ f"/accounts/{account_id}/dex/tests",
+ page=AsyncV4PagePagination[TestListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "colo": colo,
+ "device_id": device_id,
+ "page": page,
+ "per_page": per_page,
+ "test_name": test_name,
+ },
+ test_list_params.TestListParams,
+ ),
+ ),
+ model=TestListResponse,
+ )
+
class TestsResourceWithRawResponse:
__test__ = False
@@ -74,6 +218,10 @@ class TestsResourceWithRawResponse:
def __init__(self, tests: TestsResource) -> None:
self._tests = tests
+ self.list = to_raw_response_wrapper(
+ tests.list,
+ )
+
@cached_property
def unique_devices(self) -> UniqueDevicesResourceWithRawResponse:
return UniqueDevicesResourceWithRawResponse(self._tests.unique_devices)
@@ -83,6 +231,10 @@ class AsyncTestsResourceWithRawResponse:
def __init__(self, tests: AsyncTestsResource) -> None:
self._tests = tests
+ self.list = async_to_raw_response_wrapper(
+ tests.list,
+ )
+
@cached_property
def unique_devices(self) -> AsyncUniqueDevicesResourceWithRawResponse:
return AsyncUniqueDevicesResourceWithRawResponse(self._tests.unique_devices)
@@ -94,6 +246,10 @@ class TestsResourceWithStreamingResponse:
def __init__(self, tests: TestsResource) -> None:
self._tests = tests
+ self.list = to_streamed_response_wrapper(
+ tests.list,
+ )
+
@cached_property
def unique_devices(self) -> UniqueDevicesResourceWithStreamingResponse:
return UniqueDevicesResourceWithStreamingResponse(self._tests.unique_devices)
@@ -103,6 +259,10 @@ class AsyncTestsResourceWithStreamingResponse:
def __init__(self, tests: AsyncTestsResource) -> None:
self._tests = tests
+ self.list = async_to_streamed_response_wrapper(
+ tests.list,
+ )
+
@cached_property
def unique_devices(self) -> AsyncUniqueDevicesResourceWithStreamingResponse:
return AsyncUniqueDevicesResourceWithStreamingResponse(self._tests.unique_devices)
diff --git a/src/cloudflare/resources/zero_trust/dlp/patterns.py b/src/cloudflare/resources/zero_trust/dlp/patterns.py
index ce00309a7a68..8def18508c6e 100644
--- a/src/cloudflare/resources/zero_trust/dlp/patterns.py
+++ b/src/cloudflare/resources/zero_trust/dlp/patterns.py
@@ -52,7 +52,6 @@ def validate(
*,
account_id: str,
regex: str,
- max_match_bytes: Optional[int] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -68,16 +67,6 @@ def validate(
characters that can be matched using a range, e.g. `{1,100}`.
Args:
- max_match_bytes: Maximum number of bytes that the regular expression can match.
-
- If this is `null` then there is no limit on the length. Patterns can use `*` and
- `+`. Otherwise repeats should use a range `{m,n}` to restrict patterns to the
- length. If this field is missing, then a default length limit is used.
-
- Note that the length is specified in bytes. Since regular expressions use UTF-8
- the pattern `.` can match up to 4 bytes. Hence `.{1,256}` has a maximum length
- of 1024 bytes.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -90,13 +79,7 @@ def validate(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._post(
f"/accounts/{account_id}/dlp/patterns/validate",
- body=maybe_transform(
- {
- "regex": regex,
- "max_match_bytes": max_match_bytes,
- },
- pattern_validate_params.PatternValidateParams,
- ),
+ body=maybe_transform({"regex": regex}, pattern_validate_params.PatternValidateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -133,7 +116,6 @@ async def validate(
*,
account_id: str,
regex: str,
- max_match_bytes: Optional[int] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -149,16 +131,6 @@ async def validate(
characters that can be matched using a range, e.g. `{1,100}`.
Args:
- max_match_bytes: Maximum number of bytes that the regular expression can match.
-
- If this is `null` then there is no limit on the length. Patterns can use `*` and
- `+`. Otherwise repeats should use a range `{m,n}` to restrict patterns to the
- length. If this field is missing, then a default length limit is used.
-
- Note that the length is specified in bytes. Since regular expressions use UTF-8
- the pattern `.` can match up to 4 bytes. Hence `.{1,256}` has a maximum length
- of 1024 bytes.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -171,13 +143,7 @@ async def validate(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return await self._post(
f"/accounts/{account_id}/dlp/patterns/validate",
- body=await async_maybe_transform(
- {
- "regex": regex,
- "max_match_bytes": max_match_bytes,
- },
- pattern_validate_params.PatternValidateParams,
- ),
+ body=await async_maybe_transform({"regex": regex}, pattern_validate_params.PatternValidateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/zones/custom_nameservers.py b/src/cloudflare/resources/zones/custom_nameservers.py
index f84778c1a382..d8312a62587b 100644
--- a/src/cloudflare/resources/zones/custom_nameservers.py
+++ b/src/cloudflare/resources/zones/custom_nameservers.py
@@ -68,9 +68,6 @@ def update(
default, use PUT /accounts/:identifier to set the account setting
use_account_custom_ns_by_default to true.
- Deprecated in favor of
- [Update DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-update-dns-settings).
-
Args:
zone_id: Identifier
@@ -117,13 +114,10 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomNameserverGetResponse:
+ ) -> Optional[CustomNameserverGetResponse]:
"""
Get metadata for account-level custom nameservers on a zone.
- Deprecated in favor of
- [Show DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-list-dns-settings).
-
Args:
zone_id: Identifier
@@ -140,9 +134,13 @@ def get(
return self._get(
f"/zones/{zone_id}/custom_ns",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper,
),
- cast_to=CustomNameserverGetResponse,
+ cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]),
)
@@ -186,9 +184,6 @@ async def update(
default, use PUT /accounts/:identifier to set the account setting
use_account_custom_ns_by_default to true.
- Deprecated in favor of
- [Update DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-update-dns-settings).
-
Args:
zone_id: Identifier
@@ -235,13 +230,10 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomNameserverGetResponse:
+ ) -> Optional[CustomNameserverGetResponse]:
"""
Get metadata for account-level custom nameservers on a zone.
- Deprecated in favor of
- [Show DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-list-dns-settings).
-
Args:
zone_id: Identifier
@@ -258,9 +250,13 @@ async def get(
return await self._get(
f"/zones/{zone_id}/custom_ns",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper,
),
- cast_to=CustomNameserverGetResponse,
+ cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]),
)
diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py b/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py
index 8819cbff0f05..02d1cae36075 100644
--- a/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py
+++ b/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py
@@ -16,7 +16,7 @@ class AIGatewayListParams(TypedDict, total=False):
order_by: str
"""Order By Column Name"""
- order_by_direction: Literal["asc", "desc"]
+ order_by_direction: Literal["ASC", "DESC"]
"""Order By Direction"""
page: int
diff --git a/src/cloudflare/types/ai_gateway/log_list_params.py b/src/cloudflare/types/ai_gateway/log_list_params.py
index 2d970728fe0e..c4dde97b35d6 100644
--- a/src/cloudflare/types/ai_gateway/log_list_params.py
+++ b/src/cloudflare/types/ai_gateway/log_list_params.py
@@ -16,33 +16,21 @@ class LogListParams(TypedDict, total=False):
cached: bool
- direction: Literal["asc", "desc"]
+ direction: Literal["asc", "desc", "ASC", "DESC"]
end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- feedback: Literal[0, 1]
-
max_cost: float
max_duration: float
- max_tokens_in: float
-
- max_tokens_out: float
-
- max_total_tokens: float
-
- meta_info: bool
+ max_tokens: float
min_cost: float
min_duration: float
- min_tokens_in: float
-
- min_tokens_out: float
-
- min_total_tokens: float
+ min_tokens: float
model: str
@@ -50,7 +38,7 @@ class LogListParams(TypedDict, total=False):
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"]
- order_by_direction: Literal["asc", "desc"]
+ order_by_direction: Literal["asc", "desc", "ASC", "DESC"]
page: int
diff --git a/src/cloudflare/types/alerting/policy.py b/src/cloudflare/types/alerting/policy.py
index 7829c7484b32..3b48a24adb62 100644
--- a/src/cloudflare/types/alerting/policy.py
+++ b/src/cloudflare/types/alerting/policy.py
@@ -53,7 +53,6 @@ class Policy(BaseModel):
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
diff --git a/src/cloudflare/types/alerting/policy_create_params.py b/src/cloudflare/types/alerting/policy_create_params.py
index 4567cd05426a..e7c4d74f3d07 100644
--- a/src/cloudflare/types/alerting/policy_create_params.py
+++ b/src/cloudflare/types/alerting/policy_create_params.py
@@ -46,7 +46,6 @@ class PolicyCreateParams(TypedDict, total=False):
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
diff --git a/src/cloudflare/types/alerting/policy_filter.py b/src/cloudflare/types/alerting/policy_filter.py
index 3f7298522795..ded3aae4888f 100644
--- a/src/cloudflare/types/alerting/policy_filter.py
+++ b/src/cloudflare/types/alerting/policy_filter.py
@@ -84,9 +84,6 @@ class PolicyFilter(BaseModel):
pool_id: Optional[List[str]] = None
"""Usage depends on specific alert type"""
- pop_name: Optional[List[str]] = None
- """Usage depends on specific alert type"""
-
product: Optional[List[str]] = None
"""Used for configuring billing_usage_alert"""
diff --git a/src/cloudflare/types/alerting/policy_filter_param.py b/src/cloudflare/types/alerting/policy_filter_param.py
index b8c1a1b764ce..79f3878deb92 100644
--- a/src/cloudflare/types/alerting/policy_filter_param.py
+++ b/src/cloudflare/types/alerting/policy_filter_param.py
@@ -80,9 +80,6 @@ class PolicyFilterParam(TypedDict, total=False):
pool_id: List[str]
"""Usage depends on specific alert type"""
- pop_name: List[str]
- """Usage depends on specific alert type"""
-
product: List[str]
"""Used for configuring billing_usage_alert"""
diff --git a/src/cloudflare/types/alerting/policy_update_params.py b/src/cloudflare/types/alerting/policy_update_params.py
index 5a7327016ab5..e36c40453e13 100644
--- a/src/cloudflare/types/alerting/policy_update_params.py
+++ b/src/cloudflare/types/alerting/policy_update_params.py
@@ -51,7 +51,6 @@ class PolicyUpdateParams(TypedDict, total=False):
"http_alert_edge_error",
"http_alert_origin_error",
"incident_alert",
- "image_notification",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"logo_match_alert",
diff --git a/src/cloudflare/types/audit_logs/audit_log_list_params.py b/src/cloudflare/types/audit_logs/audit_log_list_params.py
index 5b43966e45b9..3ad70b082c09 100644
--- a/src/cloudflare/types/audit_logs/audit_log_list_params.py
+++ b/src/cloudflare/types/audit_logs/audit_log_list_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Union
-from datetime import date, datetime
+from datetime import datetime
from typing_extensions import Literal, Required, Annotated, TypedDict
from ..._utils import PropertyInfo
@@ -22,10 +22,11 @@ class AuditLogListParams(TypedDict, total=False):
actor: Actor
- before: Annotated[Union[Union[str, date], Union[str, datetime]], PropertyInfo(format="iso8601")]
+ before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Limits the returned results to logs older than the specified date.
- A `full-date` that conforms to RFC3339.
+ This can be a date string `2019-04-30` or an absolute timestamp that conforms to
+ RFC3339.
"""
direction: Literal["desc", "asc"]
@@ -43,10 +44,11 @@ class AuditLogListParams(TypedDict, total=False):
per_page: float
"""Sets the number of results to return per page."""
- since: Annotated[Union[Union[str, date], Union[str, datetime]], PropertyInfo(format="iso8601")]
+ since: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Limits the returned results to logs newer than the specified date.
- A `full-date` that conforms to RFC3339.
+ This can be a date string `2019-04-30` or an absolute timestamp that conforms to
+ RFC3339.
"""
zone: Zone
diff --git a/src/cloudflare/types/cloudforce_one/requests/message.py b/src/cloudflare/types/cloudforce_one/requests/message.py
index ad7f423c49ed..b36882e68c46 100644
--- a/src/cloudflare/types/cloudforce_one/requests/message.py
+++ b/src/cloudflare/types/cloudforce_one/requests/message.py
@@ -19,7 +19,7 @@ class Message(BaseModel):
"""Content of message"""
is_follow_on_request: bool
- """Whether the message is a follow-on request"""
+ """Message is a follow-on request"""
updated: datetime
"""Message last updated time"""
diff --git a/src/cloudflare/types/cloudforce_one/requests/message_update_params.py b/src/cloudflare/types/cloudforce_one/requests/message_update_params.py
index 57133646a0f2..76a9b248dcfa 100644
--- a/src/cloudflare/types/cloudforce_one/requests/message_update_params.py
+++ b/src/cloudflare/types/cloudforce_one/requests/message_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
__all__ = ["MessageUpdateParams"]
@@ -15,4 +15,16 @@ class MessageUpdateParams(TypedDict, total=False):
"""UUID"""
content: str
- """Content of message"""
+ """Request content"""
+
+ priority: str
+ """Priority for analyzing the request"""
+
+ request_type: str
+ """Requested information from request"""
+
+ summary: str
+ """Brief description of the request"""
+
+ tlp: Literal["clear", "amber", "amber-strict", "green", "red"]
+ """The CISA defined Traffic Light Protocol (TLP)"""
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py
index 397b77429df0..d47976e8d284 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, List
+from typing import List
from typing_extensions import Literal, Required, TypedDict
from .dcv_method import DCVMethod
@@ -10,7 +10,7 @@
from ..shared.certificate_ca import CertificateCA
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings"]
+__all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings", "CustomMetadata"]
class CustomHostnameCreateParams(TypedDict, total=False):
@@ -23,11 +23,8 @@ class CustomHostnameCreateParams(TypedDict, total=False):
ssl: Required[SSL]
"""SSL properties used when creating the custom hostname."""
- custom_metadata: Dict[str, str]
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: CustomMetadata
+ """These are per-hostname (customer) settings."""
class SSLSettings(TypedDict, total=False):
@@ -82,3 +79,8 @@ class SSL(TypedDict, total=False):
wildcard: bool
"""Indicates whether the certificate covers a wildcard."""
+
+
+class CustomMetadata(TypedDict, total=False):
+ key: str
+ """Unique metadata for this hostname."""
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py
index 12af8a1b3103..153ae3e2e3a9 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -16,6 +16,7 @@
"SSLSettings",
"SSLValidationError",
"SSLValidationRecord",
+ "CustomMetadata",
"OwnershipVerification",
"OwnershipVerificationHTTP",
]
@@ -168,6 +169,11 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
class OwnershipVerification(BaseModel):
name: Optional[str] = None
"""DNS Name for record."""
@@ -203,11 +209,8 @@ class CustomHostnameCreateResponse(BaseModel):
created_at: Optional[datetime] = None
"""This is the time the hostname was created."""
- custom_metadata: Optional[Dict[str, str]] = None
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
custom_origin_server: Optional[str] = None
"""
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py
index 8d3a2f4787ec..52e45f8ec77f 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, List
+from typing import List
from typing_extensions import Literal, Required, TypedDict
from .dcv_method import DCVMethod
@@ -10,18 +10,15 @@
from ..shared.certificate_ca import CertificateCA
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameEditParams", "SSL", "SSLSettings"]
+__all__ = ["CustomHostnameEditParams", "CustomMetadata", "SSL", "SSLSettings"]
class CustomHostnameEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- custom_metadata: Dict[str, str]
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: CustomMetadata
+ """These are per-hostname (customer) settings."""
custom_origin_server: str
"""
@@ -42,6 +39,11 @@ class CustomHostnameEditParams(TypedDict, total=False):
"""SSL properties used when creating the custom hostname."""
+class CustomMetadata(TypedDict, total=False):
+ key: str
+ """Unique metadata for this hostname."""
+
+
class SSLSettings(TypedDict, total=False):
ciphers: List[str]
"""An allowlist of ciphers for TLS termination.
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py
index c5113d947fc5..47d17607ad4d 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -16,6 +16,7 @@
"SSLSettings",
"SSLValidationError",
"SSLValidationRecord",
+ "CustomMetadata",
"OwnershipVerification",
"OwnershipVerificationHTTP",
]
@@ -168,6 +169,11 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
class OwnershipVerification(BaseModel):
name: Optional[str] = None
"""DNS Name for record."""
@@ -203,11 +209,8 @@ class CustomHostnameEditResponse(BaseModel):
created_at: Optional[datetime] = None
"""This is the time the hostname was created."""
- custom_metadata: Optional[Dict[str, str]] = None
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
custom_origin_server: Optional[str] = None
"""
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py
index 1b418498114c..e53f5697cb56 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -16,6 +16,7 @@
"SSLSettings",
"SSLValidationError",
"SSLValidationRecord",
+ "CustomMetadata",
"OwnershipVerification",
"OwnershipVerificationHTTP",
]
@@ -168,6 +169,11 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
class OwnershipVerification(BaseModel):
name: Optional[str] = None
"""DNS Name for record."""
@@ -203,11 +209,8 @@ class CustomHostnameGetResponse(BaseModel):
created_at: Optional[datetime] = None
"""This is the time the hostname was created."""
- custom_metadata: Optional[Dict[str, str]] = None
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
custom_origin_server: Optional[str] = None
"""
diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py
index 87b99e5014f0..ef36ca77a5d2 100644
--- a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py
+++ b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -16,6 +16,7 @@
"SSLSettings",
"SSLValidationError",
"SSLValidationRecord",
+ "CustomMetadata",
"OwnershipVerification",
"OwnershipVerificationHTTP",
]
@@ -168,6 +169,11 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
class OwnershipVerification(BaseModel):
name: Optional[str] = None
"""DNS Name for record."""
@@ -203,11 +209,8 @@ class CustomHostnameListResponse(BaseModel):
created_at: Optional[datetime] = None
"""This is the time the hostname was created."""
- custom_metadata: Optional[Dict[str, str]] = None
- """Unique key/value metadata for this hostname.
-
- These are per-hostname (customer) settings.
- """
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
custom_origin_server: Optional[str] = None
"""
diff --git a/src/cloudflare/types/dns/attack_mitigation.py b/src/cloudflare/types/dns/attack_mitigation.py
index 76fca6118ca1..cfbe6224fc61 100644
--- a/src/cloudflare/types/dns/attack_mitigation.py
+++ b/src/cloudflare/types/dns/attack_mitigation.py
@@ -10,9 +10,9 @@
class AttackMitigation(BaseModel):
enabled: Optional[bool] = None
"""
- When enabled, automatically mitigate random-prefix attacks to protect upstream
- DNS servers
+ When enabled, random-prefix attacks are automatically mitigated and the upstream
+ DNS servers protected.
"""
only_when_upstream_unhealthy: Optional[bool] = None
- """Only mitigate attacks when upstream servers seem unhealthy"""
+ """Only mitigate attacks when upstream servers seem unhealthy."""
diff --git a/src/cloudflare/types/dns/attack_mitigation_param.py b/src/cloudflare/types/dns/attack_mitigation_param.py
index 9e85d0f3a793..66a854ef67e2 100644
--- a/src/cloudflare/types/dns/attack_mitigation_param.py
+++ b/src/cloudflare/types/dns/attack_mitigation_param.py
@@ -10,9 +10,9 @@
class AttackMitigationParam(TypedDict, total=False):
enabled: bool
"""
- When enabled, automatically mitigate random-prefix attacks to protect upstream
- DNS servers
+ When enabled, random-prefix attacks are automatically mitigated and the upstream
+ DNS servers protected.
"""
only_when_upstream_unhealthy: bool
- """Only mitigate attacks when upstream servers seem unhealthy"""
+ """Only mitigate attacks when upstream servers seem unhealthy."""
diff --git a/src/cloudflare/types/dns/dns_setting.py b/src/cloudflare/types/dns/dns_setting.py
index 31183e6f2a57..c96b14afb674 100644
--- a/src/cloudflare/types/dns/dns_setting.py
+++ b/src/cloudflare/types/dns/dns_setting.py
@@ -45,13 +45,6 @@ class SOA(BaseModel):
class DNSSetting(BaseModel):
- flatten_all_cnames: Optional[bool] = None
- """Whether to flatten all CNAME records in the zone.
-
- Note that, due to DNS limitations, a CNAME record at the zone apex will always
- be flattened.
- """
-
foundation_dns: Optional[bool] = None
"""Whether to enable Foundation DNS Advanced Nameservers on the zone."""
diff --git a/src/cloudflare/types/dns/dns_setting_param.py b/src/cloudflare/types/dns/dns_setting_param.py
index b818c0fd46f9..127be3c6a836 100644
--- a/src/cloudflare/types/dns/dns_setting_param.py
+++ b/src/cloudflare/types/dns/dns_setting_param.py
@@ -45,13 +45,6 @@ class SOA(TypedDict, total=False):
class DNSSettingParam(TypedDict, total=False):
- flatten_all_cnames: bool
- """Whether to flatten all CNAME records in the zone.
-
- Note that, due to DNS limitations, a CNAME record at the zone apex will always
- be flattened.
- """
-
foundation_dns: bool
"""Whether to enable Foundation DNS Advanced Nameservers on the zone."""
diff --git a/src/cloudflare/types/dns/firewall_create_params.py b/src/cloudflare/types/dns/firewall_create_params.py
index 71f3c7ed44b7..1e4df90593aa 100644
--- a/src/cloudflare/types/dns/firewall_create_params.py
+++ b/src/cloudflare/types/dns/firewall_create_params.py
@@ -16,47 +16,50 @@ class FirewallCreateParams(TypedDict, total=False):
"""Identifier"""
name: Required[str]
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
upstream_ips: Required[List[UpstreamIPs]]
attack_mitigation: Optional[AttackMitigationParam]
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
negative_cache_ttl: Optional[float]
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float]
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
diff --git a/src/cloudflare/types/dns/firewall_create_response.py b/src/cloudflare/types/dns/firewall_create_response.py
index 5130c38bc0b8..e53cdbe15156 100644
--- a/src/cloudflare/types/dns/firewall_create_response.py
+++ b/src/cloudflare/types/dns/firewall_create_response.py
@@ -16,52 +16,55 @@ class FirewallCreateResponse(BaseModel):
"""Identifier"""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
dns_firewall_ips: List[FirewallIPs]
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
modified_on: datetime
- """Last modification of DNS Firewall cluster"""
+ """Last modification of DNS Firewall cluster."""
name: str
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
negative_cache_ttl: Optional[float] = None
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float] = None
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
upstream_ips: List[UpstreamIPs]
attack_mitigation: Optional[AttackMitigation] = None
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
diff --git a/src/cloudflare/types/dns/firewall_edit_params.py b/src/cloudflare/types/dns/firewall_edit_params.py
index 3df1cfe27223..92dda2a89cad 100644
--- a/src/cloudflare/types/dns/firewall_edit_params.py
+++ b/src/cloudflare/types/dns/firewall_edit_params.py
@@ -16,47 +16,50 @@ class FirewallEditParams(TypedDict, total=False):
"""Identifier"""
attack_mitigation: Optional[AttackMitigationParam]
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
name: str
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
negative_cache_ttl: Optional[float]
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float]
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
upstream_ips: List[UpstreamIPs]
diff --git a/src/cloudflare/types/dns/firewall_edit_response.py b/src/cloudflare/types/dns/firewall_edit_response.py
index 74d5891522c2..5254a4813c20 100644
--- a/src/cloudflare/types/dns/firewall_edit_response.py
+++ b/src/cloudflare/types/dns/firewall_edit_response.py
@@ -16,52 +16,55 @@ class FirewallEditResponse(BaseModel):
"""Identifier"""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
dns_firewall_ips: List[FirewallIPs]
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
modified_on: datetime
- """Last modification of DNS Firewall cluster"""
+ """Last modification of DNS Firewall cluster."""
name: str
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
negative_cache_ttl: Optional[float] = None
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float] = None
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
upstream_ips: List[UpstreamIPs]
attack_mitigation: Optional[AttackMitigation] = None
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
diff --git a/src/cloudflare/types/dns/firewall_get_response.py b/src/cloudflare/types/dns/firewall_get_response.py
index 51f176eb01d9..186102816c32 100644
--- a/src/cloudflare/types/dns/firewall_get_response.py
+++ b/src/cloudflare/types/dns/firewall_get_response.py
@@ -16,52 +16,55 @@ class FirewallGetResponse(BaseModel):
"""Identifier"""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
dns_firewall_ips: List[FirewallIPs]
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
modified_on: datetime
- """Last modification of DNS Firewall cluster"""
+ """Last modification of DNS Firewall cluster."""
name: str
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
negative_cache_ttl: Optional[float] = None
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float] = None
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
upstream_ips: List[UpstreamIPs]
attack_mitigation: Optional[AttackMitigation] = None
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
diff --git a/src/cloudflare/types/dns/firewall_list_params.py b/src/cloudflare/types/dns/firewall_list_params.py
index 76a5067ac3e1..2e754962ef43 100644
--- a/src/cloudflare/types/dns/firewall_list_params.py
+++ b/src/cloudflare/types/dns/firewall_list_params.py
@@ -12,7 +12,7 @@ class FirewallListParams(TypedDict, total=False):
"""Identifier"""
page: float
- """Page number of paginated results"""
+ """Page number of paginated results."""
per_page: float
- """Number of clusters per page"""
+ """Number of clusters per page."""
diff --git a/src/cloudflare/types/dns/firewall_list_response.py b/src/cloudflare/types/dns/firewall_list_response.py
index 81f69bf78946..fd8c61f1ec59 100644
--- a/src/cloudflare/types/dns/firewall_list_response.py
+++ b/src/cloudflare/types/dns/firewall_list_response.py
@@ -16,52 +16,55 @@ class FirewallListResponse(BaseModel):
"""Identifier"""
deprecate_any_requests: bool
- """Whether to refuse to answer queries for the ANY type"""
+ """Deprecate the response to ANY requests."""
dns_firewall_ips: List[FirewallIPs]
ecs_fallback: bool
- """Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent"""
+ """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent."""
maximum_cache_ttl: float
- """
- Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Higher TTLs will be
- decreased to the maximum defined here for caching purposes.
+ """Maximum DNS cache TTL.
+
+ This setting sets an upper bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Higher TTLs will be decreased to the maximum
+ defined here for caching purposes.
"""
minimum_cache_ttl: float
- """
- Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
- of caching between DNS Firewall and the upstream servers. Lower TTLs will be
- increased to the minimum defined here for caching purposes.
+ """Minimum DNS cache TTL.
+
+ This setting sets a lower bound on DNS TTLs for purposes of caching between DNS
+ Firewall and the upstream servers. Lower TTLs will be increased to the minimum
+ defined here for caching purposes.
"""
modified_on: datetime
- """Last modification of DNS Firewall cluster"""
+ """Last modification of DNS Firewall cluster."""
name: str
- """DNS Firewall cluster name"""
+ """DNS Firewall Cluster Name."""
negative_cache_ttl: Optional[float] = None
- """
- Negative DNS cache TTL This setting controls how long DNS Firewall should cache
- negative responses (e.g., NXDOMAIN) from the upstream servers.
+ """Negative DNS cache TTL.
+
+ This setting controls how long DNS Firewall should cache negative responses
+ (e.g., NXDOMAIN) from the upstream servers.
"""
ratelimit: Optional[float] = None
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- the upstream nameservers configured on the cluster)
+ the upstream nameservers configured on the cluster).
"""
retries: float
"""
Number of retries for fetching DNS responses from upstream nameservers (not
- counting the initial attempt)
+ counting the initial attempt).
"""
upstream_ips: List[UpstreamIPs]
attack_mitigation: Optional[AttackMitigation] = None
- """Attack mitigation settings"""
+ """Attack mitigation settings."""
diff --git a/src/cloudflare/types/dns/nameserver.py b/src/cloudflare/types/dns/nameserver.py
index 138ec671a62f..3076da16fbda 100644
--- a/src/cloudflare/types/dns/nameserver.py
+++ b/src/cloudflare/types/dns/nameserver.py
@@ -8,5 +8,5 @@
class Nameserver(BaseModel):
- type: Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant", "custom.zone"]
+ type: Literal["cloudflare.standard"]
"""Nameserver type"""
diff --git a/src/cloudflare/types/dns/nameserver_param.py b/src/cloudflare/types/dns/nameserver_param.py
index ce2ad5c0a54e..6d73075a2ae8 100644
--- a/src/cloudflare/types/dns/nameserver_param.py
+++ b/src/cloudflare/types/dns/nameserver_param.py
@@ -8,7 +8,5 @@
class NameserverParam(TypedDict, total=False):
- type: Required[
- Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant", "custom.zone"]
- ]
+ type: Required[Literal["cloudflare.standard"]]
"""Nameserver type"""
diff --git a/src/cloudflare/types/dns/record_create_response.py b/src/cloudflare/types/dns/record_create_response.py
index 109ec74d06c8..8c78a1307ff9 100644
--- a/src/cloudflare/types/dns/record_create_response.py
+++ b/src/cloudflare/types/dns/record_create_response.py
@@ -7,7 +7,15 @@
from ..._models import BaseModel
from .record_tags import RecordTags
-__all__ = ["RecordCreateResponse"]
+__all__ = ["RecordCreateResponse", "Meta"]
+
+
+class Meta(BaseModel):
+ auto_added: Optional[bool] = None
+ """
+ Will exist if Cloudflare automatically added this DNS record during initial
+ setup.
+ """
class RecordCreateResponse(BaseModel):
@@ -20,10 +28,13 @@ class RecordCreateResponse(BaseModel):
This field has no effect on DNS responses.
"""
+ comment_modified_on: datetime
+ """When the record comment was last modified."""
+
created_on: datetime
"""When the record was created."""
- meta: object
+ meta: Meta
"""Extra Cloudflare-specific information about the record."""
modified_on: datetime
@@ -41,21 +52,15 @@ class RecordCreateResponse(BaseModel):
Cloudflare.
"""
- settings: object
- """Settings for the DNS record."""
-
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
+ tags_modified_on: datetime
+ """When the record tags were last modified."""
+
ttl: TTL
"""Time To Live (TTL) of the DNS record in seconds.
Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
minimum reduced to 30 for Enterprise zones.
"""
-
- comment_modified_on: Optional[datetime] = None
- """When the record comment was last modified. Omitted if there is no comment."""
-
- tags_modified_on: Optional[datetime] = None
- """When the record tags were last modified. Omitted if there are no tags."""
diff --git a/src/cloudflare/types/dns/record_edit_response.py b/src/cloudflare/types/dns/record_edit_response.py
index 1c1d5673a5c3..9ef58b6a1a0d 100644
--- a/src/cloudflare/types/dns/record_edit_response.py
+++ b/src/cloudflare/types/dns/record_edit_response.py
@@ -7,7 +7,15 @@
from ..._models import BaseModel
from .record_tags import RecordTags
-__all__ = ["RecordEditResponse"]
+__all__ = ["RecordEditResponse", "Meta"]
+
+
+class Meta(BaseModel):
+ auto_added: Optional[bool] = None
+ """
+ Will exist if Cloudflare automatically added this DNS record during initial
+ setup.
+ """
class RecordEditResponse(BaseModel):
@@ -20,10 +28,13 @@ class RecordEditResponse(BaseModel):
This field has no effect on DNS responses.
"""
+ comment_modified_on: datetime
+ """When the record comment was last modified."""
+
created_on: datetime
"""When the record was created."""
- meta: object
+ meta: Meta
"""Extra Cloudflare-specific information about the record."""
modified_on: datetime
@@ -41,21 +52,15 @@ class RecordEditResponse(BaseModel):
Cloudflare.
"""
- settings: object
- """Settings for the DNS record."""
-
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
+ tags_modified_on: datetime
+ """When the record tags were last modified."""
+
ttl: TTL
"""Time To Live (TTL) of the DNS record in seconds.
Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
minimum reduced to 30 for Enterprise zones.
"""
-
- comment_modified_on: Optional[datetime] = None
- """When the record comment was last modified. Omitted if there is no comment."""
-
- tags_modified_on: Optional[datetime] = None
- """When the record tags were last modified. Omitted if there are no tags."""
diff --git a/src/cloudflare/types/dns/record_get_response.py b/src/cloudflare/types/dns/record_get_response.py
index 9e156bc54dc1..bfea4db39d03 100644
--- a/src/cloudflare/types/dns/record_get_response.py
+++ b/src/cloudflare/types/dns/record_get_response.py
@@ -7,7 +7,15 @@
from ..._models import BaseModel
from .record_tags import RecordTags
-__all__ = ["RecordGetResponse"]
+__all__ = ["RecordGetResponse", "Meta"]
+
+
+class Meta(BaseModel):
+ auto_added: Optional[bool] = None
+ """
+ Will exist if Cloudflare automatically added this DNS record during initial
+ setup.
+ """
class RecordGetResponse(BaseModel):
@@ -20,10 +28,13 @@ class RecordGetResponse(BaseModel):
This field has no effect on DNS responses.
"""
+ comment_modified_on: datetime
+ """When the record comment was last modified."""
+
created_on: datetime
"""When the record was created."""
- meta: object
+ meta: Meta
"""Extra Cloudflare-specific information about the record."""
modified_on: datetime
@@ -41,21 +52,15 @@ class RecordGetResponse(BaseModel):
Cloudflare.
"""
- settings: object
- """Settings for the DNS record."""
-
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
+ tags_modified_on: datetime
+ """When the record tags were last modified."""
+
ttl: TTL
"""Time To Live (TTL) of the DNS record in seconds.
Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
minimum reduced to 30 for Enterprise zones.
"""
-
- comment_modified_on: Optional[datetime] = None
- """When the record comment was last modified. Omitted if there is no comment."""
-
- tags_modified_on: Optional[datetime] = None
- """When the record tags were last modified. Omitted if there are no tags."""
diff --git a/src/cloudflare/types/dns/record_list_response.py b/src/cloudflare/types/dns/record_list_response.py
index 5c29580d162d..86905357c994 100644
--- a/src/cloudflare/types/dns/record_list_response.py
+++ b/src/cloudflare/types/dns/record_list_response.py
@@ -7,7 +7,15 @@
from ..._models import BaseModel
from .record_tags import RecordTags
-__all__ = ["RecordListResponse"]
+__all__ = ["RecordListResponse", "Meta"]
+
+
+class Meta(BaseModel):
+ auto_added: Optional[bool] = None
+ """
+ Will exist if Cloudflare automatically added this DNS record during initial
+ setup.
+ """
class RecordListResponse(BaseModel):
@@ -20,10 +28,13 @@ class RecordListResponse(BaseModel):
This field has no effect on DNS responses.
"""
+ comment_modified_on: datetime
+ """When the record comment was last modified."""
+
created_on: datetime
"""When the record was created."""
- meta: object
+ meta: Meta
"""Extra Cloudflare-specific information about the record."""
modified_on: datetime
@@ -41,21 +52,15 @@ class RecordListResponse(BaseModel):
Cloudflare.
"""
- settings: object
- """Settings for the DNS record."""
-
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
+ tags_modified_on: datetime
+ """When the record tags were last modified."""
+
ttl: TTL
"""Time To Live (TTL) of the DNS record in seconds.
Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
minimum reduced to 30 for Enterprise zones.
"""
-
- comment_modified_on: Optional[datetime] = None
- """When the record comment was last modified. Omitted if there is no comment."""
-
- tags_modified_on: Optional[datetime] = None
- """When the record tags were last modified. Omitted if there are no tags."""
diff --git a/src/cloudflare/types/dns/record_update_response.py b/src/cloudflare/types/dns/record_update_response.py
index e929c3b23ef0..d233959691c3 100644
--- a/src/cloudflare/types/dns/record_update_response.py
+++ b/src/cloudflare/types/dns/record_update_response.py
@@ -7,7 +7,15 @@
from ..._models import BaseModel
from .record_tags import RecordTags
-__all__ = ["RecordUpdateResponse"]
+__all__ = ["RecordUpdateResponse", "Meta"]
+
+
+class Meta(BaseModel):
+ auto_added: Optional[bool] = None
+ """
+ Will exist if Cloudflare automatically added this DNS record during initial
+ setup.
+ """
class RecordUpdateResponse(BaseModel):
@@ -20,10 +28,13 @@ class RecordUpdateResponse(BaseModel):
This field has no effect on DNS responses.
"""
+ comment_modified_on: datetime
+ """When the record comment was last modified."""
+
created_on: datetime
"""When the record was created."""
- meta: object
+ meta: Meta
"""Extra Cloudflare-specific information about the record."""
modified_on: datetime
@@ -41,21 +52,15 @@ class RecordUpdateResponse(BaseModel):
Cloudflare.
"""
- settings: object
- """Settings for the DNS record."""
-
tags: List[RecordTags]
"""Custom tags for the DNS record. This field has no effect on DNS responses."""
+ tags_modified_on: datetime
+ """When the record tags were last modified."""
+
ttl: TTL
"""Time To Live (TTL) of the DNS record in seconds.
Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the
minimum reduced to 30 for Enterprise zones.
"""
-
- comment_modified_on: Optional[datetime] = None
- """When the record comment was last modified. Omitted if there is no comment."""
-
- tags_modified_on: Optional[datetime] = None
- """When the record tags were last modified. Omitted if there are no tags."""
diff --git a/src/cloudflare/types/durable_objects/namespace.py b/src/cloudflare/types/durable_objects/namespace.py
index cb1bb82f93f0..113572c80546 100644
--- a/src/cloudflare/types/durable_objects/namespace.py
+++ b/src/cloudflare/types/durable_objects/namespace.py
@@ -17,5 +17,3 @@ class Namespace(BaseModel):
name: Optional[str] = None
script: Optional[str] = None
-
- use_sqlite: Optional[bool] = None
diff --git a/src/cloudflare/types/email_security/investigate_get_response.py b/src/cloudflare/types/email_security/investigate_get_response.py
index 5bbb3b45d49e..6622c620e291 100644
--- a/src/cloudflare/types/email_security/investigate_get_response.py
+++ b/src/cloudflare/types/email_security/investigate_get_response.py
@@ -42,22 +42,6 @@ class InvestigateGetResponse(BaseModel):
alert_id: Optional[str] = None
- delivery_mode: Optional[
- Literal[
- "DIRECT",
- "BCC",
- "JOURNAL",
- "REVIEW_SUBMISSION",
- "DMARC_UNVERIFIED",
- "DMARC_FAILURE_REPORT",
- "DMARC_AGGREGATE_REPORT",
- "THREAT_INTEL_SUBMISSION",
- "SIMULATION_SUBMISSION",
- "API",
- "RETRO_SCAN",
- ]
- ] = None
-
edf_hash: Optional[str] = None
final_disposition: Optional[
diff --git a/src/cloudflare/types/email_security/investigate_list_response.py b/src/cloudflare/types/email_security/investigate_list_response.py
index 55c3b6686cfd..41d1c9850724 100644
--- a/src/cloudflare/types/email_security/investigate_list_response.py
+++ b/src/cloudflare/types/email_security/investigate_list_response.py
@@ -42,22 +42,6 @@ class InvestigateListResponse(BaseModel):
alert_id: Optional[str] = None
- delivery_mode: Optional[
- Literal[
- "DIRECT",
- "BCC",
- "JOURNAL",
- "REVIEW_SUBMISSION",
- "DMARC_UNVERIFIED",
- "DMARC_FAILURE_REPORT",
- "DMARC_AGGREGATE_REPORT",
- "THREAT_INTEL_SUBMISSION",
- "SIMULATION_SUBMISSION",
- "API",
- "RETRO_SCAN",
- ]
- ] = None
-
edf_hash: Optional[str] = None
final_disposition: Optional[
diff --git a/src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py b/src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py
index 6ae61f664879..08718f376d45 100644
--- a/src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py
+++ b/src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py
@@ -10,10 +10,10 @@
class QueueUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
bucket_name: Required[str]
- """Identifier."""
+ """Identifier"""
rules: Iterable[Rule]
"""Array of rules to drive notifications"""
diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_dismiss_response.py b/src/cloudflare/types/intel/attack_surface_report/issue_dismiss_response.py
index b34d6246dec7..3110c1f90e01 100644
--- a/src/cloudflare/types/intel/attack_surface_report/issue_dismiss_response.py
+++ b/src/cloudflare/types/intel/attack_surface_report/issue_dismiss_response.py
@@ -1,18 +1,8 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
-from typing_extensions import Literal
-
-from ...._models import BaseModel
-from ...shared.response_info import ResponseInfo
+from typing import Union
+from typing_extensions import TypeAlias
__all__ = ["IssueDismissResponse"]
-
-class IssueDismissResponse(BaseModel):
- errors: List[ResponseInfo]
-
- messages: List[ResponseInfo]
-
- success: Literal[True]
- """Whether the API call was successful"""
+IssueDismissResponse: TypeAlias = Union[str, object]
diff --git a/src/cloudflare/types/magic_network_monitoring/config_create_params.py b/src/cloudflare/types/magic_network_monitoring/config_create_params.py
index 70e33517f2f7..3bb01f0cb07f 100644
--- a/src/cloudflare/types/magic_network_monitoring/config_create_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/config_create_params.py
@@ -2,32 +2,12 @@
from __future__ import annotations
-from typing import List, Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["ConfigCreateParams", "WARPDevice"]
+__all__ = ["ConfigCreateParams"]
class ConfigCreateParams(TypedDict, total=False):
account_id: Required[str]
- default_sampling: Required[float]
- """Fallback sampling rate of flow messages being sent in packets per second.
-
- This should match the packet sampling rate configured on the router.
- """
-
- name: Required[str]
- """The account name."""
-
- router_ips: List[str]
-
- warp_devices: Iterable[WARPDevice]
-
-
-class WARPDevice(TypedDict, total=False):
- id: Required[str]
- """Unique identifier for the warp device."""
-
- name: Required[str]
- """Name of the warp device."""
+ body: Required[object]
diff --git a/src/cloudflare/types/magic_network_monitoring/config_edit_params.py b/src/cloudflare/types/magic_network_monitoring/config_edit_params.py
index 62c2c9c23d61..f02fba5f3d20 100644
--- a/src/cloudflare/types/magic_network_monitoring/config_edit_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/config_edit_params.py
@@ -2,32 +2,12 @@
from __future__ import annotations
-from typing import List, Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["ConfigEditParams", "WARPDevice"]
+__all__ = ["ConfigEditParams"]
class ConfigEditParams(TypedDict, total=False):
account_id: Required[str]
- default_sampling: float
- """Fallback sampling rate of flow messages being sent in packets per second.
-
- This should match the packet sampling rate configured on the router.
- """
-
- name: str
- """The account name."""
-
- router_ips: List[str]
-
- warp_devices: Iterable[WARPDevice]
-
-
-class WARPDevice(TypedDict, total=False):
- id: Required[str]
- """Unique identifier for the warp device."""
-
- name: Required[str]
- """Name of the warp device."""
+ body: Required[object]
diff --git a/src/cloudflare/types/magic_network_monitoring/config_update_params.py b/src/cloudflare/types/magic_network_monitoring/config_update_params.py
index 3c870de45186..acfef585f576 100644
--- a/src/cloudflare/types/magic_network_monitoring/config_update_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/config_update_params.py
@@ -2,32 +2,12 @@
from __future__ import annotations
-from typing import List, Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["ConfigUpdateParams", "WARPDevice"]
+__all__ = ["ConfigUpdateParams"]
class ConfigUpdateParams(TypedDict, total=False):
account_id: Required[str]
- default_sampling: Required[float]
- """Fallback sampling rate of flow messages being sent in packets per second.
-
- This should match the packet sampling rate configured on the router.
- """
-
- name: Required[str]
- """The account name."""
-
- router_ips: List[str]
-
- warp_devices: Iterable[WARPDevice]
-
-
-class WARPDevice(TypedDict, total=False):
- id: Required[str]
- """Unique identifier for the warp device."""
-
- name: Required[str]
- """Name of the warp device."""
+ body: Required[object]
diff --git a/src/cloudflare/types/magic_network_monitoring/configuration.py b/src/cloudflare/types/magic_network_monitoring/configuration.py
index 8be6148bf42b..46f5e0a2d835 100644
--- a/src/cloudflare/types/magic_network_monitoring/configuration.py
+++ b/src/cloudflare/types/magic_network_monitoring/configuration.py
@@ -4,15 +4,7 @@
from ..._models import BaseModel
-__all__ = ["Configuration", "WARPDevice"]
-
-
-class WARPDevice(BaseModel):
- id: str
- """Unique identifier for the warp device."""
-
- name: str
- """Name of the warp device."""
+__all__ = ["Configuration"]
class Configuration(BaseModel):
@@ -26,5 +18,3 @@ class Configuration(BaseModel):
"""The account name."""
router_ips: List[str]
-
- warp_devices: List[WARPDevice]
diff --git a/src/cloudflare/types/magic_network_monitoring/rule_create_params.py b/src/cloudflare/types/magic_network_monitoring/rule_create_params.py
index 353c41693f0f..dd4c5f4092f3 100644
--- a/src/cloudflare/types/magic_network_monitoring/rule_create_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/rule_create_params.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from typing import List, Optional
from typing_extensions import Required, TypedDict
__all__ = ["RuleCreateParams"]
@@ -11,42 +10,4 @@
class RuleCreateParams(TypedDict, total=False):
account_id: Required[str]
- duration: Required[str]
- """
- The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
- """
-
- name: Required[str]
- """The name of the rule.
-
- Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-),
- period (.), and tilde (~). You can’t have a space in the rule name. Max 256
- characters.
- """
-
- automatic_advertisement: Optional[bool]
- """
- Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
- """
-
- bandwidth: float
- """The number of bits per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- packet_threshold: float
- """The number of packets per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- prefixes: List[str]
+ body: Required[object]
diff --git a/src/cloudflare/types/magic_network_monitoring/rule_edit_params.py b/src/cloudflare/types/magic_network_monitoring/rule_edit_params.py
index c11aaa9e7872..005bdbb0ad56 100644
--- a/src/cloudflare/types/magic_network_monitoring/rule_edit_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/rule_edit_params.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from typing import List, Optional
from typing_extensions import Required, TypedDict
__all__ = ["RuleEditParams"]
@@ -11,42 +10,4 @@
class RuleEditParams(TypedDict, total=False):
account_id: Required[str]
- automatic_advertisement: Optional[bool]
- """
- Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
- """
-
- bandwidth: float
- """The number of bits per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- duration: str
- """
- The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
- """
-
- name: str
- """The name of the rule.
-
- Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-),
- period (.), and tilde (~). You can’t have a space in the rule name. Max 256
- characters.
- """
-
- packet_threshold: float
- """The number of packets per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- prefixes: List[str]
+ body: Required[object]
diff --git a/src/cloudflare/types/magic_network_monitoring/rule_update_params.py b/src/cloudflare/types/magic_network_monitoring/rule_update_params.py
index 4c5920c7b6c2..d9ae09df6649 100644
--- a/src/cloudflare/types/magic_network_monitoring/rule_update_params.py
+++ b/src/cloudflare/types/magic_network_monitoring/rule_update_params.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from typing import List, Optional
from typing_extensions import Required, TypedDict
__all__ = ["RuleUpdateParams"]
@@ -11,45 +10,4 @@
class RuleUpdateParams(TypedDict, total=False):
account_id: Required[str]
- duration: Required[str]
- """
- The amount of time that the rule threshold must be exceeded to send an alert
- notification. The final value must be equivalent to one of the following 8
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
- least one unit must be provided.
- """
-
- name: Required[str]
- """The name of the rule.
-
- Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-),
- period (.), and tilde (~). You can’t have a space in the rule name. Max 256
- characters.
- """
-
- id: str
- """The id of the rule. Must be unique."""
-
- automatic_advertisement: Optional[bool]
- """
- Toggle on if you would like Cloudflare to automatically advertise the IP
- Prefixes within the rule via Magic Transit when the rule is triggered. Only
- available for users of Magic Transit.
- """
-
- bandwidth: float
- """The number of bits per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- packet_threshold: float
- """The number of packets per second for the rule.
-
- When this value is exceeded for the set duration, an alert notification is sent.
- Minimum of 1 and no maximum.
- """
-
- prefixes: List[str]
+ body: Required[object]
diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py
index 7a7269663742..883d2d01bd12 100644
--- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py
+++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py
@@ -1,6 +1,7 @@
# 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
from ..ssl.request_validity import RequestValidity
@@ -34,5 +35,5 @@ class OriginCACertificate(BaseModel):
certificate: Optional[str] = None
"""The Origin CA certificate. Will be newline-encoded."""
- expires_on: Optional[str] = None
+ expires_on: Optional[datetime] = None
"""When the certificate will expire."""
diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_response.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_response.py
index 684c7d827e8a..75bcea0c237b 100644
--- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_response.py
+++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_response.py
@@ -1,16 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
+from typing import List, Optional
from datetime import datetime
from ..._models import BaseModel
+from ..ssl.request_validity import RequestValidity
+from ..shared.certificate_request_type import CertificateRequestType
__all__ = ["OriginCACertificateDeleteResponse"]
class OriginCACertificateDeleteResponse(BaseModel):
+ csr: str
+ """The Certificate Signing Request (CSR). Must be newline-encoded."""
+
+ hostnames: List[str]
+ """
+ Array of hostnames or wildcard names (e.g., \\**.example.com) bound to the
+ certificate.
+ """
+
+ request_type: CertificateRequestType
+ """
+ Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
+ or "keyless-certificate" (for Keyless SSL servers).
+ """
+
+ requested_validity: RequestValidity
+ """The number of days for which the certificate should be valid."""
+
id: Optional[str] = None
"""Identifier"""
- revoked_at: Optional[datetime] = None
- """When the certificate was revoked."""
+ certificate: Optional[str] = None
+ """The Origin CA certificate. Will be newline-encoded."""
+
+ expires_on: Optional[datetime] = None
+ """When the certificate will expire."""
diff --git a/src/cloudflare/types/page_shield/connection_list_params.py b/src/cloudflare/types/page_shield/connection_list_params.py
index abfe2194578c..3986c62ea729 100644
--- a/src/cloudflare/types/page_shield/connection_list_params.py
+++ b/src/cloudflare/types/page_shield/connection_list_params.py
@@ -27,7 +27,10 @@ class ConnectionListParams(TypedDict, total=False):
"""
export: Literal["csv"]
- """Export the list of connections as a file."""
+ """Export the list of connections as a file.
+
+ Cannot be used with per_page or page options.
+ """
hosts: str
"""
@@ -46,9 +49,10 @@ class ConnectionListParams(TypedDict, total=False):
"""The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the connections with the applied filters in a single page. This
- feature is best-effort and it may only work for zones with a low number of
- connections
+ return all the connections with the applied filters in a single page.
+ Additionally, when using this value, the API will not return the categorisation
+ data for the URL and domain of the connections. This feature is best-effort and
+ it may only work for zones with a low number of connections
"""
page_url: str
diff --git a/src/cloudflare/types/page_shield/cookie_list_params.py b/src/cloudflare/types/page_shield/cookie_list_params.py
index 859c21d06405..3daf5bdee9cd 100644
--- a/src/cloudflare/types/page_shield/cookie_list_params.py
+++ b/src/cloudflare/types/page_shield/cookie_list_params.py
@@ -18,7 +18,10 @@ class CookieListParams(TypedDict, total=False):
"""Filters the returned cookies that match the specified domain attribute"""
export: Literal["csv"]
- """Export the list of cookies as a file."""
+ """Export the list of cookies as a file.
+
+ Cannot be used with per_page or page options.
+ """
hosts: str
"""
@@ -44,12 +47,7 @@ class CookieListParams(TypedDict, total=False):
"""The field used to sort returned cookies."""
page: str
- """The current page number of the paginated results.
-
- We additionally support a special value "all". When "all" is used, the API will
- return all the cookies with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of cookies
- """
+ """The current page number of the paginated results."""
page_url: str
"""
diff --git a/src/cloudflare/types/page_shield/script_list_params.py b/src/cloudflare/types/page_shield/script_list_params.py
index 62bf4e3898ad..99e6ba8ac9e0 100644
--- a/src/cloudflare/types/page_shield/script_list_params.py
+++ b/src/cloudflare/types/page_shield/script_list_params.py
@@ -35,7 +35,10 @@ class ScriptListParams(TypedDict, total=False):
"""
export: Literal["csv"]
- """Export the list of scripts as a file."""
+ """Export the list of scripts as a file.
+
+ Cannot be used with per_page or page options.
+ """
hosts: str
"""
@@ -54,8 +57,10 @@ class ScriptListParams(TypedDict, total=False):
"""The current page number of the paginated results.
We additionally support a special value "all". When "all" is used, the API will
- return all the scripts with the applied filters in a single page. This feature
- is best-effort and it may only work for zones with a low number of scripts
+ return all the scripts with the applied filters in a single page. Additionally,
+ when using this value, the API will not return the script versions or
+ categorisation data for the URL and domain of the scripts. This feature is
+ best-effort and it may only work for zones with a low number of scripts
"""
page_url: str
diff --git a/src/cloudflare/types/queues/consumer_create_params.py b/src/cloudflare/types/queues/consumer_create_params.py
index 84dd755dbed6..ee3b7882d1ec 100644
--- a/src/cloudflare/types/queues/consumer_create_params.py
+++ b/src/cloudflare/types/queues/consumer_create_params.py
@@ -9,6 +9,6 @@
class ConsumerCreateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
body: Required[object]
diff --git a/src/cloudflare/types/queues/consumer_update_params.py b/src/cloudflare/types/queues/consumer_update_params.py
index 0fce7fcba214..a741a2473174 100644
--- a/src/cloudflare/types/queues/consumer_update_params.py
+++ b/src/cloudflare/types/queues/consumer_update_params.py
@@ -9,9 +9,9 @@
class ConsumerUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
queue_id: Required[str]
- """Identifier."""
+ """Identifier"""
body: Required[object]
diff --git a/src/cloudflare/types/queues/message_ack_params.py b/src/cloudflare/types/queues/message_ack_params.py
index 5604662d579d..a076ef3df887 100644
--- a/src/cloudflare/types/queues/message_ack_params.py
+++ b/src/cloudflare/types/queues/message_ack_params.py
@@ -10,7 +10,7 @@
class MessageAckParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
acks: Iterable[Ack]
diff --git a/src/cloudflare/types/queues/message_pull_params.py b/src/cloudflare/types/queues/message_pull_params.py
index a592b19236b1..a04c0f08a92b 100644
--- a/src/cloudflare/types/queues/message_pull_params.py
+++ b/src/cloudflare/types/queues/message_pull_params.py
@@ -9,7 +9,7 @@
class MessagePullParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
batch_size: float
"""The maximum number of messages to include in a batch."""
diff --git a/src/cloudflare/types/queues/queue_create_params.py b/src/cloudflare/types/queues/queue_create_params.py
index c590bda26f31..a3d1af9a201d 100644
--- a/src/cloudflare/types/queues/queue_create_params.py
+++ b/src/cloudflare/types/queues/queue_create_params.py
@@ -9,6 +9,6 @@
class QueueCreateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
queue_name: Required[str]
diff --git a/src/cloudflare/types/queues/queue_update_params.py b/src/cloudflare/types/queues/queue_update_params.py
index bcfb690cadf5..e5f2bfc978cf 100644
--- a/src/cloudflare/types/queues/queue_update_params.py
+++ b/src/cloudflare/types/queues/queue_update_params.py
@@ -9,6 +9,6 @@
class QueueUpdateParams(TypedDict, total=False):
account_id: Required[str]
- """Identifier."""
+ """Identifier"""
body: Required[object]
diff --git a/src/cloudflare/types/r2/domains/custom_create_params.py b/src/cloudflare/types/r2/domains/custom_create_params.py
index 8feaabfb2bc8..0dcd68b5c94a 100755
--- a/src/cloudflare/types/r2/domains/custom_create_params.py
+++ b/src/cloudflare/types/r2/domains/custom_create_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, Annotated, TypedDict
+from typing_extensions import Required, Annotated, TypedDict
from ...._utils import PropertyInfo
@@ -24,9 +24,3 @@ class CustomCreateParams(TypedDict, total=False):
If undefined, the domain will be enabled.
"""
-
- min_tls: Annotated[Literal["1.0", "1.1", "1.2", "1.3"], PropertyInfo(alias="minTLS")]
- """Minimum TLS Version the custom domain will accept for incoming connections.
-
- If not set, defaults to 1.0.
- """
diff --git a/src/cloudflare/types/r2/domains/custom_create_response.py b/src/cloudflare/types/r2/domains/custom_create_response.py
index 5a6a0b2f8d63..3412493fa4f7 100755
--- a/src/cloudflare/types/r2/domains/custom_create_response.py
+++ b/src/cloudflare/types/r2/domains/custom_create_response.py
@@ -1,9 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
-from typing_extensions import Literal
-from pydantic import Field as FieldInfo
from ...._models import BaseModel
@@ -16,9 +13,3 @@ class CustomCreateResponse(BaseModel):
enabled: bool
"""Whether this bucket is publicly accessible at the specified custom domain"""
-
- min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]] = FieldInfo(alias="minTLS", default=None)
- """Minimum TLS Version the custom domain will accept for incoming connections.
-
- If not set, defaults to 1.0.
- """
diff --git a/src/cloudflare/types/r2/domains/custom_list_response.py b/src/cloudflare/types/r2/domains/custom_list_response.py
index 6aa0fc559fe6..62a484145549 100755
--- a/src/cloudflare/types/r2/domains/custom_list_response.py
+++ b/src/cloudflare/types/r2/domains/custom_list_response.py
@@ -27,12 +27,6 @@ class Domain(BaseModel):
status: DomainStatus
- min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]] = FieldInfo(alias="minTLS", default=None)
- """Minimum TLS Version the custom domain will accept for incoming connections.
-
- If not set, defaults to 1.0.
- """
-
zone_id: Optional[str] = FieldInfo(alias="zoneId", default=None)
"""Zone ID of the custom domain resides in"""
diff --git a/src/cloudflare/types/r2/domains/custom_update_params.py b/src/cloudflare/types/r2/domains/custom_update_params.py
index b24b552142da..8ec285446fac 100755
--- a/src/cloudflare/types/r2/domains/custom_update_params.py
+++ b/src/cloudflare/types/r2/domains/custom_update_params.py
@@ -2,9 +2,7 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, Annotated, TypedDict
-
-from ...._utils import PropertyInfo
+from typing_extensions import Required, TypedDict
__all__ = ["CustomUpdateParams"]
@@ -18,9 +16,3 @@ class CustomUpdateParams(TypedDict, total=False):
enabled: bool
"""Whether to enable public bucket access at the specified custom domain"""
-
- min_tls: Annotated[Literal["1.0", "1.1", "1.2", "1.3"], PropertyInfo(alias="minTLS")]
- """Minimum TLS Version the custom domain will accept for incoming connections.
-
- If not set, defaults to previous value.
- """
diff --git a/src/cloudflare/types/r2/domains/custom_update_response.py b/src/cloudflare/types/r2/domains/custom_update_response.py
index dacb05938645..42bc481a93d0 100755
--- a/src/cloudflare/types/r2/domains/custom_update_response.py
+++ b/src/cloudflare/types/r2/domains/custom_update_response.py
@@ -1,9 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
-from typing_extensions import Literal
-
-from pydantic import Field as FieldInfo
from ...._models import BaseModel
@@ -16,9 +13,3 @@ class CustomUpdateResponse(BaseModel):
enabled: Optional[bool] = None
"""Whether this bucket is publicly accessible at the specified custom domain"""
-
- min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]] = FieldInfo(alias="minTLS", default=None)
- """Minimum TLS Version the custom domain will accept for incoming connections.
-
- If not set, defaults to 1.0.
- """
diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py
index b9840e4bee82..f6002ca591c7 100644
--- a/src/cloudflare/types/rulesets/rule_create_params.py
+++ b/src/cloudflare/types/rulesets/rule_create_params.py
@@ -1033,7 +1033,7 @@ class SetCacheSettingsRuleActionParametersCacheReserve(TypedDict, total=False):
the resource to cache reserve.
"""
- minimum_file_size: Required[int]
+ min_file_size: Required[int]
"""The minimum file size eligible for store in cache reserve."""
diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py
index 2eeb5fb212c0..ac1f07c5c93a 100644
--- a/src/cloudflare/types/rulesets/rule_edit_params.py
+++ b/src/cloudflare/types/rulesets/rule_edit_params.py
@@ -1078,7 +1078,7 @@ class SetCacheSettingsRuleActionParametersCacheReserve(TypedDict, total=False):
the resource to cache reserve.
"""
- minimum_file_size: Required[int]
+ min_file_size: Required[int]
"""The minimum file size eligible for store in cache reserve."""
diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule.py b/src/cloudflare/types/rulesets/set_cache_settings_rule.py
index f1ad3715525c..f23b607435ff 100644
--- a/src/cloudflare/types/rulesets/set_cache_settings_rule.py
+++ b/src/cloudflare/types/rulesets/set_cache_settings_rule.py
@@ -179,7 +179,7 @@ class ActionParametersCacheReserve(BaseModel):
the resource to cache reserve.
"""
- minimum_file_size: int
+ min_file_size: int
"""The minimum file size eligible for store in cache reserve."""
diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
index 2e71a5c0c434..cbfbc5c3a0d2 100644
--- a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
+++ b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py
@@ -177,7 +177,7 @@ class ActionParametersCacheReserve(TypedDict, total=False):
the resource to cache reserve.
"""
- minimum_file_size: Required[int]
+ min_file_size: Required[int]
"""The minimum file size eligible for store in cache reserve."""
diff --git a/src/cloudflare/types/user/audit_log_list_params.py b/src/cloudflare/types/user/audit_log_list_params.py
index bd4dcc422547..4b8dc7548280 100644
--- a/src/cloudflare/types/user/audit_log_list_params.py
+++ b/src/cloudflare/types/user/audit_log_list_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Union
-from datetime import date, datetime
+from datetime import datetime
from typing_extensions import Literal, Annotated, TypedDict
from ..._utils import PropertyInfo
@@ -19,10 +19,11 @@ class AuditLogListParams(TypedDict, total=False):
actor: Actor
- before: Annotated[Union[Union[str, date], Union[str, datetime]], PropertyInfo(format="iso8601")]
+ before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Limits the returned results to logs older than the specified date.
- A `full-date` that conforms to RFC3339.
+ This can be a date string `2019-04-30` or an absolute timestamp that conforms to
+ RFC3339.
"""
direction: Literal["desc", "asc"]
@@ -40,10 +41,11 @@ class AuditLogListParams(TypedDict, total=False):
per_page: float
"""Sets the number of results to return per page."""
- since: Annotated[Union[Union[str, date], Union[str, datetime]], PropertyInfo(format="iso8601")]
+ since: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Limits the returned results to logs newer than the specified date.
- A `full-date` that conforms to RFC3339.
+ This can be a date string `2019-04-30` or an absolute timestamp that conforms to
+ RFC3339.
"""
zone: Zone
diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py
index 8c730ca13459..8ecb33ed9a3f 100644
--- a/src/cloudflare/types/workers/ai_run_params.py
+++ b/src/cloudflare/types/workers/ai_run_params.py
@@ -75,10 +75,6 @@ class AutomaticSpeechRecognition(TypedDict, total=False):
audio: Required[Iterable[float]]
- source_lang: str
-
- target_lang: str
-
class ImageClassification(TypedDict, total=False):
account_id: Required[str]
diff --git a/src/cloudflare/types/workers/migration_step.py b/src/cloudflare/types/workers/migration_step.py
index 88a0e94a3f48..c345d2027b6f 100644
--- a/src/cloudflare/types/workers/migration_step.py
+++ b/src/cloudflare/types/workers/migration_step.py
@@ -30,9 +30,6 @@ class MigrationStep(BaseModel):
new_classes: Optional[List[str]] = None
"""A list of classes to create Durable Object namespaces from."""
- new_sqlite_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
renamed_classes: Optional[List[RenamedClass]] = None
"""A list of classes with Durable Object namespaces that were renamed."""
diff --git a/src/cloudflare/types/workers/migration_step_param.py b/src/cloudflare/types/workers/migration_step_param.py
index 3887ce2bc3d7..87c80f048fcd 100644
--- a/src/cloudflare/types/workers/migration_step_param.py
+++ b/src/cloudflare/types/workers/migration_step_param.py
@@ -42,9 +42,6 @@ class MigrationStepParam(TypedDict, total=False):
new_classes: List[str]
"""A list of classes to create Durable Object namespaces from."""
- new_sqlite_classes: List[str]
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
renamed_classes: Iterable[RenamedClass]
"""A list of classes with Durable Object namespaces that were renamed."""
diff --git a/src/cloudflare/types/workers/single_step_migration.py b/src/cloudflare/types/workers/single_step_migration.py
index edaf5715324a..2c07c2f4a225 100644
--- a/src/cloudflare/types/workers/single_step_migration.py
+++ b/src/cloudflare/types/workers/single_step_migration.py
@@ -30,9 +30,6 @@ class SingleStepMigration(BaseModel):
new_classes: Optional[List[str]] = None
"""A list of classes to create Durable Object namespaces from."""
- new_sqlite_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
new_tag: Optional[str] = None
"""Tag to set as the latest migration tag."""
diff --git a/src/cloudflare/types/workers/single_step_migration_param.py b/src/cloudflare/types/workers/single_step_migration_param.py
index a8383d1e26fc..0c831efe8af1 100644
--- a/src/cloudflare/types/workers/single_step_migration_param.py
+++ b/src/cloudflare/types/workers/single_step_migration_param.py
@@ -42,9 +42,6 @@ class SingleStepMigrationParam(TypedDict, total=False):
new_classes: List[str]
"""A list of classes to create Durable Object namespaces from."""
- new_sqlite_classes: List[str]
- """A list of classes to create Durable Object namespaces with SQLite from."""
-
new_tag: str
"""Tag to set as the latest migration tag."""
diff --git a/src/cloudflare/types/zero_trust/authentication_method_rule.py b/src/cloudflare/types/zero_trust/authentication_method_rule.py
index 1e996a9f1cb4..ab9bdced2798 100644
--- a/src/cloudflare/types/zero_trust/authentication_method_rule.py
+++ b/src/cloudflare/types/zero_trust/authentication_method_rule.py
@@ -10,8 +10,7 @@
class AuthMethod(BaseModel):
auth_method: str
"""
- The type of authentication method
- https://datatracker.ietf.org/doc/html/rfc8176#section-2.
+ The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176.
"""
diff --git a/src/cloudflare/types/zero_trust/authentication_method_rule_param.py b/src/cloudflare/types/zero_trust/authentication_method_rule_param.py
index fe75bfdce16b..369c85cbe305 100644
--- a/src/cloudflare/types/zero_trust/authentication_method_rule_param.py
+++ b/src/cloudflare/types/zero_trust/authentication_method_rule_param.py
@@ -10,8 +10,7 @@
class AuthMethod(TypedDict, total=False):
auth_method: Required[str]
"""
- The type of authentication method
- https://datatracker.ietf.org/doc/html/rfc8176#section-2.
+ The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176.
"""
diff --git a/src/cloudflare/types/zero_trust/azure_group_rule.py b/src/cloudflare/types/zero_trust/azure_group_rule.py
index 98ebed94f964..6df84aaf221f 100644
--- a/src/cloudflare/types/zero_trust/azure_group_rule.py
+++ b/src/cloudflare/types/zero_trust/azure_group_rule.py
@@ -12,7 +12,7 @@ class AzureAD(BaseModel):
id: str
"""The ID of an Azure group."""
- identity_provider_id: str
+ connection_id: str
"""The ID of your Azure identity provider."""
diff --git a/src/cloudflare/types/zero_trust/azure_group_rule_param.py b/src/cloudflare/types/zero_trust/azure_group_rule_param.py
index 6f6a479e1e04..93a64fab94ee 100644
--- a/src/cloudflare/types/zero_trust/azure_group_rule_param.py
+++ b/src/cloudflare/types/zero_trust/azure_group_rule_param.py
@@ -13,7 +13,7 @@ class AzureAD(TypedDict, total=False):
id: Required[str]
"""The ID of an Azure group."""
- identity_provider_id: Required[str]
+ connection_id: Required[str]
"""The ID of your Azure identity provider."""
diff --git a/src/cloudflare/types/zero_trust/devices/device_input.py b/src/cloudflare/types/zero_trust/devices/device_input.py
index c72344321f87..f1fa5b2038ec 100644
--- a/src/cloudflare/types/zero_trust/devices/device_input.py
+++ b/src/cloudflare/types/zero_trust/devices/device_input.py
@@ -25,7 +25,6 @@
"TeamsDevicesApplicationInputRequest",
"TeamsDevicesClientCertificateV2InputRequest",
"TeamsDevicesClientCertificateV2InputRequestLocations",
- "TeamsDevicesCustomS2sInputRequest",
]
@@ -95,19 +94,6 @@ class TeamsDevicesClientCertificateV2InputRequest(BaseModel):
locations: Optional[TeamsDevicesClientCertificateV2InputRequestLocations] = None
-class TeamsDevicesCustomS2sInputRequest(BaseModel):
- connection_id: str
- """Posture Integration ID."""
-
- operator: Literal["<", "<=", ">", ">=", "=="]
- """operator"""
-
- score: float
- """
- A value between 0-100 assigned to devices set by the 3rd party posture provider.
- """
-
-
DeviceInput: TypeAlias = Union[
FileInput,
UniqueClientIDInput,
@@ -126,5 +112,4 @@ class TeamsDevicesCustomS2sInputRequest(BaseModel):
KolideInput,
TaniumInput,
SentineloneS2sInput,
- TeamsDevicesCustomS2sInputRequest,
]
diff --git a/src/cloudflare/types/zero_trust/devices/device_input_param.py b/src/cloudflare/types/zero_trust/devices/device_input_param.py
index 6dccd49bcb97..bc87aba9357b 100644
--- a/src/cloudflare/types/zero_trust/devices/device_input_param.py
+++ b/src/cloudflare/types/zero_trust/devices/device_input_param.py
@@ -26,7 +26,6 @@
"TeamsDevicesApplicationInputRequest",
"TeamsDevicesClientCertificateV2InputRequest",
"TeamsDevicesClientCertificateV2InputRequestLocations",
- "TeamsDevicesCustomS2sInputRequest",
]
@@ -96,19 +95,6 @@ class TeamsDevicesClientCertificateV2InputRequest(TypedDict, total=False):
locations: TeamsDevicesClientCertificateV2InputRequestLocations
-class TeamsDevicesCustomS2sInputRequest(TypedDict, total=False):
- connection_id: Required[str]
- """Posture Integration ID."""
-
- operator: Required[Literal["<", "<=", ">", ">=", "=="]]
- """operator"""
-
- score: Required[float]
- """
- A value between 0-100 assigned to devices set by the 3rd party posture provider.
- """
-
-
DeviceInputParam: TypeAlias = Union[
FileInputParam,
UniqueClientIDInputParam,
@@ -127,5 +113,4 @@ class TeamsDevicesCustomS2sInputRequest(TypedDict, total=False):
KolideInputParam,
TaniumInputParam,
SentineloneS2sInputParam,
- TeamsDevicesCustomS2sInputRequest,
]
diff --git a/src/cloudflare/types/zero_trust/devices/device_posture_rule.py b/src/cloudflare/types/zero_trust/devices/device_posture_rule.py
index e40a4f0157f6..74fca99ff093 100644
--- a/src/cloudflare/types/zero_trust/devices/device_posture_rule.py
+++ b/src/cloudflare/types/zero_trust/devices/device_posture_rule.py
@@ -61,7 +61,6 @@ class DevicePostureRule(BaseModel):
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
]
] = None
"""The type of device posture rule."""
diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration.py b/src/cloudflare/types/zero_trust/devices/posture/integration.py
index b517b4a7e70c..505d151031f0 100644
--- a/src/cloudflare/types/zero_trust/devices/posture/integration.py
+++ b/src/cloudflare/types/zero_trust/devices/posture/integration.py
@@ -36,8 +36,6 @@ class Integration(BaseModel):
"""The name of the device posture integration."""
type: Optional[
- Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ]
+ Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"]
] = None
"""The type of device posture integration."""
diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration_create_params.py b/src/cloudflare/types/zero_trust/devices/posture/integration_create_params.py
index 94345ef4b296..6729424c6066 100644
--- a/src/cloudflare/types/zero_trust/devices/posture/integration_create_params.py
+++ b/src/cloudflare/types/zero_trust/devices/posture/integration_create_params.py
@@ -15,7 +15,6 @@
"ConfigTeamsDevicesKolideConfigRequest",
"ConfigTeamsDevicesTaniumConfigRequest",
"ConfigTeamsDevicesSentineloneS2sConfigRequest",
- "ConfigTeamsDevicesCustomS2sConfigRequest",
]
@@ -35,9 +34,7 @@ class IntegrationCreateParams(TypedDict, total=False):
"""The name of the device posture integration."""
type: Required[
- Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ]
+ Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"]
]
"""The type of device posture integration."""
@@ -131,23 +128,6 @@ class ConfigTeamsDevicesSentineloneS2sConfigRequest(TypedDict, total=False):
"""The SentinelOne S2S client secret."""
-class ConfigTeamsDevicesCustomS2sConfigRequest(TypedDict, total=False):
- access_client_id: Required[str]
- """
- This id will be passed in the `CF-Access-Client-ID` header when hitting the
- `api_url`
- """
-
- access_client_secret: Required[str]
- """
- This secret will be passed in the `CF-Access-Client-Secret` header when hitting
- the `api_url`
- """
-
- api_url: Required[str]
- """The Custom Device Posture Integration API URL."""
-
-
Config: TypeAlias = Union[
ConfigTeamsDevicesWorkspaceOneConfigRequest,
ConfigTeamsDevicesCrowdstrikeConfigRequest,
@@ -156,5 +136,4 @@ class ConfigTeamsDevicesCustomS2sConfigRequest(TypedDict, total=False):
ConfigTeamsDevicesKolideConfigRequest,
ConfigTeamsDevicesTaniumConfigRequest,
ConfigTeamsDevicesSentineloneS2sConfigRequest,
- ConfigTeamsDevicesCustomS2sConfigRequest,
]
diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration_edit_params.py b/src/cloudflare/types/zero_trust/devices/posture/integration_edit_params.py
index 54df3e161efc..614e1d9c0d29 100644
--- a/src/cloudflare/types/zero_trust/devices/posture/integration_edit_params.py
+++ b/src/cloudflare/types/zero_trust/devices/posture/integration_edit_params.py
@@ -15,7 +15,6 @@
"ConfigTeamsDevicesKolideConfigRequest",
"ConfigTeamsDevicesTaniumConfigRequest",
"ConfigTeamsDevicesSentineloneS2sConfigRequest",
- "ConfigTeamsDevicesCustomS2sConfigRequest",
]
@@ -34,9 +33,7 @@ class IntegrationEditParams(TypedDict, total=False):
name: str
"""The name of the device posture integration."""
- type: Literal[
- "workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s", "custom_s2s"
- ]
+ type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"]
"""The type of device posture integration."""
@@ -129,23 +126,6 @@ class ConfigTeamsDevicesSentineloneS2sConfigRequest(TypedDict, total=False):
"""The SentinelOne S2S client secret."""
-class ConfigTeamsDevicesCustomS2sConfigRequest(TypedDict, total=False):
- access_client_id: Required[str]
- """
- This id will be passed in the `CF-Access-Client-ID` header when hitting the
- `api_url`
- """
-
- access_client_secret: Required[str]
- """
- This secret will be passed in the `CF-Access-Client-Secret` header when hitting
- the `api_url`
- """
-
- api_url: Required[str]
- """The Custom Device Posture Integration API URL."""
-
-
Config: TypeAlias = Union[
ConfigTeamsDevicesWorkspaceOneConfigRequest,
ConfigTeamsDevicesCrowdstrikeConfigRequest,
@@ -154,5 +134,4 @@ class ConfigTeamsDevicesCustomS2sConfigRequest(TypedDict, total=False):
ConfigTeamsDevicesKolideConfigRequest,
ConfigTeamsDevicesTaniumConfigRequest,
ConfigTeamsDevicesSentineloneS2sConfigRequest,
- ConfigTeamsDevicesCustomS2sConfigRequest,
]
diff --git a/src/cloudflare/types/zero_trust/devices/posture_create_params.py b/src/cloudflare/types/zero_trust/devices/posture_create_params.py
index b000471b6a3d..691b19268de9 100644
--- a/src/cloudflare/types/zero_trust/devices/posture_create_params.py
+++ b/src/cloudflare/types/zero_trust/devices/posture_create_params.py
@@ -39,7 +39,6 @@ class PostureCreateParams(TypedDict, total=False):
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
]
]
"""The type of device posture rule."""
diff --git a/src/cloudflare/types/zero_trust/devices/posture_update_params.py b/src/cloudflare/types/zero_trust/devices/posture_update_params.py
index c0a7b993eaf5..b8a72a058dda 100644
--- a/src/cloudflare/types/zero_trust/devices/posture_update_params.py
+++ b/src/cloudflare/types/zero_trust/devices/posture_update_params.py
@@ -39,7 +39,6 @@ class PostureUpdateParams(TypedDict, total=False):
"intune",
"workspace_one",
"sentinelone_s2s",
- "custom_s2s",
]
]
"""The type of device posture rule."""
diff --git a/src/cloudflare/types/zero_trust/dex/__init__.py b/src/cloudflare/types/zero_trust/dex/__init__.py
index a118abd88b95..efa573e206bc 100644
--- a/src/cloudflare/types/zero_trust/dex/__init__.py
+++ b/src/cloudflare/types/zero_trust/dex/__init__.py
@@ -2,11 +2,15 @@
from __future__ import annotations
+from .tests import Tests as Tests
from .live_stat import LiveStat as LiveStat
from .traceroute import Traceroute as Traceroute
from .http_details import HTTPDetails as HTTPDetails
from .colo_list_params import ColoListParams as ColoListParams
+from .test_list_params import TestListParams as TestListParams
+from .test_list_response import TestListResponse as TestListResponse
from .http_test_get_params import HTTPTestGetParams as HTTPTestGetParams
+from .aggregate_time_period import AggregateTimePeriod as AggregateTimePeriod
from .fleet_status_live_params import FleetStatusLiveParams as FleetStatusLiveParams
from .fleet_status_live_response import FleetStatusLiveResponse as FleetStatusLiveResponse
from .traceroute_test_get_params import TracerouteTestGetParams as TracerouteTestGetParams
diff --git a/src/cloudflare/types/zero_trust/dex/aggregate_time_period.py b/src/cloudflare/types/zero_trust/dex/aggregate_time_period.py
new file mode 100644
index 000000000000..2a855a312a74
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dex/aggregate_time_period.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+
+__all__ = ["AggregateTimePeriod"]
+
+
+class AggregateTimePeriod(BaseModel):
+ units: Literal["hours", "days", "testRuns"]
+
+ value: int
diff --git a/src/cloudflare/types/zero_trust/dex/test_list_params.py b/src/cloudflare/types/zero_trust/dex/test_list_params.py
new file mode 100644
index 000000000000..73c1b985719f
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dex/test_list_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 List
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["TestListParams"]
+
+
+class TestListParams(TypedDict, total=False):
+ account_id: Required[str]
+
+ colo: str
+ """Optionally filter result stats to a Cloudflare colo.
+
+ Cannot be used in combination with deviceId param.
+ """
+
+ device_id: Annotated[List[str], PropertyInfo(alias="deviceId")]
+ """Optionally filter result stats to a specific device(s).
+
+ Cannot be used in combination with colo param.
+ """
+
+ page: float
+ """Page number of paginated results"""
+
+ per_page: float
+ """Number of items per page"""
+
+ test_name: Annotated[str, PropertyInfo(alias="testName")]
+ """Optionally filter results by test name"""
diff --git a/src/cloudflare/types/zero_trust/dex/test_list_response.py b/src/cloudflare/types/zero_trust/dex/test_list_response.py
new file mode 100644
index 000000000000..140ad36e45d6
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/dex/test_list_response.py
@@ -0,0 +1,38 @@
+# 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 .tests.tests import Tests
+from ...shared.response_info import ResponseInfo
+
+__all__ = ["TestListResponse", "ResultInfo"]
+
+
+class ResultInfo(BaseModel):
+ count: Optional[float] = None
+ """Total number of results for the requested service"""
+
+ page: Optional[float] = None
+ """Current page within paginated list of results"""
+
+ per_page: Optional[float] = None
+ """Number of results per page of results"""
+
+ total_count: Optional[float] = None
+ """Total results available without any search parameters"""
+
+
+class TestListResponse(BaseModel):
+ __test__ = False
+ errors: List[ResponseInfo]
+
+ messages: List[ResponseInfo]
+
+ success: Literal[True]
+ """Whether the API call was successful"""
+
+ result: Optional[Tests] = None
+
+ result_info: Optional[ResultInfo] = None
diff --git a/src/cloudflare/types/zero_trust/dlp/pattern_validate_params.py b/src/cloudflare/types/zero_trust/dlp/pattern_validate_params.py
index edd77e78e031..534fb4af1bcc 100644
--- a/src/cloudflare/types/zero_trust/dlp/pattern_validate_params.py
+++ b/src/cloudflare/types/zero_trust/dlp/pattern_validate_params.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from typing import Optional
from typing_extensions import Required, TypedDict
__all__ = ["PatternValidateParams"]
@@ -12,15 +11,3 @@ class PatternValidateParams(TypedDict, total=False):
account_id: Required[str]
regex: Required[str]
-
- max_match_bytes: Optional[int]
- """Maximum number of bytes that the regular expression can match.
-
- If this is `null` then there is no limit on the length. Patterns can use `*` and
- `+`. Otherwise repeats should use a range `{m,n}` to restrict patterns to the
- length. If this field is missing, then a default length limit is used.
-
- Note that the length is specified in bytes. Since regular expressions use UTF-8
- the pattern `.` can match up to 4 bytes. Hence `.{1,256}` has a maximum length
- of 1024 bytes.
- """
diff --git a/src/cloudflare/types/zero_trust/github_organization_rule.py b/src/cloudflare/types/zero_trust/github_organization_rule.py
index 21feb6127905..b9b297ae08b4 100644
--- a/src/cloudflare/types/zero_trust/github_organization_rule.py
+++ b/src/cloudflare/types/zero_trust/github_organization_rule.py
@@ -9,7 +9,7 @@
class GitHubOrganization(BaseModel):
- identity_provider_id: str
+ connection_id: str
"""The ID of your Github identity provider."""
name: str
diff --git a/src/cloudflare/types/zero_trust/github_organization_rule_param.py b/src/cloudflare/types/zero_trust/github_organization_rule_param.py
index 762f638c6d21..094533d51560 100644
--- a/src/cloudflare/types/zero_trust/github_organization_rule_param.py
+++ b/src/cloudflare/types/zero_trust/github_organization_rule_param.py
@@ -10,7 +10,7 @@
class GitHubOrganization(TypedDict, total=False):
- identity_provider_id: Required[str]
+ connection_id: Required[str]
"""The ID of your Github identity provider."""
name: Required[str]
diff --git a/src/cloudflare/types/zero_trust/gsuite_group_rule.py b/src/cloudflare/types/zero_trust/gsuite_group_rule.py
index 5f3936af26e5..589bb8baef38 100644
--- a/src/cloudflare/types/zero_trust/gsuite_group_rule.py
+++ b/src/cloudflare/types/zero_trust/gsuite_group_rule.py
@@ -8,12 +8,12 @@
class GSuite(BaseModel):
+ connection_id: str
+ """The ID of your Google Workspace identity provider."""
+
email: str
"""The email of the Google Workspace group."""
- identity_provider_id: str
- """The ID of your Google Workspace identity provider."""
-
class GSuiteGroupRule(BaseModel):
gsuite: GSuite
diff --git a/src/cloudflare/types/zero_trust/gsuite_group_rule_param.py b/src/cloudflare/types/zero_trust/gsuite_group_rule_param.py
index 21d11145acaa..fc29c250b867 100644
--- a/src/cloudflare/types/zero_trust/gsuite_group_rule_param.py
+++ b/src/cloudflare/types/zero_trust/gsuite_group_rule_param.py
@@ -8,12 +8,12 @@
class GSuite(TypedDict, total=False):
+ connection_id: Required[str]
+ """The ID of your Google Workspace identity provider."""
+
email: Required[str]
"""The email of the Google Workspace group."""
- identity_provider_id: Required[str]
- """The ID of your Google Workspace identity provider."""
-
class GSuiteGroupRuleParam(TypedDict, total=False):
gsuite: Required[GSuite]
diff --git a/src/cloudflare/types/zero_trust/okta_group_rule.py b/src/cloudflare/types/zero_trust/okta_group_rule.py
index 2beb8972ffed..9f57c867141f 100644
--- a/src/cloudflare/types/zero_trust/okta_group_rule.py
+++ b/src/cloudflare/types/zero_trust/okta_group_rule.py
@@ -8,11 +8,11 @@
class Okta(BaseModel):
- identity_provider_id: str
+ connection_id: str
"""The ID of your Okta identity provider."""
- name: str
- """The name of the Okta group."""
+ email: str
+ """The email of the Okta group."""
class OktaGroupRule(BaseModel):
diff --git a/src/cloudflare/types/zero_trust/okta_group_rule_param.py b/src/cloudflare/types/zero_trust/okta_group_rule_param.py
index fe18df33f955..34d48a810737 100644
--- a/src/cloudflare/types/zero_trust/okta_group_rule_param.py
+++ b/src/cloudflare/types/zero_trust/okta_group_rule_param.py
@@ -8,11 +8,11 @@
class Okta(TypedDict, total=False):
- identity_provider_id: Required[str]
+ connection_id: Required[str]
"""The ID of your Okta identity provider."""
- name: Required[str]
- """The name of the Okta group."""
+ email: Required[str]
+ """The email of the Okta group."""
class OktaGroupRuleParam(TypedDict, total=False):
diff --git a/src/cloudflare/types/zero_trust/saml_group_rule.py b/src/cloudflare/types/zero_trust/saml_group_rule.py
index aca4686bc83f..c1bf9e03312c 100644
--- a/src/cloudflare/types/zero_trust/saml_group_rule.py
+++ b/src/cloudflare/types/zero_trust/saml_group_rule.py
@@ -14,9 +14,6 @@ class SAML(BaseModel):
attribute_value: str
"""The SAML attribute value to look for."""
- identity_provider_id: str
- """The ID of your SAML identity provider."""
-
class SAMLGroupRule(BaseModel):
saml: SAML
diff --git a/src/cloudflare/types/zero_trust/saml_group_rule_param.py b/src/cloudflare/types/zero_trust/saml_group_rule_param.py
index 619a52827279..78aa37ef3a7b 100644
--- a/src/cloudflare/types/zero_trust/saml_group_rule_param.py
+++ b/src/cloudflare/types/zero_trust/saml_group_rule_param.py
@@ -14,9 +14,6 @@ class SAML(TypedDict, total=False):
attribute_value: Required[str]
"""The SAML attribute value to look for."""
- identity_provider_id: Required[str]
- """The ID of your SAML identity provider."""
-
class SAMLGroupRuleParam(TypedDict, total=False):
saml: Required[SAML]
diff --git a/src/cloudflare/types/zones/custom_nameserver_get_response.py b/src/cloudflare/types/zones/custom_nameserver_get_response.py
index aacb6acd0de6..8fbe225a592d 100644
--- a/src/cloudflare/types/zones/custom_nameserver_get_response.py
+++ b/src/cloudflare/types/zones/custom_nameserver_get_response.py
@@ -1,40 +1,8 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from typing_extensions import Literal
+from typing import List
+from typing_extensions import TypeAlias
-from ..._models import BaseModel
-from ..shared.response_info import ResponseInfo
+__all__ = ["CustomNameserverGetResponse"]
-__all__ = ["CustomNameserverGetResponse", "ResultInfo"]
-
-
-class ResultInfo(BaseModel):
- count: Optional[float] = None
- """Total number of results for the requested service"""
-
- page: Optional[float] = None
- """Current page within paginated list of results"""
-
- per_page: Optional[float] = None
- """Number of results per page of results"""
-
- total_count: Optional[float] = None
- """Total results available without any search parameters"""
-
-
-class CustomNameserverGetResponse(BaseModel):
- errors: List[ResponseInfo]
-
- messages: List[ResponseInfo]
-
- success: Literal[True]
- """Whether the API call was successful"""
-
- enabled: Optional[bool] = None
- """Whether zone uses account-level custom nameservers."""
-
- ns_set: Optional[float] = None
- """The number of the name server set to assign to the zone."""
-
- result_info: Optional[ResultInfo] = None
+CustomNameserverGetResponse: TypeAlias = List[object]
diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py
index de3ffcc98d0e..2588a0ae21fb 100644
--- a/tests/api_resources/ai_gateway/test_logs.py
+++ b/tests/api_resources/ai_gateway/test_logs.py
@@ -35,18 +35,12 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
cached=True,
direction="asc",
end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
- feedback=0,
max_cost=0,
max_duration=0,
- max_tokens_in=0,
- max_tokens_out=0,
- max_total_tokens=0,
- meta_info=True,
+ max_tokens=0,
min_cost=0,
min_duration=0,
- min_tokens_in=0,
- min_tokens_out=0,
- min_total_tokens=0,
+ min_tokens=0,
model="model",
model_type="model_type",
order_by="created_at",
@@ -122,18 +116,12 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
cached=True,
direction="asc",
end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
- feedback=0,
max_cost=0,
max_duration=0,
- max_tokens_in=0,
- max_tokens_out=0,
- max_total_tokens=0,
- meta_info=True,
+ max_tokens=0,
min_cost=0,
min_duration=0,
- min_tokens_in=0,
- min_tokens_out=0,
- min_total_tokens=0,
+ min_tokens=0,
model="model",
model_type="model_type",
order_by="created_at",
diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py
index 456e85bc066e..9eb95d259164 100644
--- a/tests/api_resources/alerting/test_policies.py
+++ b/tests/api_resources/alerting/test_policies.py
@@ -82,7 +82,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"new_status": ["string", "string", "string"],
"packets_per_second": ["string", "string", "string"],
"pool_id": ["string", "string", "string"],
- "pop_name": ["string", "string", "string"],
"product": ["string", "string", "string"],
"project_id": ["string", "string", "string"],
"protocol": ["string", "string", "string"],
@@ -215,7 +214,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"new_status": ["string", "string", "string"],
"packets_per_second": ["string", "string", "string"],
"pool_id": ["string", "string", "string"],
- "pop_name": ["string", "string", "string"],
"product": ["string", "string", "string"],
"project_id": ["string", "string", "string"],
"protocol": ["string", "string", "string"],
@@ -501,7 +499,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"new_status": ["string", "string", "string"],
"packets_per_second": ["string", "string", "string"],
"pool_id": ["string", "string", "string"],
- "pop_name": ["string", "string", "string"],
"product": ["string", "string", "string"],
"project_id": ["string", "string", "string"],
"protocol": ["string", "string", "string"],
@@ -634,7 +631,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"new_status": ["string", "string", "string"],
"packets_per_second": ["string", "string", "string"],
"pool_id": ["string", "string", "string"],
- "pop_name": ["string", "string", "string"],
"product": ["string", "string", "string"],
"project_id": ["string", "string", "string"],
"protocol": ["string", "string", "string"],
diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py
index 45d3caa0475d..af281c7eb9f2 100644
--- a/tests/api_resources/cloudforce_one/requests/test_message.py
+++ b/tests/api_resources/cloudforce_one/requests/test_message.py
@@ -94,7 +94,11 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
message_identifer=0,
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- content="Can you elaborate on the type of DoS that occurred?",
+ content="What regions were most effected by the recent DoS?",
+ priority="routine",
+ request_type="Victomology",
+ summary="DoS attack",
+ tlp="clear",
)
assert_matches_type(Optional[Message], message, path=["response"])
@@ -343,7 +347,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
message_identifer=0,
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- content="Can you elaborate on the type of DoS that occurred?",
+ content="What regions were most effected by the recent DoS?",
+ priority="routine",
+ request_type="Victomology",
+ summary="DoS attack",
+ tlp="clear",
)
assert_matches_type(Optional[Message], message, path=["response"])
diff --git a/tests/api_resources/dns/test_settings.py b/tests/api_resources/dns/test_settings.py
index a361bc024999..2c204b237604 100644
--- a/tests/api_resources/dns/test_settings.py
+++ b/tests/api_resources/dns/test_settings.py
@@ -31,7 +31,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
setting = client.dns.settings.edit(
account_id="account_id",
zone_defaults={
- "flatten_all_cnames": False,
"foundation_dns": False,
"multi_provider": False,
"nameservers": {"type": "cloudflare.standard"},
@@ -163,7 +162,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
setting = await async_client.dns.settings.edit(
account_id="account_id",
zone_defaults={
- "flatten_all_cnames": False,
"foundation_dns": False,
"multi_provider": False,
"nameservers": {"type": "cloudflare.standard"},
diff --git a/tests/api_resources/email_security/settings/test_domains.py b/tests/api_resources/email_security/settings/test_domains.py
index 8a5a1b9a6ffd..9f4110f7d4a4 100644
--- a/tests/api_resources/email_security/settings/test_domains.py
+++ b/tests/api_resources/email_security/settings/test_domains.py
@@ -130,7 +130,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
domain_id=2400,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
domain="domain",
- lookback_hops=1,
+ lookback_hops=0,
)
assert_matches_type(DomainEditResponse, domain, path=["response"])
@@ -280,7 +280,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
domain_id=2400,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
domain="domain",
- lookback_hops=1,
+ lookback_hops=0,
)
assert_matches_type(DomainEditResponse, domain, path=["response"])
diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py
index a798333c2308..db438e3e04ab 100644
--- a/tests/api_resources/intel/attack_surface_report/test_issues.py
+++ b/tests/api_resources/intel/attack_surface_report/test_issues.py
@@ -144,7 +144,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None:
issue_id="issue_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None:
@@ -153,7 +153,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dismiss=True,
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_raw_response_dismiss(self, client: Cloudflare) -> None:
@@ -165,7 +165,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_streaming_response_dismiss(self, client: Cloudflare) -> None:
@@ -177,7 +177,7 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -431,7 +431,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None:
issue_id="issue_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -440,7 +440,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dismiss=True,
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None:
@@ -452,7 +452,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None:
@@ -464,7 +464,7 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py
index d29de1d3b3f2..8a60e5320fa8 100644
--- a/tests/api_resources/magic_network_monitoring/test_configs.py
+++ b/tests/api_resources/magic_network_monitoring/test_configs.py
@@ -23,32 +23,7 @@ class TestConfigs:
def test_method_create(self, client: Cloudflare) -> None:
config = client.magic_network_monitoring.configs.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- config = client.magic_network_monitoring.configs.create(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -56,8 +31,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.configs.with_raw_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
assert response.is_closed is True
@@ -69,8 +43,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.configs.with_streaming_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -85,40 +58,14 @@ def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.magic_network_monitoring.configs.with_raw_response.create(
account_id="",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
config = client.magic_network_monitoring.configs.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- config = client.magic_network_monitoring.configs.update(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -126,8 +73,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.configs.with_raw_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
assert response.is_closed is True
@@ -139,8 +85,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.configs.with_streaming_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -155,8 +100,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.magic_network_monitoring.configs.with_raw_response.update(
account_id="",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
@parametrize
@@ -201,30 +145,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
def test_method_edit(self, client: Cloudflare) -> None:
config = client.magic_network_monitoring.configs.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- config = client.magic_network_monitoring.configs.edit(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -232,6 +153,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.configs.with_raw_response.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
assert response.is_closed is True
@@ -243,6 +165,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.configs.with_streaming_response.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -257,6 +180,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.magic_network_monitoring.configs.with_raw_response.edit(
account_id="",
+ body={},
)
@parametrize
@@ -305,32 +229,7 @@ class TestAsyncConfigs:
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
config = await async_client.magic_network_monitoring.configs.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- config = await async_client.magic_network_monitoring.configs.create(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -338,8 +237,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.configs.with_raw_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
assert response.is_closed is True
@@ -351,8 +249,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.magic_network_monitoring.configs.with_streaming_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -367,40 +264,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.magic_network_monitoring.configs.with_raw_response.create(
account_id="",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
config = await async_client.magic_network_monitoring.configs.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- config = await async_client.magic_network_monitoring.configs.update(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -408,8 +279,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.configs.with_raw_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
assert response.is_closed is True
@@ -421,8 +291,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.magic_network_monitoring.configs.with_streaming_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -437,8 +306,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.magic_network_monitoring.configs.with_raw_response.update(
account_id="",
- default_sampling=1,
- name="cloudflare user's account",
+ body={},
)
@parametrize
@@ -483,30 +351,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
config = await async_client.magic_network_monitoring.configs.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
- )
- assert_matches_type(Configuration, config, path=["response"])
-
- @parametrize
- async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- config = await async_client.magic_network_monitoring.configs.edit(
- account_id="6f91088a406011ed95aed352566e8d4c",
- default_sampling=1,
- name="cloudflare user's account",
- router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
- warp_devices=[
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- {
- "id": "5360368d-b351-4791-abe1-93550dabd351",
- "name": "My warp device",
- },
- ],
+ body={},
)
assert_matches_type(Configuration, config, path=["response"])
@@ -514,6 +359,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.configs.with_raw_response.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
assert response.is_closed is True
@@ -525,6 +371,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
async with async_client.magic_network_monitoring.configs.with_streaming_response.edit(
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -539,6 +386,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.magic_network_monitoring.configs.with_raw_response.edit(
account_id="",
+ body={},
)
@parametrize
diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py
index d7341ff05f2b..d2b2bce970e5 100644
--- a/tests/api_resources/magic_network_monitoring/test_rules.py
+++ b/tests/api_resources/magic_network_monitoring/test_rules.py
@@ -24,21 +24,7 @@ class TestRules:
def test_method_create(self, client: Cloudflare) -> None:
rule = client.magic_network_monitoring.rules.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- rule = client.magic_network_monitoring.rules.create(
- account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- automatic_advertisement=True,
- bandwidth=1000,
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -46,8 +32,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.rules.with_raw_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
)
assert response.is_closed is True
@@ -59,8 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.rules.with_streaming_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -75,30 +59,14 @@ def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.magic_network_monitoring.rules.with_raw_response.create(
account_id="",
- duration="300s",
- name="my_rule_1",
+ body={},
)
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
rule = client.magic_network_monitoring.rules.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- rule = client.magic_network_monitoring.rules.update(
- account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- id="2890e6fa406311ed9b5a23f70f6fb8cf",
- automatic_advertisement=True,
- bandwidth=1000,
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -106,8 +74,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.rules.with_raw_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
)
assert response.is_closed is True
@@ -119,8 +86,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.rules.with_streaming_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -135,8 +101,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.magic_network_monitoring.rules.with_raw_response.update(
account_id="",
- duration="300s",
- name="my_rule_1",
+ body={},
)
@parametrize
@@ -230,20 +195,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
rule = client.magic_network_monitoring.rules.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- rule = client.magic_network_monitoring.rules.edit(
- rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
- account_id="6f91088a406011ed95aed352566e8d4c",
- automatic_advertisement=True,
- bandwidth=1000,
- duration="300s",
- name="my_rule_1",
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -252,6 +204,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
assert response.is_closed is True
@@ -264,6 +217,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.magic_network_monitoring.rules.with_streaming_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -279,12 +233,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="",
+ body={},
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
@parametrize
@@ -343,21 +299,7 @@ class TestAsyncRules:
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.magic_network_monitoring.rules.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.magic_network_monitoring.rules.create(
- account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- automatic_advertisement=True,
- bandwidth=1000,
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -365,8 +307,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.rules.with_raw_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
)
assert response.is_closed is True
@@ -378,8 +319,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.magic_network_monitoring.rules.with_streaming_response.create(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -394,30 +334,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.magic_network_monitoring.rules.with_raw_response.create(
account_id="",
- duration="300s",
- name="my_rule_1",
+ body={},
)
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.magic_network_monitoring.rules.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.magic_network_monitoring.rules.update(
- account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
- id="2890e6fa406311ed9b5a23f70f6fb8cf",
- automatic_advertisement=True,
- bandwidth=1000,
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -425,8 +349,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.rules.with_raw_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
)
assert response.is_closed is True
@@ -438,8 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.magic_network_monitoring.rules.with_streaming_response.update(
account_id="6f91088a406011ed95aed352566e8d4c",
- duration="300s",
- name="my_rule_1",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -454,8 +376,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.magic_network_monitoring.rules.with_raw_response.update(
account_id="",
- duration="300s",
- name="my_rule_1",
+ body={},
)
@parametrize
@@ -549,20 +470,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.magic_network_monitoring.rules.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
- )
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
-
- @parametrize
- async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.magic_network_monitoring.rules.edit(
- rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
- account_id="6f91088a406011ed95aed352566e8d4c",
- automatic_advertisement=True,
- bandwidth=1000,
- duration="300s",
- name="my_rule_1",
- packet_threshold=10000,
- prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
+ body={},
)
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@@ -571,6 +479,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
assert response.is_closed is True
@@ -583,6 +492,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
async with async_client.magic_network_monitoring.rules.with_streaming_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -598,12 +508,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
await async_client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="",
+ body={},
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
await async_client.magic_network_monitoring.rules.with_raw_response.edit(
rule_id="",
account_id="6f91088a406011ed95aed352566e8d4c",
+ body={},
)
@parametrize
diff --git a/tests/api_resources/r2/domains/test_custom.py b/tests/api_resources/r2/domains/test_custom.py
index e611a518d665..0b350b435766 100755
--- a/tests/api_resources/r2/domains/test_custom.py
+++ b/tests/api_resources/r2/domains/test_custom.py
@@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
domain="prefix.example-domain.com",
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
enabled=True,
- min_tls="1.0",
)
assert_matches_type(CustomCreateResponse, custom, path=["response"])
@@ -108,7 +107,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
bucket_name="example-bucket",
enabled=True,
- min_tls="1.0",
)
assert_matches_type(CustomUpdateResponse, custom, path=["response"])
@@ -293,7 +291,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
domain="prefix.example-domain.com",
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
enabled=True,
- min_tls="1.0",
)
assert_matches_type(CustomCreateResponse, custom, path=["response"])
@@ -361,7 +358,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
bucket_name="example-bucket",
enabled=True,
- min_tls="1.0",
)
assert_matches_type(CustomUpdateResponse, custom, path=["response"])
diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py
index 27f166e099c7..7fe1bf927cb5 100644
--- a/tests/api_resources/rulesets/test_rules.py
+++ b/tests/api_resources/rulesets/test_rules.py
@@ -1221,7 +1221,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) ->
},
"cache_reserve": {
"eligible": True,
- "minimum_file_size": 0,
+ "min_file_size": 0,
},
"edge_ttl": {
"default": 0,
@@ -3024,7 +3024,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No
},
"cache_reserve": {
"eligible": True,
- "minimum_file_size": 0,
+ "min_file_size": 0,
},
"edge_ttl": {
"default": 0,
@@ -4606,7 +4606,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy
},
"cache_reserve": {
"eligible": True,
- "minimum_file_size": 0,
+ "min_file_size": 0,
},
"edge_ttl": {
"default": 0,
@@ -6409,7 +6409,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async
},
"cache_reserve": {
"eligible": True,
- "minimum_file_size": 0,
+ "min_file_size": 0,
},
"edge_ttl": {
"default": 0,
diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py
index 29a60c3d1613..404b104950ed 100644
--- a/tests/api_resources/test_ai_gateway.py
+++ b/tests/api_resources/test_ai_gateway.py
@@ -181,7 +181,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
id="my-gateway",
order_by="order_by",
- order_by_direction="asc",
+ order_by_direction="ASC",
page=1,
per_page=5,
)
@@ -475,7 +475,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
id="my-gateway",
order_by="order_by",
- order_by_direction="asc",
+ order_by_direction="ASC",
page=1,
per_page=5,
)
diff --git a/tests/api_resources/test_audit_logs.py b/tests/api_resources/test_audit_logs.py
index 5c550224d907..95e46cebef2f 100644
--- a/tests/api_resources/test_audit_logs.py
+++ b/tests/api_resources/test_audit_logs.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare._utils import parse_date
+from cloudflare._utils import parse_datetime
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.shared import AuditLog
@@ -36,13 +36,13 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
"email": "alice@example.com",
"ip": "17.168.228.63",
},
- before=parse_date("2019-04-30"),
+ before=parse_datetime("2019-04-30T01:12:20Z"),
direction="desc",
export=True,
hide_user_logs=True,
page=50,
per_page=25,
- since=parse_date("2019-04-30"),
+ since=parse_datetime("2019-04-30T01:12:20Z"),
zone={"name": "example.com"},
)
assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"])
@@ -99,13 +99,13 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
"email": "alice@example.com",
"ip": "17.168.228.63",
},
- before=parse_date("2019-04-30"),
+ before=parse_datetime("2019-04-30T01:12:20Z"),
direction="desc",
export=True,
hide_user_logs=True,
page=50,
per_page=25,
- since=parse_date("2019-04-30"),
+ since=parse_datetime("2019-04-30T01:12:20Z"),
zone={"name": "example.com"},
)
assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"])
diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py
index 743635412ac8..e37e45015cd5 100644
--- a/tests/api_resources/test_custom_hostnames.py
+++ b/tests/api_resources/test_custom_hostnames.py
@@ -54,7 +54,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"type": "dv",
"wildcard": False,
},
- custom_metadata={"foo": "string"},
+ custom_metadata={"key": "value"},
)
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
@@ -210,7 +210,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
custom_hostname = client.custom_hostnames.edit(
custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- custom_metadata={"foo": "string"},
+ custom_metadata={"key": "value"},
custom_origin_server="origin2.example.com",
custom_origin_sni="sni.example.com",
ssl={
@@ -354,7 +354,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"type": "dv",
"wildcard": False,
},
- custom_metadata={"foo": "string"},
+ custom_metadata={"key": "value"},
)
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
@@ -510,7 +510,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
custom_hostname = await async_client.custom_hostnames.edit(
custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- custom_metadata={"foo": "string"},
+ custom_metadata={"key": "value"},
custom_origin_server="origin2.example.com",
custom_origin_sni="sni.example.com",
ssl={
diff --git a/tests/api_resources/user/test_audit_logs.py b/tests/api_resources/user/test_audit_logs.py
index 5ce89e4e73b8..7793f9db7875 100644
--- a/tests/api_resources/user/test_audit_logs.py
+++ b/tests/api_resources/user/test_audit_logs.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare._utils import parse_date
+from cloudflare._utils import parse_datetime
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.shared import AuditLog
@@ -33,13 +33,13 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
"email": "alice@example.com",
"ip": "17.168.228.63",
},
- before=parse_date("2019-04-30"),
+ before=parse_datetime("2019-04-30T01:12:20Z"),
direction="desc",
export=True,
hide_user_logs=True,
page=50,
per_page=25,
- since=parse_date("2019-04-30"),
+ since=parse_datetime("2019-04-30T01:12:20Z"),
zone={"name": "example.com"},
)
assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"])
@@ -82,13 +82,13 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
"email": "alice@example.com",
"ip": "17.168.228.63",
},
- before=parse_date("2019-04-30"),
+ before=parse_datetime("2019-04-30T01:12:20Z"),
direction="desc",
export=True,
hide_user_logs=True,
page=50,
per_page=25,
- since=parse_date("2019-04-30"),
+ since=parse_datetime("2019-04-30T01:12:20Z"),
zone={"name": "example.com"},
)
assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"])
diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py
index 059791f8aaed..93152b6bd05e 100644
--- a/tests/api_resources/workers/test_ai.py
+++ b/tests/api_resources/workers/test_ai.py
@@ -86,7 +86,7 @@ def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None
account_id="023e105f4ecef8ad9ca31a8372d0c353",
prompt="x",
guidance=0,
- height=256,
+ height=0,
image=[0, 0, 0],
image_b64="image_b64",
mask=[0, 0, 0],
@@ -94,7 +94,7 @@ def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None
num_steps=0,
seed=0,
strength=0,
- width=256,
+ width=0,
)
assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
@@ -204,17 +204,6 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None:
)
assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
- @parametrize
- def test_method_run_with_all_params_overload_4(self, client: Cloudflare) -> None:
- ai = client.workers.ai.run(
- model_name="model_name",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- audio=[0, 0, 0],
- source_lang="source_lang",
- target_lang="target_lang",
- )
- assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
-
@parametrize
def test_raw_response_run_overload_4(self, client: Cloudflare) -> None:
response = client.workers.ai.with_raw_response.run(
@@ -934,7 +923,7 @@ async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCl
account_id="023e105f4ecef8ad9ca31a8372d0c353",
prompt="x",
guidance=0,
- height=256,
+ height=0,
image=[0, 0, 0],
image_b64="image_b64",
mask=[0, 0, 0],
@@ -942,7 +931,7 @@ async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCl
num_steps=0,
seed=0,
strength=0,
- width=256,
+ width=0,
)
assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
@@ -1052,17 +1041,6 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non
)
assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
- @parametrize
- async def test_method_run_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None:
- ai = await async_client.workers.ai.run(
- model_name="model_name",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- audio=[0, 0, 0],
- source_lang="source_lang",
- target_lang="target_lang",
- )
- assert_matches_type(Optional[AIRunResponse], ai, path=["response"])
-
@parametrize
async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None:
response = await async_client.workers.ai.with_raw_response.run(
diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py
index 295f7521cb7b..7d9721f98c4b 100644
--- a/tests/api_resources/workers/test_scripts.py
+++ b/tests/api_resources/workers/test_scripts.py
@@ -59,7 +59,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
@@ -423,7 +422,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
index 0772a245a1d8..db2aad7fb731 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
@@ -50,7 +50,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
@@ -257,7 +256,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
index 53313bba67b9..a9ce7bb3d908 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
@@ -54,7 +54,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
@@ -411,7 +410,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"migrations": {
"deleted_classes": ["string", "string", "string"],
"new_classes": ["string", "string", "string"],
- "new_sqlite_classes": ["string", "string", "string"],
"new_tag": "v2",
"old_tag": "v1",
"renamed_classes": [
diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py
new file mode 100644
index 000000000000..70da26054c3d
--- /dev/null
+++ b/tests/api_resources/zero_trust/dex/test_tests.py
@@ -0,0 +1,123 @@
+# 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 SyncV4PagePagination, AsyncV4PagePagination
+from cloudflare.types.zero_trust.dex import TestListResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestTests:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_list(self, client: Cloudflare) -> None:
+ test = client.zero_trust.dex.tests.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ )
+ assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
+ test = client.zero_trust.dex.tests.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ colo="colo",
+ device_id=["string", "string", "string"],
+ page=1,
+ per_page=1,
+ test_name="testName",
+ )
+ assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Cloudflare) -> None:
+ response = client.zero_trust.dex.tests.with_raw_response.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ test = response.parse()
+ assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Cloudflare) -> None:
+ with client.zero_trust.dex.tests.with_streaming_response.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ test = response.parse()
+ assert_matches_type(SyncV4PagePagination[TestListResponse], test, 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.zero_trust.dex.tests.with_raw_response.list(
+ account_id="",
+ )
+
+
+class TestAsyncTests:
+ parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
+ test = await async_client.zero_trust.dex.tests.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ )
+ assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ test = await async_client.zero_trust.dex.tests.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ colo="colo",
+ device_id=["string", "string", "string"],
+ page=1,
+ per_page=1,
+ test_name="testName",
+ )
+ assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zero_trust.dex.tests.with_raw_response.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ test = await response.parse()
+ assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zero_trust.dex.tests.with_streaming_response.list(
+ account_id="01a7362d577a6c3019a474fd6f485823",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ test = await response.parse()
+ assert_matches_type(AsyncV4PagePagination[TestListResponse], test, 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.zero_trust.dex.tests.with_raw_response.list(
+ account_id="",
+ )
diff --git a/tests/api_resources/zero_trust/dlp/test_patterns.py b/tests/api_resources/zero_trust/dlp/test_patterns.py
index f9bd0319a326..ededc266a1ea 100644
--- a/tests/api_resources/zero_trust/dlp/test_patterns.py
+++ b/tests/api_resources/zero_trust/dlp/test_patterns.py
@@ -25,15 +25,6 @@ def test_method_validate(self, client: Cloudflare) -> None:
)
assert_matches_type(Optional[PatternValidateResponse], pattern, path=["response"])
- @parametrize
- def test_method_validate_with_all_params(self, client: Cloudflare) -> None:
- pattern = client.zero_trust.dlp.patterns.validate(
- account_id="account_id",
- regex="regex",
- max_match_bytes=0,
- )
- assert_matches_type(Optional[PatternValidateResponse], pattern, path=["response"])
-
@parametrize
def test_raw_response_validate(self, client: Cloudflare) -> None:
response = client.zero_trust.dlp.patterns.with_raw_response.validate(
@@ -80,15 +71,6 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None:
)
assert_matches_type(Optional[PatternValidateResponse], pattern, path=["response"])
- @parametrize
- async def test_method_validate_with_all_params(self, async_client: AsyncCloudflare) -> None:
- pattern = await async_client.zero_trust.dlp.patterns.validate(
- account_id="account_id",
- regex="regex",
- max_match_bytes=0,
- )
- assert_matches_type(Optional[PatternValidateResponse], pattern, path=["response"])
-
@parametrize
async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.dlp.patterns.with_raw_response.validate(
diff --git a/tests/api_resources/zones/test_custom_nameservers.py b/tests/api_resources/zones/test_custom_nameservers.py
index 74a351762c39..8e213481da5a 100644
--- a/tests/api_resources/zones/test_custom_nameservers.py
+++ b/tests/api_resources/zones/test_custom_nameservers.py
@@ -72,7 +72,7 @@ def test_method_get(self, client: Cloudflare) -> None:
custom_nameserver = client.zones.custom_nameservers.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -83,7 +83,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_nameserver = response.parse()
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -94,7 +94,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_nameserver = response.parse()
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
custom_nameserver = await async_client.zones.custom_nameservers.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -172,7 +172,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_nameserver = await response.parse()
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -183,7 +183,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_nameserver = await response.parse()
- assert_matches_type(CustomNameserverGetResponse, custom_nameserver, path=["response"])
+ assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"])
assert cast(Any, response.is_closed) is True