diff --git a/.stats.yml b/.stats.yml index 9d826750612..4ed54090120 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1490 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f9dc65d353b377858f3d63d594de47559ed3a9d562295719690867315b8ec2fe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d7f8b3901624cc79465181c32dea2901c658e382a5ed3acada4692760b77f9c0.yml diff --git a/src/cloudflare/resources/r2/buckets/buckets.py b/src/cloudflare/resources/r2/buckets/buckets.py index d1556b62dd5..aa079a82241 100644 --- a/src/cloudflare/resources/r2/buckets/buckets.py +++ b/src/cloudflare/resources/r2/buckets/buckets.py @@ -118,7 +118,7 @@ def create( name: str, location_hint: Literal["apac", "eeur", "enam", "weur", "wnam"] | NotGiven = NOT_GIVEN, storage_class: Literal["Standard", "InfrequentAccess"] | NotGiven = NOT_GIVEN, - cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, + jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -138,7 +138,7 @@ def create( storage_class: Storage class for newly uploaded objects, unless specified otherwise. - cf_r2_jurisdiction: Creates the bucket in the provided jurisdiction + jurisdiction: Creates the bucket in the provided jurisdiction extra_headers: Send extra headers @@ -151,9 +151,7 @@ def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") extra_headers = { - **strip_not_given( - {"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN} - ), + **strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}), **(extra_headers or {}), } return self._post( @@ -409,7 +407,7 @@ async def create( name: str, location_hint: Literal["apac", "eeur", "enam", "weur", "wnam"] | NotGiven = NOT_GIVEN, storage_class: Literal["Standard", "InfrequentAccess"] | NotGiven = NOT_GIVEN, - cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, + jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -429,7 +427,7 @@ async def create( storage_class: Storage class for newly uploaded objects, unless specified otherwise. - cf_r2_jurisdiction: Creates the bucket in the provided jurisdiction + jurisdiction: Creates the bucket in the provided jurisdiction extra_headers: Send extra headers @@ -442,9 +440,7 @@ async def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") extra_headers = { - **strip_not_given( - {"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN} - ), + **strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}), **(extra_headers or {}), } return await self._post( diff --git a/src/cloudflare/types/r2/bucket_create_params.py b/src/cloudflare/types/r2/bucket_create_params.py index f3c106fa96f..2515c1d8a5c 100644 --- a/src/cloudflare/types/r2/bucket_create_params.py +++ b/src/cloudflare/types/r2/bucket_create_params.py @@ -22,5 +22,5 @@ class BucketCreateParams(TypedDict, total=False): storage_class: Annotated[Literal["Standard", "InfrequentAccess"], PropertyInfo(alias="storageClass")] """Storage class for newly uploaded objects, unless specified otherwise.""" - cf_r2_jurisdiction: Annotated[Literal["default", "eu", "fedramp"], PropertyInfo(alias="cf-r2-jurisdiction")] + jurisdiction: Annotated[Literal["default", "eu", "fedramp"], PropertyInfo(alias="cf-r2-jurisdiction")] """Creates the bucket in the provided jurisdiction""" diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index e1713e18824..f67973490ce 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example-bucket", location_hint="apac", storage_class="Standard", - cf_r2_jurisdiction="default", + jurisdiction="default", ) assert_matches_type(Bucket, bucket, path=["response"]) @@ -277,7 +277,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example-bucket", location_hint="apac", storage_class="Standard", - cf_r2_jurisdiction="default", + jurisdiction="default", ) assert_matches_type(Bucket, bucket, path=["response"])