Skip to content

Commit c409a18

Browse files
feat: feat: add MoQ relays to prod (RT-603)
* feat: add moq to Media docs sidebar (RT-603) Mirrors the docs-sidebar change already merged on `staging` in bc6efc0d, ported here to `main`. Prior staging commit: https://gitlab.cfdata.org/cloudflare/sdks/cloudflare-config/-/commit/bc6efc0d56c3e82de73517fdc75e023c477cf1c5 * feat: add MoQ relays to prod (RT-603)
1 parent 66c8009 commit c409a18

24 files changed

Lines changed: 2207 additions & 3 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2403
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-61e07cf647d4d06c1be0372b305a2ac6d59f5dd04665dcccee0ab93e7f4bb21d.yml
1+
configured_endpoints: 2409
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-412697de2e0d5950b5488562c5d94529f201df103c4158c39258cd60e7ae49f9.yml
33
openapi_spec_hash: f780d69e713934cfb42036b9ba1462f8
4-
config_hash: 2f529580a17438fc62cd0b47db41b6f1
4+
config_hash: bbf6df558b7c0807286a2085dd306dde

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ from cloudflare.types import (
211211

212212
# [Calls](src/cloudflare/resources/calls/api.md)
213213

214+
# [Moq](src/cloudflare/resources/moq/api.md)
215+
214216
# [CloudforceOne](src/cloudflare/resources/cloudforce_one/api.md)
215217

216218
# [AIGateway](src/cloudflare/resources/ai_gateway/api.md)

src/cloudflare/_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
dns,
4848
iam,
4949
ips,
50+
moq,
5051
rum,
5152
ssl,
5253
argo,
@@ -163,6 +164,7 @@
163164
from .resources.dns.dns import DNSResource, AsyncDNSResource
164165
from .resources.iam.iam import IAMResource, AsyncIAMResource
165166
from .resources.ips.ips import IPsResource, AsyncIPsResource
167+
from .resources.moq.moq import MoqResource, AsyncMoqResource
166168
from .resources.rum.rum import RUMResource, AsyncRUMResource
167169
from .resources.ssl.ssl import SSLResource, AsyncSSLResource
168170
from .resources.argo.argo import ArgoResource, AsyncArgoResource
@@ -965,6 +967,12 @@ def calls(self) -> CallsResource:
965967

966968
return CallsResource(self)
967969

970+
@cached_property
971+
def moq(self) -> MoqResource:
972+
from .resources.moq import MoqResource
973+
974+
return MoqResource(self)
975+
968976
@cached_property
969977
def cloudforce_one(self) -> CloudforceOneResource:
970978
from .resources.cloudforce_one import CloudforceOneResource
@@ -1917,6 +1925,12 @@ def calls(self) -> AsyncCallsResource:
19171925

19181926
return AsyncCallsResource(self)
19191927

1928+
@cached_property
1929+
def moq(self) -> AsyncMoqResource:
1930+
from .resources.moq import AsyncMoqResource
1931+
1932+
return AsyncMoqResource(self)
1933+
19201934
@cached_property
19211935
def cloudforce_one(self) -> AsyncCloudforceOneResource:
19221936
from .resources.cloudforce_one import AsyncCloudforceOneResource
@@ -2793,6 +2807,12 @@ def calls(self) -> calls.CallsResourceWithRawResponse:
27932807

27942808
return CallsResourceWithRawResponse(self._client.calls)
27952809

2810+
@cached_property
2811+
def moq(self) -> moq.MoqResourceWithRawResponse:
2812+
from .resources.moq import MoqResourceWithRawResponse
2813+
2814+
return MoqResourceWithRawResponse(self._client.moq)
2815+
27962816
@cached_property
27972817
def cloudforce_one(self) -> cloudforce_one.CloudforceOneResourceWithRawResponse:
27982818
from .resources.cloudforce_one import CloudforceOneResourceWithRawResponse
@@ -3496,6 +3516,12 @@ def calls(self) -> calls.AsyncCallsResourceWithRawResponse:
34963516

34973517
return AsyncCallsResourceWithRawResponse(self._client.calls)
34983518

3519+
@cached_property
3520+
def moq(self) -> moq.AsyncMoqResourceWithRawResponse:
3521+
from .resources.moq import AsyncMoqResourceWithRawResponse
3522+
3523+
return AsyncMoqResourceWithRawResponse(self._client.moq)
3524+
34993525
@cached_property
35003526
def cloudforce_one(self) -> cloudforce_one.AsyncCloudforceOneResourceWithRawResponse:
35013527
from .resources.cloudforce_one import AsyncCloudforceOneResourceWithRawResponse
@@ -4199,6 +4225,12 @@ def calls(self) -> calls.CallsResourceWithStreamingResponse:
41994225

42004226
return CallsResourceWithStreamingResponse(self._client.calls)
42014227

4228+
@cached_property
4229+
def moq(self) -> moq.MoqResourceWithStreamingResponse:
4230+
from .resources.moq import MoqResourceWithStreamingResponse
4231+
4232+
return MoqResourceWithStreamingResponse(self._client.moq)
4233+
42024234
@cached_property
42034235
def cloudforce_one(self) -> cloudforce_one.CloudforceOneResourceWithStreamingResponse:
42044236
from .resources.cloudforce_one import CloudforceOneResourceWithStreamingResponse
@@ -4910,6 +4942,12 @@ def calls(self) -> calls.AsyncCallsResourceWithStreamingResponse:
49104942

49114943
return AsyncCallsResourceWithStreamingResponse(self._client.calls)
49124944

4945+
@cached_property
4946+
def moq(self) -> moq.AsyncMoqResourceWithStreamingResponse:
4947+
from .resources.moq import AsyncMoqResourceWithStreamingResponse
4948+
4949+
return AsyncMoqResourceWithStreamingResponse(self._client.moq)
4950+
49134951
@cached_property
49144952
def cloudforce_one(self) -> cloudforce_one.AsyncCloudforceOneResourceWithStreamingResponse:
49154953
from .resources.cloudforce_one import AsyncCloudforceOneResourceWithStreamingResponse
Lines changed: 33 additions & 0 deletions
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 .moq import (
4+
MoqResource,
5+
AsyncMoqResource,
6+
MoqResourceWithRawResponse,
7+
AsyncMoqResourceWithRawResponse,
8+
MoqResourceWithStreamingResponse,
9+
AsyncMoqResourceWithStreamingResponse,
10+
)
11+
from .relays import (
12+
RelaysResource,
13+
AsyncRelaysResource,
14+
RelaysResourceWithRawResponse,
15+
AsyncRelaysResourceWithRawResponse,
16+
RelaysResourceWithStreamingResponse,
17+
AsyncRelaysResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"RelaysResource",
22+
"AsyncRelaysResource",
23+
"RelaysResourceWithRawResponse",
24+
"AsyncRelaysResourceWithRawResponse",
25+
"RelaysResourceWithStreamingResponse",
26+
"AsyncRelaysResourceWithStreamingResponse",
27+
"MoqResource",
28+
"AsyncMoqResource",
29+
"MoqResourceWithRawResponse",
30+
"AsyncMoqResourceWithRawResponse",
31+
"MoqResourceWithStreamingResponse",
32+
"AsyncMoqResourceWithStreamingResponse",
33+
]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Moq
2+
3+
## Relays
4+
5+
Types:
6+
7+
```python
8+
from cloudflare.types.moq import (
9+
RelayCreateResponse,
10+
RelayUpdateResponse,
11+
RelayListResponse,
12+
RelayGetResponse,
13+
)
14+
```
15+
16+
Methods:
17+
18+
- <code title="post /accounts/{account_id}/moq/relays">client.moq.relays.<a href="./src/cloudflare/resources/moq/relays/relays.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/moq/relay_create_params.py">params</a>) -> <a href="./src/cloudflare/types/moq/relay_create_response.py">Optional[RelayCreateResponse]</a></code>
19+
- <code title="put /accounts/{account_id}/moq/relays/{relay_id}">client.moq.relays.<a href="./src/cloudflare/resources/moq/relays/relays.py">update</a>(relay_id, \*, account_id, \*\*<a href="src/cloudflare/types/moq/relay_update_params.py">params</a>) -> <a href="./src/cloudflare/types/moq/relay_update_response.py">Optional[RelayUpdateResponse]</a></code>
20+
- <code title="get /accounts/{account_id}/moq/relays">client.moq.relays.<a href="./src/cloudflare/resources/moq/relays/relays.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/moq/relay_list_params.py">params</a>) -> <a href="./src/cloudflare/types/moq/relay_list_response.py">SyncSinglePage[RelayListResponse]</a></code>
21+
- <code title="delete /accounts/{account_id}/moq/relays/{relay_id}">client.moq.relays.<a href="./src/cloudflare/resources/moq/relays/relays.py">delete</a>(relay_id, \*, account_id) -> object</code>
22+
- <code title="get /accounts/{account_id}/moq/relays/{relay_id}">client.moq.relays.<a href="./src/cloudflare/resources/moq/relays/relays.py">get</a>(relay_id, \*, account_id) -> <a href="./src/cloudflare/types/moq/relay_get_response.py">Optional[RelayGetResponse]</a></code>
23+
24+
### Tokens
25+
26+
Types:
27+
28+
```python
29+
from cloudflare.types.moq.relays import TokenRotateResponse
30+
```
31+
32+
Methods:
33+
34+
- <code title="post /accounts/{account_id}/moq/relays/{relay_id}/tokens/rotate">client.moq.relays.tokens.<a href="./src/cloudflare/resources/moq/relays/tokens.py">rotate</a>(relay_id, \*, account_id, \*\*<a href="src/cloudflare/types/moq/relays/token_rotate_params.py">params</a>) -> <a href="./src/cloudflare/types/moq/relays/token_rotate_response.py">Optional[TokenRotateResponse]</a></code>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from ..._compat import cached_property
6+
from ..._resource import SyncAPIResource, AsyncAPIResource
7+
from .relays.relays import (
8+
RelaysResource,
9+
AsyncRelaysResource,
10+
RelaysResourceWithRawResponse,
11+
AsyncRelaysResourceWithRawResponse,
12+
RelaysResourceWithStreamingResponse,
13+
AsyncRelaysResourceWithStreamingResponse,
14+
)
15+
16+
__all__ = ["MoqResource", "AsyncMoqResource"]
17+
18+
19+
class MoqResource(SyncAPIResource):
20+
@cached_property
21+
def relays(self) -> RelaysResource:
22+
return RelaysResource(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> MoqResourceWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return MoqResourceWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> MoqResourceWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
40+
"""
41+
return MoqResourceWithStreamingResponse(self)
42+
43+
44+
class AsyncMoqResource(AsyncAPIResource):
45+
@cached_property
46+
def relays(self) -> AsyncRelaysResource:
47+
return AsyncRelaysResource(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncMoqResourceWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncMoqResourceWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncMoqResourceWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
65+
"""
66+
return AsyncMoqResourceWithStreamingResponse(self)
67+
68+
69+
class MoqResourceWithRawResponse:
70+
def __init__(self, moq: MoqResource) -> None:
71+
self._moq = moq
72+
73+
@cached_property
74+
def relays(self) -> RelaysResourceWithRawResponse:
75+
return RelaysResourceWithRawResponse(self._moq.relays)
76+
77+
78+
class AsyncMoqResourceWithRawResponse:
79+
def __init__(self, moq: AsyncMoqResource) -> None:
80+
self._moq = moq
81+
82+
@cached_property
83+
def relays(self) -> AsyncRelaysResourceWithRawResponse:
84+
return AsyncRelaysResourceWithRawResponse(self._moq.relays)
85+
86+
87+
class MoqResourceWithStreamingResponse:
88+
def __init__(self, moq: MoqResource) -> None:
89+
self._moq = moq
90+
91+
@cached_property
92+
def relays(self) -> RelaysResourceWithStreamingResponse:
93+
return RelaysResourceWithStreamingResponse(self._moq.relays)
94+
95+
96+
class AsyncMoqResourceWithStreamingResponse:
97+
def __init__(self, moq: AsyncMoqResource) -> None:
98+
self._moq = moq
99+
100+
@cached_property
101+
def relays(self) -> AsyncRelaysResourceWithStreamingResponse:
102+
return AsyncRelaysResourceWithStreamingResponse(self._moq.relays)
Lines changed: 33 additions & 0 deletions
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 .relays import (
4+
RelaysResource,
5+
AsyncRelaysResource,
6+
RelaysResourceWithRawResponse,
7+
AsyncRelaysResourceWithRawResponse,
8+
RelaysResourceWithStreamingResponse,
9+
AsyncRelaysResourceWithStreamingResponse,
10+
)
11+
from .tokens import (
12+
TokensResource,
13+
AsyncTokensResource,
14+
TokensResourceWithRawResponse,
15+
AsyncTokensResourceWithRawResponse,
16+
TokensResourceWithStreamingResponse,
17+
AsyncTokensResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"TokensResource",
22+
"AsyncTokensResource",
23+
"TokensResourceWithRawResponse",
24+
"AsyncTokensResourceWithRawResponse",
25+
"TokensResourceWithStreamingResponse",
26+
"AsyncTokensResourceWithStreamingResponse",
27+
"RelaysResource",
28+
"AsyncRelaysResource",
29+
"RelaysResourceWithRawResponse",
30+
"AsyncRelaysResourceWithRawResponse",
31+
"RelaysResourceWithStreamingResponse",
32+
"AsyncRelaysResourceWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)