Skip to content

Commit f116592

Browse files
feat(api): api update
1 parent 3697fa3 commit f116592

7 files changed

Lines changed: 62 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: 1759
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e699b704303a3de4af5d25822ea00206bb403c43516b3743e2c008d696821af6.yml
3-
openapi_spec_hash: 1f09210c6b263f4ece3a683f7291974b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2149603ebd47ac872065d6594e87a6561ffe30aebfe31084beb2277c0ee621aa.yml
3+
openapi_spec_hash: 4a72e88a017593587a3a08c629e506fa
44
config_hash: 920bb1b417565d337cbdb7c39e77be5b

src/cloudflare/resources/hyperdrive/configs.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def create(
5353
origin: config_create_params.Origin,
5454
caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
5555
mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN,
56+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
5657
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5758
# The extra values given here take precedence over values defined on the client or passed to this method.
5859
extra_headers: Headers | None = None,
@@ -66,6 +67,9 @@ def create(
6667
Args:
6768
account_id: Define configurations using a unique string identifier.
6869
70+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
71+
the origin database.
72+
6973
extra_headers: Send extra headers
7074
7175
extra_query: Add additional query parameters to the request
@@ -84,6 +88,7 @@ def create(
8488
"origin": origin,
8589
"caching": caching,
8690
"mtls": mtls,
91+
"origin_connection_limit": origin_connection_limit,
8792
},
8893
config_create_params.ConfigCreateParams,
8994
),
@@ -106,6 +111,7 @@ def update(
106111
origin: config_update_params.Origin,
107112
caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
108113
mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN,
114+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
109115
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110116
# The extra values given here take precedence over values defined on the client or passed to this method.
111117
extra_headers: Headers | None = None,
@@ -121,6 +127,9 @@ def update(
121127
122128
hyperdrive_id: Define configurations using a unique string identifier.
123129
130+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
131+
the origin database.
132+
124133
extra_headers: Send extra headers
125134
126135
extra_query: Add additional query parameters to the request
@@ -141,6 +150,7 @@ def update(
141150
"origin": origin,
142151
"caching": caching,
143152
"mtls": mtls,
153+
"origin_connection_limit": origin_connection_limit,
144154
},
145155
config_update_params.ConfigUpdateParams,
146156
),
@@ -243,6 +253,7 @@ def edit(
243253
mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN,
244254
name: str | NotGiven = NOT_GIVEN,
245255
origin: config_edit_params.Origin | NotGiven = NOT_GIVEN,
256+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
246257
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
247258
# The extra values given here take precedence over values defined on the client or passed to this method.
248259
extra_headers: Headers | None = None,
@@ -260,6 +271,9 @@ def edit(
260271
261272
hyperdrive_id: Define configurations using a unique string identifier.
262273
274+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
275+
the origin database.
276+
263277
extra_headers: Send extra headers
264278
265279
extra_query: Add additional query parameters to the request
@@ -280,6 +294,7 @@ def edit(
280294
"mtls": mtls,
281295
"name": name,
282296
"origin": origin,
297+
"origin_connection_limit": origin_connection_limit,
283298
},
284299
config_edit_params.ConfigEditParams,
285300
),
@@ -366,6 +381,7 @@ async def create(
366381
origin: config_create_params.Origin,
367382
caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
368383
mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN,
384+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
369385
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
370386
# The extra values given here take precedence over values defined on the client or passed to this method.
371387
extra_headers: Headers | None = None,
@@ -379,6 +395,9 @@ async def create(
379395
Args:
380396
account_id: Define configurations using a unique string identifier.
381397
398+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
399+
the origin database.
400+
382401
extra_headers: Send extra headers
383402
384403
extra_query: Add additional query parameters to the request
@@ -397,6 +416,7 @@ async def create(
397416
"origin": origin,
398417
"caching": caching,
399418
"mtls": mtls,
419+
"origin_connection_limit": origin_connection_limit,
400420
},
401421
config_create_params.ConfigCreateParams,
402422
),
@@ -419,6 +439,7 @@ async def update(
419439
origin: config_update_params.Origin,
420440
caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
421441
mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN,
442+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
422443
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423444
# The extra values given here take precedence over values defined on the client or passed to this method.
424445
extra_headers: Headers | None = None,
@@ -434,6 +455,9 @@ async def update(
434455
435456
hyperdrive_id: Define configurations using a unique string identifier.
436457
458+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
459+
the origin database.
460+
437461
extra_headers: Send extra headers
438462
439463
extra_query: Add additional query parameters to the request
@@ -454,6 +478,7 @@ async def update(
454478
"origin": origin,
455479
"caching": caching,
456480
"mtls": mtls,
481+
"origin_connection_limit": origin_connection_limit,
457482
},
458483
config_update_params.ConfigUpdateParams,
459484
),
@@ -556,6 +581,7 @@ async def edit(
556581
mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN,
557582
name: str | NotGiven = NOT_GIVEN,
558583
origin: config_edit_params.Origin | NotGiven = NOT_GIVEN,
584+
origin_connection_limit: int | NotGiven = NOT_GIVEN,
559585
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
560586
# The extra values given here take precedence over values defined on the client or passed to this method.
561587
extra_headers: Headers | None = None,
@@ -573,6 +599,9 @@ async def edit(
573599
574600
hyperdrive_id: Define configurations using a unique string identifier.
575601
602+
origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to
603+
the origin database.
604+
576605
extra_headers: Send extra headers
577606
578607
extra_query: Add additional query parameters to the request
@@ -593,6 +622,7 @@ async def edit(
593622
"mtls": mtls,
594623
"name": name,
595624
"origin": origin,
625+
"origin_connection_limit": origin_connection_limit,
596626
},
597627
config_edit_params.ConfigEditParams,
598628
),

src/cloudflare/types/hyperdrive/config_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ class ConfigCreateParams(TypedDict, total=False):
2929

3030
mtls: MTLS
3131

32+
origin_connection_limit: int
33+
"""
34+
The (soft) maximum number of connections the Hyperdrive is allowed to make to
35+
the origin database.
36+
"""
37+
3238

3339
class OriginPublicDatabase(TypedDict, total=False):
3440
database: Required[str]

src/cloudflare/types/hyperdrive/config_edit_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class ConfigEditParams(TypedDict, total=False):
3030

3131
origin: Origin
3232

33+
origin_connection_limit: int
34+
"""
35+
The (soft) maximum number of connections the Hyperdrive is allowed to make to
36+
the origin database.
37+
"""
38+
3339

3440
class CachingHyperdriveHyperdriveCachingCommon(TypedDict, total=False):
3541
disabled: bool

src/cloudflare/types/hyperdrive/config_update_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ class ConfigUpdateParams(TypedDict, total=False):
2929

3030
mtls: MTLS
3131

32+
origin_connection_limit: int
33+
"""
34+
The (soft) maximum number of connections the Hyperdrive is allowed to make to
35+
the origin database.
36+
"""
37+
3238

3339
class OriginPublicDatabase(TypedDict, total=False):
3440
database: Required[str]

src/cloudflare/types/hyperdrive/hyperdrive.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,9 @@ class Hyperdrive(BaseModel):
111111
"""Defines the last modified time of the Hyperdrive configuration."""
112112

113113
mtls: Optional[MTLS] = None
114+
115+
origin_connection_limit: Optional[int] = None
116+
"""
117+
The (soft) maximum number of connections the Hyperdrive is allowed to make to
118+
the origin database.
119+
"""

tests/api_resources/hyperdrive/test_configs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
5555
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
5656
"sslmode": "verify-full",
5757
},
58+
origin_connection_limit=60,
5859
)
5960
assert_matches_type(Hyperdrive, config, path=["response"])
6061

@@ -158,6 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
158159
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
159160
"sslmode": "verify-full",
160161
},
162+
origin_connection_limit=60,
161163
)
162164
assert_matches_type(Hyperdrive, config, path=["response"])
163165

@@ -353,6 +355,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
353355
"scheme": "postgres",
354356
"user": "postgres",
355357
},
358+
origin_connection_limit=60,
356359
)
357360
assert_matches_type(Hyperdrive, config, path=["response"])
358361

@@ -490,6 +493,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
490493
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
491494
"sslmode": "verify-full",
492495
},
496+
origin_connection_limit=60,
493497
)
494498
assert_matches_type(Hyperdrive, config, path=["response"])
495499

@@ -593,6 +597,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
593597
"mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
594598
"sslmode": "verify-full",
595599
},
600+
origin_connection_limit=60,
596601
)
597602
assert_matches_type(Hyperdrive, config, path=["response"])
598603

@@ -788,6 +793,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
788793
"scheme": "postgres",
789794
"user": "postgres",
790795
},
796+
origin_connection_limit=60,
791797
)
792798
assert_matches_type(Hyperdrive, config, path=["response"])
793799

0 commit comments

Comments
 (0)