Skip to content

Commit 4f7489f

Browse files
feat: feat(observability): adds Workers > Observability > Queries
* feat(observability): adds Workers > Observability > Queries
1 parent d1ef1b7 commit 4f7489f

11 files changed

Lines changed: 1451 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2277
1+
configured_endpoints: 2279
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
33
openapi_spec_hash: c0d553c22ef1e807dd815f71023050f4
4-
config_hash: 245f966442f3af14c23b79cbfdf06161
4+
config_hash: 2d1850b4aac63bb32193367c174c33cd

src/cloudflare/resources/workers/api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,16 @@ Methods:
337337
- <code title="patch /accounts/{account_id}/workers/observability/destinations/{slug}">client.workers.observability.destinations.<a href="./src/cloudflare/resources/workers/observability/destinations.py">update</a>(slug, \*, account_id, \*\*<a href="src/cloudflare/types/workers/observability/destination_update_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/observability/destination_update_response.py">DestinationUpdateResponse</a></code>
338338
- <code title="get /accounts/{account_id}/workers/observability/destinations">client.workers.observability.destinations.<a href="./src/cloudflare/resources/workers/observability/destinations.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/workers/observability/destination_list_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/observability/destination_list_response.py">SyncSinglePage[DestinationListResponse]</a></code>
339339
- <code title="delete /accounts/{account_id}/workers/observability/destinations/{slug}">client.workers.observability.destinations.<a href="./src/cloudflare/resources/workers/observability/destinations.py">delete</a>(slug, \*, account_id) -> <a href="./src/cloudflare/types/workers/observability/destination_delete_response.py">Optional[DestinationDeleteResponse]</a></code>
340+
341+
### Queries
342+
343+
Types:
344+
345+
```python
346+
from cloudflare.types.workers.observability import QueryCreateResponse, QueryListResponse
347+
```
348+
349+
Methods:
350+
351+
- <code title="post /accounts/{account_id}/workers/observability/queries">client.workers.observability.queries.<a href="./src/cloudflare/resources/workers/observability/queries.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/workers/observability/query_create_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/observability/query_create_response.py">QueryCreateResponse</a></code>
352+
- <code title="get /accounts/{account_id}/workers/observability/queries">client.workers.observability.queries.<a href="./src/cloudflare/resources/workers/observability/queries.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/workers/observability/query_list_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/observability/query_list_response.py">SyncSinglePage[QueryListResponse]</a></code>

src/cloudflare/resources/workers/observability/__init__.py

Lines changed: 14 additions & 0 deletions
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 .queries import (
4+
QueriesResource,
5+
AsyncQueriesResource,
6+
QueriesResourceWithRawResponse,
7+
AsyncQueriesResourceWithRawResponse,
8+
QueriesResourceWithStreamingResponse,
9+
AsyncQueriesResourceWithStreamingResponse,
10+
)
311
from .telemetry import (
412
TelemetryResource,
513
AsyncTelemetryResource,
@@ -38,6 +46,12 @@
3846
"AsyncDestinationsResourceWithRawResponse",
3947
"DestinationsResourceWithStreamingResponse",
4048
"AsyncDestinationsResourceWithStreamingResponse",
49+
"QueriesResource",
50+
"AsyncQueriesResource",
51+
"QueriesResourceWithRawResponse",
52+
"AsyncQueriesResourceWithRawResponse",
53+
"QueriesResourceWithStreamingResponse",
54+
"AsyncQueriesResourceWithStreamingResponse",
4155
"ObservabilityResource",
4256
"AsyncObservabilityResource",
4357
"ObservabilityResourceWithRawResponse",

src/cloudflare/resources/workers/observability/observability.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
from __future__ import annotations
44

5+
from .queries import (
6+
QueriesResource,
7+
AsyncQueriesResource,
8+
QueriesResourceWithRawResponse,
9+
AsyncQueriesResourceWithRawResponse,
10+
QueriesResourceWithStreamingResponse,
11+
AsyncQueriesResourceWithStreamingResponse,
12+
)
513
from .telemetry import (
614
TelemetryResource,
715
AsyncTelemetryResource,
@@ -33,6 +41,10 @@ def telemetry(self) -> TelemetryResource:
3341
def destinations(self) -> DestinationsResource:
3442
return DestinationsResource(self._client)
3543

44+
@cached_property
45+
def queries(self) -> QueriesResource:
46+
return QueriesResource(self._client)
47+
3648
@cached_property
3749
def with_raw_response(self) -> ObservabilityResourceWithRawResponse:
3850
"""
@@ -62,6 +74,10 @@ def telemetry(self) -> AsyncTelemetryResource:
6274
def destinations(self) -> AsyncDestinationsResource:
6375
return AsyncDestinationsResource(self._client)
6476

77+
@cached_property
78+
def queries(self) -> AsyncQueriesResource:
79+
return AsyncQueriesResource(self._client)
80+
6581
@cached_property
6682
def with_raw_response(self) -> AsyncObservabilityResourceWithRawResponse:
6783
"""
@@ -94,6 +110,10 @@ def telemetry(self) -> TelemetryResourceWithRawResponse:
94110
def destinations(self) -> DestinationsResourceWithRawResponse:
95111
return DestinationsResourceWithRawResponse(self._observability.destinations)
96112

113+
@cached_property
114+
def queries(self) -> QueriesResourceWithRawResponse:
115+
return QueriesResourceWithRawResponse(self._observability.queries)
116+
97117

98118
class AsyncObservabilityResourceWithRawResponse:
99119
def __init__(self, observability: AsyncObservabilityResource) -> None:
@@ -107,6 +127,10 @@ def telemetry(self) -> AsyncTelemetryResourceWithRawResponse:
107127
def destinations(self) -> AsyncDestinationsResourceWithRawResponse:
108128
return AsyncDestinationsResourceWithRawResponse(self._observability.destinations)
109129

130+
@cached_property
131+
def queries(self) -> AsyncQueriesResourceWithRawResponse:
132+
return AsyncQueriesResourceWithRawResponse(self._observability.queries)
133+
110134

111135
class ObservabilityResourceWithStreamingResponse:
112136
def __init__(self, observability: ObservabilityResource) -> None:
@@ -120,6 +144,10 @@ def telemetry(self) -> TelemetryResourceWithStreamingResponse:
120144
def destinations(self) -> DestinationsResourceWithStreamingResponse:
121145
return DestinationsResourceWithStreamingResponse(self._observability.destinations)
122146

147+
@cached_property
148+
def queries(self) -> QueriesResourceWithStreamingResponse:
149+
return QueriesResourceWithStreamingResponse(self._observability.queries)
150+
123151

124152
class AsyncObservabilityResourceWithStreamingResponse:
125153
def __init__(self, observability: AsyncObservabilityResource) -> None:
@@ -132,3 +160,7 @@ def telemetry(self) -> AsyncTelemetryResourceWithStreamingResponse:
132160
@cached_property
133161
def destinations(self) -> AsyncDestinationsResourceWithStreamingResponse:
134162
return AsyncDestinationsResourceWithStreamingResponse(self._observability.destinations)
163+
164+
@cached_property
165+
def queries(self) -> AsyncQueriesResourceWithStreamingResponse:
166+
return AsyncQueriesResourceWithStreamingResponse(self._observability.queries)

0 commit comments

Comments
 (0)