Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 2317
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-6c72aaee26a255cefb59365441066a292ee06cff650529eb8b95d9ffb73ec13a.yml
openapi_spec_hash: 393731844a065cd2de4b422825007b70
config_hash: fb00b1d45d83236f53f8ef08adb2db5c
configured_endpoints: 2329
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-884b4b7d2d826afd303115f717021363d35e76d0819f4822e9faf6c577ea66ca.yml
openapi_spec_hash: 4fc7ac1b97d37c76f38db408ab2ed0cd
config_hash: 1fe0cc702fafe448e633d379a5633326
32 changes: 28 additions & 4 deletions src/cloudflare/resources/abuse_reports/mitigations.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,25 @@ def list(
| Omit = omit,
status: Literal["pending", "active", "in_review", "cancelled", "removed"] | Omit = omit,
type: Literal[
"account_suspend",
"copyright_interstitial",
"geo_block",
"legal_block",
"malware_interstitial",
"misleading_interstitial",
"phishing_interstitial",
"network_block",
"phishing_interstitial",
"playfairite_enforce",
"r2_takedown_account",
"r2_takedown_bucket",
"r2_takedown_object",
"rate_limit_cache",
"account_suspend",
"redirect_video_stream",
"registrar_freeze",
"registrar_parking",
"stream_block_account",
"user_suspend",
"workers_takedown_by_zone_id",
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -238,13 +250,25 @@ def list(
| Omit = omit,
status: Literal["pending", "active", "in_review", "cancelled", "removed"] | Omit = omit,
type: Literal[
"account_suspend",
"copyright_interstitial",
"geo_block",
"legal_block",
"malware_interstitial",
"misleading_interstitial",
"phishing_interstitial",
"network_block",
"phishing_interstitial",
"playfairite_enforce",
"r2_takedown_account",
"r2_takedown_bucket",
"r2_takedown_object",
"rate_limit_cache",
"account_suspend",
"redirect_video_stream",
"registrar_freeze",
"registrar_parking",
"stream_block_account",
"user_suspend",
"workers_takedown_by_zone_id",
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
4 changes: 4 additions & 0 deletions src/cloudflare/resources/ai_gateway/ai_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def update(
retry_backoff: Optional[Literal["constant", "linear", "exponential"]] | Omit = omit,
retry_delay: Optional[int] | Omit = omit,
retry_max_attempts: Optional[int] | Omit = omit,
spend_limits: Optional[ai_gateway_update_params.SpendLimits] | Omit = omit,
store_id: Optional[str] | Omit = omit,
stripe: Optional[ai_gateway_update_params.Stripe] | Omit = omit,
workers_ai_billing_mode: Literal["postpaid"] | Omit = omit,
Expand Down Expand Up @@ -314,6 +315,7 @@ def update(
"retry_backoff": retry_backoff,
"retry_delay": retry_delay,
"retry_max_attempts": retry_max_attempts,
"spend_limits": spend_limits,
"store_id": store_id,
"stripe": stripe,
"workers_ai_billing_mode": workers_ai_billing_mode,
Expand Down Expand Up @@ -627,6 +629,7 @@ async def update(
retry_backoff: Optional[Literal["constant", "linear", "exponential"]] | Omit = omit,
retry_delay: Optional[int] | Omit = omit,
retry_max_attempts: Optional[int] | Omit = omit,
spend_limits: Optional[ai_gateway_update_params.SpendLimits] | Omit = omit,
store_id: Optional[str] | Omit = omit,
stripe: Optional[ai_gateway_update_params.Stripe] | Omit = omit,
workers_ai_billing_mode: Literal["postpaid"] | Omit = omit,
Expand Down Expand Up @@ -686,6 +689,7 @@ async def update(
"retry_backoff": retry_backoff,
"retry_delay": retry_delay,
"retry_max_attempts": retry_max_attempts,
"spend_limits": spend_limits,
"store_id": store_id,
"stripe": stripe,
"workers_ai_billing_mode": workers_ai_billing_mode,
Expand Down
14 changes: 14 additions & 0 deletions src/cloudflare/resources/dns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
DNSResourceWithStreamingResponse,
AsyncDNSResourceWithStreamingResponse,
)
from .usage import (
UsageResource,
AsyncUsageResource,
UsageResourceWithRawResponse,
AsyncUsageResourceWithRawResponse,
UsageResourceWithStreamingResponse,
AsyncUsageResourceWithStreamingResponse,
)
from .dnssec import (
DNSSECResource,
AsyncDNSSECResource,
Expand Down Expand Up @@ -62,6 +70,12 @@
"AsyncRecordsResourceWithRawResponse",
"RecordsResourceWithStreamingResponse",
"AsyncRecordsResourceWithStreamingResponse",
"UsageResource",
"AsyncUsageResource",
"UsageResourceWithRawResponse",
"AsyncUsageResourceWithRawResponse",
"UsageResourceWithStreamingResponse",
"AsyncUsageResourceWithStreamingResponse",
"SettingsResource",
"AsyncSettingsResource",
"SettingsResourceWithRawResponse",
Expand Down
26 changes: 26 additions & 0 deletions src/cloudflare/resources/dns/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,32 @@ Methods:
- <code title="post /zones/{zone_id}/dns_records/scan/review">client.dns.records.<a href="./src/cloudflare/resources/dns/records.py">scan_review</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/dns/record_scan_review_params.py">params</a>) -> <a href="./src/cloudflare/types/dns/record_scan_review_response.py">Optional[RecordScanReviewResponse]</a></code>
- <code title="post /zones/{zone_id}/dns_records/scan/trigger">client.dns.records.<a href="./src/cloudflare/resources/dns/records.py">scan_trigger</a>(\*, zone_id) -> <a href="./src/cloudflare/types/dns/record_scan_trigger_response.py">RecordScanTriggerResponse</a></code>

## Usage

### Zone

Types:

```python
from cloudflare.types.dns.usage import ZoneGetResponse
```

Methods:

- <code title="get /zones/{zone_id}/dns_records/usage">client.dns.usage.zone.<a href="./src/cloudflare/resources/dns/usage/zone.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/dns/usage/zone_get_response.py">Optional[ZoneGetResponse]</a></code>

### Account

Types:

```python
from cloudflare.types.dns.usage import AccountGetResponse
```

Methods:

- <code title="get /accounts/{account_id}/dns_records/usage">client.dns.usage.account.<a href="./src/cloudflare/resources/dns/usage/account.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/dns/usage/account_get_response.py">Optional[AccountGetResponse]</a></code>

## Settings

### Zone
Expand Down
32 changes: 32 additions & 0 deletions src/cloudflare/resources/dns/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from .usage.usage import (
UsageResource,
AsyncUsageResource,
UsageResourceWithRawResponse,
AsyncUsageResourceWithRawResponse,
UsageResourceWithStreamingResponse,
AsyncUsageResourceWithStreamingResponse,
)
from .settings.settings import (
SettingsResource,
AsyncSettingsResource,
Expand Down Expand Up @@ -57,6 +65,10 @@ def dnssec(self) -> DNSSECResource:
def records(self) -> RecordsResource:
return RecordsResource(self._client)

@cached_property
def usage(self) -> UsageResource:
return UsageResource(self._client)

@cached_property
def settings(self) -> SettingsResource:
return SettingsResource(self._client)
Expand Down Expand Up @@ -98,6 +110,10 @@ def dnssec(self) -> AsyncDNSSECResource:
def records(self) -> AsyncRecordsResource:
return AsyncRecordsResource(self._client)

@cached_property
def usage(self) -> AsyncUsageResource:
return AsyncUsageResource(self._client)

@cached_property
def settings(self) -> AsyncSettingsResource:
return AsyncSettingsResource(self._client)
Expand Down Expand Up @@ -142,6 +158,10 @@ def dnssec(self) -> DNSSECResourceWithRawResponse:
def records(self) -> RecordsResourceWithRawResponse:
return RecordsResourceWithRawResponse(self._dns.records)

@cached_property
def usage(self) -> UsageResourceWithRawResponse:
return UsageResourceWithRawResponse(self._dns.usage)

@cached_property
def settings(self) -> SettingsResourceWithRawResponse:
return SettingsResourceWithRawResponse(self._dns.settings)
Expand All @@ -167,6 +187,10 @@ def dnssec(self) -> AsyncDNSSECResourceWithRawResponse:
def records(self) -> AsyncRecordsResourceWithRawResponse:
return AsyncRecordsResourceWithRawResponse(self._dns.records)

@cached_property
def usage(self) -> AsyncUsageResourceWithRawResponse:
return AsyncUsageResourceWithRawResponse(self._dns.usage)

@cached_property
def settings(self) -> AsyncSettingsResourceWithRawResponse:
return AsyncSettingsResourceWithRawResponse(self._dns.settings)
Expand All @@ -192,6 +216,10 @@ def dnssec(self) -> DNSSECResourceWithStreamingResponse:
def records(self) -> RecordsResourceWithStreamingResponse:
return RecordsResourceWithStreamingResponse(self._dns.records)

@cached_property
def usage(self) -> UsageResourceWithStreamingResponse:
return UsageResourceWithStreamingResponse(self._dns.usage)

@cached_property
def settings(self) -> SettingsResourceWithStreamingResponse:
return SettingsResourceWithStreamingResponse(self._dns.settings)
Expand All @@ -217,6 +245,10 @@ def dnssec(self) -> AsyncDNSSECResourceWithStreamingResponse:
def records(self) -> AsyncRecordsResourceWithStreamingResponse:
return AsyncRecordsResourceWithStreamingResponse(self._dns.records)

@cached_property
def usage(self) -> AsyncUsageResourceWithStreamingResponse:
return AsyncUsageResourceWithStreamingResponse(self._dns.usage)

@cached_property
def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
return AsyncSettingsResourceWithStreamingResponse(self._dns.settings)
Expand Down
47 changes: 47 additions & 0 deletions src/cloudflare/resources/dns/usage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .zone import (
ZoneResource,
AsyncZoneResource,
ZoneResourceWithRawResponse,
AsyncZoneResourceWithRawResponse,
ZoneResourceWithStreamingResponse,
AsyncZoneResourceWithStreamingResponse,
)
from .usage import (
UsageResource,
AsyncUsageResource,
UsageResourceWithRawResponse,
AsyncUsageResourceWithRawResponse,
UsageResourceWithStreamingResponse,
AsyncUsageResourceWithStreamingResponse,
)
from .account import (
AccountResource,
AsyncAccountResource,
AccountResourceWithRawResponse,
AsyncAccountResourceWithRawResponse,
AccountResourceWithStreamingResponse,
AsyncAccountResourceWithStreamingResponse,
)

__all__ = [
"ZoneResource",
"AsyncZoneResource",
"ZoneResourceWithRawResponse",
"AsyncZoneResourceWithRawResponse",
"ZoneResourceWithStreamingResponse",
"AsyncZoneResourceWithStreamingResponse",
"AccountResource",
"AsyncAccountResource",
"AccountResourceWithRawResponse",
"AsyncAccountResourceWithRawResponse",
"AccountResourceWithStreamingResponse",
"AsyncAccountResourceWithStreamingResponse",
"UsageResource",
"AsyncUsageResource",
"UsageResourceWithRawResponse",
"AsyncUsageResourceWithRawResponse",
"UsageResourceWithStreamingResponse",
"AsyncUsageResourceWithStreamingResponse",
]
Loading
Loading