Skip to content

Commit 7a3837a

Browse files
feat(api): api update
1 parent a4ea37c commit 7a3837a

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-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: 1741
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-157e64fc5881826dc0017db780ebeefb1b9ff3d482bcc3d251a022eef8dc7107.yml
3-
openapi_spec_hash: 3b9f5ec40efeb9af2fe07f8fb0f89979
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f318e6f6ba519659336fbf171e097df5b67026a477451b17f92104f2b6a530d.yml
3+
openapi_spec_hash: d8d6ae156457ee8732072b74c1187b7d
44
config_hash: d72c4fd125f1a13d55b0929439ad8189

src/cloudflare/resources/zero_trust/networks/virtual_networks.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def create(
5656
name: str,
5757
comment: str | NotGiven = NOT_GIVEN,
5858
is_default: bool | NotGiven = NOT_GIVEN,
59+
is_default_network: bool | NotGiven = NOT_GIVEN,
5960
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6061
# The extra values given here take precedence over values defined on the client or passed to this method.
6162
extra_headers: Headers | None = None,
@@ -75,6 +76,8 @@ def create(
7576
7677
is_default: If `true`, this virtual network is the default for the account.
7778
79+
is_default_network: If `true`, this virtual network is the default for the account.
80+
7881
extra_headers: Send extra headers
7982
8083
extra_query: Add additional query parameters to the request
@@ -92,6 +95,7 @@ def create(
9295
"name": name,
9396
"comment": comment,
9497
"is_default": is_default,
98+
"is_default_network": is_default_network,
9599
},
96100
virtual_network_create_params.VirtualNetworkCreateParams,
97101
),
@@ -344,6 +348,7 @@ async def create(
344348
name: str,
345349
comment: str | NotGiven = NOT_GIVEN,
346350
is_default: bool | NotGiven = NOT_GIVEN,
351+
is_default_network: bool | NotGiven = NOT_GIVEN,
347352
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
348353
# The extra values given here take precedence over values defined on the client or passed to this method.
349354
extra_headers: Headers | None = None,
@@ -363,6 +368,8 @@ async def create(
363368
364369
is_default: If `true`, this virtual network is the default for the account.
365370
371+
is_default_network: If `true`, this virtual network is the default for the account.
372+
366373
extra_headers: Send extra headers
367374
368375
extra_query: Add additional query parameters to the request
@@ -380,6 +387,7 @@ async def create(
380387
"name": name,
381388
"comment": comment,
382389
"is_default": is_default,
390+
"is_default_network": is_default_network,
383391
},
384392
virtual_network_create_params.VirtualNetworkCreateParams,
385393
),

src/cloudflare/types/zero_trust/networks/virtual_network_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ class VirtualNetworkCreateParams(TypedDict, total=False):
1919

2020
is_default: bool
2121
"""If `true`, this virtual network is the default for the account."""
22+
23+
is_default_network: bool
24+
"""If `true`, this virtual network is the default for the account."""

tests/api_resources/zero_trust/networks/test_virtual_networks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3535
name="us-east-1-vpc",
3636
comment="Staging VPC for data science",
3737
is_default=True,
38+
is_default_network=False,
3839
)
3940
assert_matches_type(VirtualNetwork, virtual_network, path=["response"])
4041

@@ -183,7 +184,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
183184
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
184185
account_id="699d98642c564d2e855e9661899b7252",
185186
comment="Staging VPC for data science",
186-
is_default_network=True,
187+
is_default_network=False,
187188
name="us-east-1-vpc",
188189
)
189190
assert_matches_type(VirtualNetwork, virtual_network, path=["response"])
@@ -295,6 +296,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
295296
name="us-east-1-vpc",
296297
comment="Staging VPC for data science",
297298
is_default=True,
299+
is_default_network=False,
298300
)
299301
assert_matches_type(VirtualNetwork, virtual_network, path=["response"])
300302

@@ -443,7 +445,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
443445
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
444446
account_id="699d98642c564d2e855e9661899b7252",
445447
comment="Staging VPC for data science",
446-
is_default_network=True,
448+
is_default_network=False,
447449
name="us-east-1-vpc",
448450
)
449451
assert_matches_type(VirtualNetwork, virtual_network, path=["response"])

0 commit comments

Comments
 (0)