Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef0e953

Browse files
feat(api): api update
1 parent0e03991 commitef0e953

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

‎.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints:1742
2-
openapi_spec_url:https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc54ffd5dacdc5e7acae5244f31ef0a23b8a4eb8d6d5c3e19750563428741d0.yml
3-
openapi_spec_hash:30567e884ac1ae8bcb1c678862942a82
2+
openapi_spec_url:https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fa61c97ef67a21a2338842ec442f82956fbdaf3d063095d626af30ddbabd7914.yml
3+
openapi_spec_hash:c54f526437f6ef1a8a9a3b3e74ce93fb
44
config_hash:cb36b26a5fcc81fa60c65016b1e74f0a

‎src/cloudflare/resources/logs/control/cmb/config.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def create(
4848
self,
4949
*,
5050
account_id:str,
51+
allow_out_of_region_access:bool|NotGiven=NOT_GIVEN,
5152
regions:str|NotGiven=NOT_GIVEN,
5253
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5354
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -62,6 +63,8 @@ def create(
6263
Args:
6364
account_id: Identifier.
6465
66+
allow_out_of_region_access: Allow out of region access
67+
6568
regions: Name of the region.
6669
6770
extra_headers: Send extra headers
@@ -76,7 +79,13 @@ def create(
7679
raiseValueError(f"Expected a non-empty value for `account_id` but received{account_id!r}")
7780
returnself._post(
7881
f"/accounts/{account_id}/logs/control/cmb/config",
79-
body=maybe_transform({"regions":regions},config_create_params.ConfigCreateParams),
82+
body=maybe_transform(
83+
{
84+
"allow_out_of_region_access":allow_out_of_region_access,
85+
"regions":regions,
86+
},
87+
config_create_params.ConfigCreateParams,
88+
),
8089
options=make_request_options(
8190
extra_headers=extra_headers,
8291
extra_query=extra_query,
@@ -190,6 +199,7 @@ async def create(
190199
self,
191200
*,
192201
account_id:str,
202+
allow_out_of_region_access:bool|NotGiven=NOT_GIVEN,
193203
regions:str|NotGiven=NOT_GIVEN,
194204
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
195205
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -204,6 +214,8 @@ async def create(
204214
Args:
205215
account_id: Identifier.
206216
217+
allow_out_of_region_access: Allow out of region access
218+
207219
regions: Name of the region.
208220
209221
extra_headers: Send extra headers
@@ -218,7 +230,13 @@ async def create(
218230
raiseValueError(f"Expected a non-empty value for `account_id` but received{account_id!r}")
219231
returnawaitself._post(
220232
f"/accounts/{account_id}/logs/control/cmb/config",
221-
body=awaitasync_maybe_transform({"regions":regions},config_create_params.ConfigCreateParams),
233+
body=awaitasync_maybe_transform(
234+
{
235+
"allow_out_of_region_access":allow_out_of_region_access,
236+
"regions":regions,
237+
},
238+
config_create_params.ConfigCreateParams,
239+
),
222240
options=make_request_options(
223241
extra_headers=extra_headers,
224242
extra_query=extra_query,

‎src/cloudflare/types/logs/control/cmb/cmb_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88

99

1010
classCmbConfig(BaseModel):
11+
allow_out_of_region_access:Optional[bool]=None
12+
"""Allow out of region access"""
13+
1114
regions:Optional[str]=None
1215
"""Name of the region."""

‎src/cloudflare/types/logs/control/cmb/config_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ class ConfigCreateParams(TypedDict, total=False):
1111
account_id:Required[str]
1212
"""Identifier."""
1313

14+
allow_out_of_region_access:bool
15+
"""Allow out of region access"""
16+
1417
regions:str
1518
"""Name of the region."""

‎tests/api_resources/logs/control/cmb/test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None:
2828
deftest_method_create_with_all_params(self,client:Cloudflare)->None:
2929
config=client.logs.control.cmb.config.create(
3030
account_id="023e105f4ecef8ad9ca31a8372d0c353",
31+
allow_out_of_region_access=False,
3132
regions="eu",
3233
)
3334
assert_matches_type(Optional[CmbConfig],config,path=["response"])
@@ -154,6 +155,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
154155
asyncdeftest_method_create_with_all_params(self,async_client:AsyncCloudflare)->None:
155156
config=awaitasync_client.logs.control.cmb.config.create(
156157
account_id="023e105f4ecef8ad9ca31a8372d0c353",
158+
allow_out_of_region_access=False,
157159
regions="eu",
158160
)
159161
assert_matches_type(Optional[CmbConfig],config,path=["response"])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp