Skip to content

Commit 7199aa3

Browse files
chore(api): update composite API spec
1 parent bba0824 commit 7199aa3

4 files changed

Lines changed: 20 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 @@
11
configured_endpoints: 1887
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e4e4a9e871d82e70a7ac93f03e8921ee452a7d01772adc0eb99dcd4dbe7a59e8.yml
3-
openapi_spec_hash: 195329a79dc7a999de4ceb1680746dee
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe5f9f74ec7fae587b81aa6c4405a2129bbe6c146d36a6a8eee6cbc184dceb01.yml
3+
openapi_spec_hash: ad2c2470332035b5d92e2a94faefe5a6
44
config_hash: 47bfb436213622df92afdda8ce4f077f

src/cloudflare/resources/d1/database.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def create(
6565
*,
6666
account_id: str,
6767
name: str,
68+
jurisdiction: Literal["eu", "fedramp"] | Omit = omit,
6869
primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"] | Omit = omit,
6970
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7071
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -81,6 +82,9 @@ def create(
8182
8283
name: D1 database name.
8384
85+
jurisdiction: Specify the location to restrict the D1 database to run and store data. If this
86+
option is present, the location hint is ignored.
87+
8488
primary_location_hint: Specify the region to create the D1 primary, if available. If this option is
8589
omitted, the D1 will be created as close as possible to the current user.
8690
@@ -99,6 +103,7 @@ def create(
99103
body=maybe_transform(
100104
{
101105
"name": name,
106+
"jurisdiction": jurisdiction,
102107
"primary_location_hint": primary_location_hint,
103108
},
104109
database_create_params.DatabaseCreateParams,
@@ -722,6 +727,7 @@ async def create(
722727
*,
723728
account_id: str,
724729
name: str,
730+
jurisdiction: Literal["eu", "fedramp"] | Omit = omit,
725731
primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"] | Omit = omit,
726732
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
727733
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -738,6 +744,9 @@ async def create(
738744
739745
name: D1 database name.
740746
747+
jurisdiction: Specify the location to restrict the D1 database to run and store data. If this
748+
option is present, the location hint is ignored.
749+
741750
primary_location_hint: Specify the region to create the D1 primary, if available. If this option is
742751
omitted, the D1 will be created as close as possible to the current user.
743752
@@ -756,6 +765,7 @@ async def create(
756765
body=await async_maybe_transform(
757766
{
758767
"name": name,
768+
"jurisdiction": jurisdiction,
759769
"primary_location_hint": primary_location_hint,
760770
},
761771
database_create_params.DatabaseCreateParams,

src/cloudflare/types/d1/database_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class DatabaseCreateParams(TypedDict, total=False):
1414
name: Required[str]
1515
"""D1 database name."""
1616

17+
jurisdiction: Literal["eu", "fedramp"]
18+
"""Specify the location to restrict the D1 database to run and store data.
19+
20+
If this option is present, the location hint is ignored.
21+
"""
22+
1723
primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"]
1824
"""Specify the region to create the D1 primary, if available.
1925

tests/api_resources/d1/test_database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3838
database = client.d1.database.create(
3939
account_id="023e105f4ecef8ad9ca31a8372d0c353",
4040
name="my-database",
41+
jurisdiction="eu",
4142
primary_location_hint="wnam",
4243
)
4344
assert_matches_type(D1, database, path=["response"])
@@ -722,6 +723,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
722723
database = await async_client.d1.database.create(
723724
account_id="023e105f4ecef8ad9ca31a8372d0c353",
724725
name="my-database",
726+
jurisdiction="eu",
725727
primary_location_hint="wnam",
726728
)
727729
assert_matches_type(D1, database, path=["response"])

0 commit comments

Comments
 (0)