Skip to content

Commit ce7f872

Browse files
feat(api): map more endpoints (#2287)
1 parent efa8fcb commit ce7f872

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4767
-3
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 1467
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ace2cb0a08aa00d1675be9b68d04f10c86943a39c5a405f740863e4da89b3057.yml
1+
configured_endpoints: 1480
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a2d9b92dd116fb25fdcd7969ee039a099a9cea04182925b450f5dd5e3b4dedfb.yml

api.md

+75
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,20 @@ Methods:
123123

124124
- <code title="put /accounts/{account_id}/tokens/{token_id}/value">client.accounts.tokens.value.<a href="./src/cloudflare/resources/accounts/tokens/value.py">update</a>(token_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/token_value.py">str</a></code>
125125

126+
## Logs
127+
128+
### Audit
129+
130+
Types:
131+
132+
```python
133+
from cloudflare.types.accounts.logs import AuditListResponse
134+
```
135+
136+
Methods:
137+
138+
- <code title="get /accounts/{account_id}/logs/audit">client.accounts.logs.audit.<a href="./src/cloudflare/resources/accounts/logs/audit.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/logs/audit_list_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/logs/audit_list_response.py">SyncCursorLimitPagination[AuditListResponse]</a></code>
139+
126140
# OriginCACertificates
127141

128142
Types:
@@ -3256,6 +3270,7 @@ from cloudflare.types.addressing.prefixes.bgp import BGPPrefix
32563270

32573271
Methods:
32583272

3273+
- <code title="post /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">create</a>(prefix_id, \*, account_id, \*\*<a href="src/cloudflare/types/addressing/prefixes/bgp/prefix_create_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
32593274
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">list</a>(prefix_id, \*, account_id) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">SyncSinglePage[BGPPrefix]</a></code>
32603275
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">edit</a>(bgp_prefix_id, \*, account_id, prefix_id, \*\*<a href="src/cloudflare/types/addressing/prefixes/bgp/prefix_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
32613276
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">get</a>(bgp_prefix_id, \*, account_id, prefix_id) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
@@ -5201,6 +5216,24 @@ from cloudflare.types.zero_trust import (
52015216
)
52025217
```
52035218

5219+
### GatewayCA
5220+
5221+
Types:
5222+
5223+
```python
5224+
from cloudflare.types.zero_trust.access import (
5225+
GatewayCACreateResponse,
5226+
GatewayCAListResponse,
5227+
GatewayCADeleteResponse,
5228+
)
5229+
```
5230+
5231+
Methods:
5232+
5233+
- <code title="post /accounts/{account_id}/access/gateway_ca">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">create</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_create_response.py">Optional[GatewayCACreateResponse]</a></code>
5234+
- <code title="get /accounts/{account_id}/access/gateway_ca">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_list_response.py">SyncSinglePage[GatewayCAListResponse]</a></code>
5235+
- <code title="delete /accounts/{account_id}/access/gateway_ca/{certificate_id}">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">delete</a>(certificate_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_delete_response.py">Optional[GatewayCADeleteResponse]</a></code>
5236+
52045237
### Infrastructure
52055238

52065239
#### Targets
@@ -5938,6 +5971,48 @@ Methods:
59385971
- <code title="put /accounts/{account_id}/dlp/payload_log">client.zero_trust.dlp.payload_logs.<a href="./src/cloudflare/resources/zero_trust/dlp/payload_logs.py">update</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/payload_log_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/payload_log_update_response.py">Optional[PayloadLogUpdateResponse]</a></code>
59395972
- <code title="get /accounts/{account_id}/dlp/payload_log">client.zero_trust.dlp.payload_logs.<a href="./src/cloudflare/resources/zero_trust/dlp/payload_logs.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/payload_log_get_response.py">Optional[PayloadLogGetResponse]</a></code>
59405973

5974+
### Email
5975+
5976+
#### AccountMapping
5977+
5978+
Types:
5979+
5980+
```python
5981+
from cloudflare.types.zero_trust.dlp.email import (
5982+
AccountMappingCreateResponse,
5983+
AccountMappingGetResponse,
5984+
)
5985+
```
5986+
5987+
Methods:
5988+
5989+
- <code title="post /accounts/{account_id}/dlp/email/account_mapping">client.zero_trust.dlp.email.account_mapping.<a href="./src/cloudflare/resources/zero_trust/dlp/email/account_mapping.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/account_mapping_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/account_mapping_create_response.py">Optional[AccountMappingCreateResponse]</a></code>
5990+
- <code title="get /accounts/{account_id}/dlp/email/account_mapping">client.zero_trust.dlp.email.account_mapping.<a href="./src/cloudflare/resources/zero_trust/dlp/email/account_mapping.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/account_mapping_get_response.py">Optional[AccountMappingGetResponse]</a></code>
5991+
5992+
#### Rules
5993+
5994+
Types:
5995+
5996+
```python
5997+
from cloudflare.types.zero_trust.dlp.email import (
5998+
RuleCreateResponse,
5999+
RuleUpdateResponse,
6000+
RuleListResponse,
6001+
RuleDeleteResponse,
6002+
RuleBulkEditResponse,
6003+
RuleGetResponse,
6004+
)
6005+
```
6006+
6007+
Methods:
6008+
6009+
- <code title="post /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_create_response.py">Optional[RuleCreateResponse]</a></code>
6010+
- <code title="put /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">update</a>(rule_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_update_response.py">Optional[RuleUpdateResponse]</a></code>
6011+
- <code title="get /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_list_response.py">SyncSinglePage[RuleListResponse]</a></code>
6012+
- <code title="delete /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">delete</a>(rule_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_delete_response.py">Optional[RuleDeleteResponse]</a></code>
6013+
- <code title="patch /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">bulk_edit</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_bulk_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_bulk_edit_response.py">Optional[RuleBulkEditResponse]</a></code>
6014+
- <code title="get /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">get</a>(rule_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_get_response.py">Optional[RuleGetResponse]</a></code>
6015+
59416016
### Profiles
59426017

59436018
Types:

src/cloudflare/resources/accounts/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .logs import (
4+
LogsResource,
5+
AsyncLogsResource,
6+
LogsResourceWithRawResponse,
7+
AsyncLogsResourceWithRawResponse,
8+
LogsResourceWithStreamingResponse,
9+
AsyncLogsResourceWithStreamingResponse,
10+
)
311
from .roles import (
412
RolesResource,
513
AsyncRolesResource,
@@ -66,6 +74,12 @@
6674
"AsyncTokensResourceWithRawResponse",
6775
"TokensResourceWithStreamingResponse",
6876
"AsyncTokensResourceWithStreamingResponse",
77+
"LogsResource",
78+
"AsyncLogsResource",
79+
"LogsResourceWithRawResponse",
80+
"AsyncLogsResourceWithRawResponse",
81+
"LogsResourceWithStreamingResponse",
82+
"AsyncLogsResourceWithStreamingResponse",
6983
"AccountsResource",
7084
"AsyncAccountsResource",
7185
"AccountsResourceWithRawResponse",

src/cloudflare/resources/accounts/accounts.py

+32
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
async_maybe_transform,
3030
)
3131
from ..._compat import cached_property
32+
from .logs.logs import (
33+
LogsResource,
34+
AsyncLogsResource,
35+
LogsResourceWithRawResponse,
36+
AsyncLogsResourceWithRawResponse,
37+
LogsResourceWithStreamingResponse,
38+
AsyncLogsResourceWithStreamingResponse,
39+
)
3240
from ..._resource import SyncAPIResource, AsyncAPIResource
3341
from ..._response import (
3442
to_raw_response_wrapper,
@@ -79,6 +87,10 @@ def subscriptions(self) -> SubscriptionsResource:
7987
def tokens(self) -> TokensResource:
8088
return TokensResource(self._client)
8189

90+
@cached_property
91+
def logs(self) -> LogsResource:
92+
return LogsResource(self._client)
93+
8294
@cached_property
8395
def with_raw_response(self) -> AccountsResourceWithRawResponse:
8496
"""
@@ -358,6 +370,10 @@ def subscriptions(self) -> AsyncSubscriptionsResource:
358370
def tokens(self) -> AsyncTokensResource:
359371
return AsyncTokensResource(self._client)
360372

373+
@cached_property
374+
def logs(self) -> AsyncLogsResource:
375+
return AsyncLogsResource(self._client)
376+
361377
@cached_property
362378
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
363379
"""
@@ -656,6 +672,10 @@ def subscriptions(self) -> SubscriptionsResourceWithRawResponse:
656672
def tokens(self) -> TokensResourceWithRawResponse:
657673
return TokensResourceWithRawResponse(self._accounts.tokens)
658674

675+
@cached_property
676+
def logs(self) -> LogsResourceWithRawResponse:
677+
return LogsResourceWithRawResponse(self._accounts.logs)
678+
659679

660680
class AsyncAccountsResourceWithRawResponse:
661681
def __init__(self, accounts: AsyncAccountsResource) -> None:
@@ -693,6 +713,10 @@ def subscriptions(self) -> AsyncSubscriptionsResourceWithRawResponse:
693713
def tokens(self) -> AsyncTokensResourceWithRawResponse:
694714
return AsyncTokensResourceWithRawResponse(self._accounts.tokens)
695715

716+
@cached_property
717+
def logs(self) -> AsyncLogsResourceWithRawResponse:
718+
return AsyncLogsResourceWithRawResponse(self._accounts.logs)
719+
696720

697721
class AccountsResourceWithStreamingResponse:
698722
def __init__(self, accounts: AccountsResource) -> None:
@@ -730,6 +754,10 @@ def subscriptions(self) -> SubscriptionsResourceWithStreamingResponse:
730754
def tokens(self) -> TokensResourceWithStreamingResponse:
731755
return TokensResourceWithStreamingResponse(self._accounts.tokens)
732756

757+
@cached_property
758+
def logs(self) -> LogsResourceWithStreamingResponse:
759+
return LogsResourceWithStreamingResponse(self._accounts.logs)
760+
733761

734762
class AsyncAccountsResourceWithStreamingResponse:
735763
def __init__(self, accounts: AsyncAccountsResource) -> None:
@@ -766,3 +794,7 @@ def subscriptions(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
766794
@cached_property
767795
def tokens(self) -> AsyncTokensResourceWithStreamingResponse:
768796
return AsyncTokensResourceWithStreamingResponse(self._accounts.tokens)
797+
798+
@cached_property
799+
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
800+
return AsyncLogsResourceWithStreamingResponse(self._accounts.logs)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .logs import (
4+
LogsResource,
5+
AsyncLogsResource,
6+
LogsResourceWithRawResponse,
7+
AsyncLogsResourceWithRawResponse,
8+
LogsResourceWithStreamingResponse,
9+
AsyncLogsResourceWithStreamingResponse,
10+
)
11+
from .audit import (
12+
AuditResource,
13+
AsyncAuditResource,
14+
AuditResourceWithRawResponse,
15+
AsyncAuditResourceWithRawResponse,
16+
AuditResourceWithStreamingResponse,
17+
AsyncAuditResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"AuditResource",
22+
"AsyncAuditResource",
23+
"AuditResourceWithRawResponse",
24+
"AsyncAuditResourceWithRawResponse",
25+
"AuditResourceWithStreamingResponse",
26+
"AsyncAuditResourceWithStreamingResponse",
27+
"LogsResource",
28+
"AsyncLogsResource",
29+
"LogsResourceWithRawResponse",
30+
"AsyncLogsResourceWithRawResponse",
31+
"LogsResourceWithStreamingResponse",
32+
"AsyncLogsResourceWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)