Skip to content

Commit 1d4bea4

Browse files
feat(api): api update (#2297)
1 parent 1230240 commit 1d4bea4

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1483
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77d24d8ee7a53652384015d4c06afc3d75874dd5cef16ea729d485d82e69e793.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be6e5d0e98bf870ee346bf2c9b38b2d0507817cb8a57cf25e8f6cac26163177f.yml

src/cloudflare/resources/logpush/jobs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def update(
196196
max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
197197
max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
198198
max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
199+
name: Optional[str] | NotGiven = NOT_GIVEN,
199200
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
200201
ownership_challenge: str | NotGiven = NOT_GIVEN,
201202
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -253,6 +254,10 @@ def update(
253254
lines than this. This parameter is not available for jobs with `edge` as its
254255
kind.
255256
257+
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
258+
this to a meaningful string, like the domain name, to make it easier to identify
259+
your job.
260+
256261
output_options: The structured replacement for `logpull_options`. When including this field, the
257262
`logpull_option` field will be ignored.
258263
@@ -290,6 +295,7 @@ def update(
290295
"max_upload_bytes": max_upload_bytes,
291296
"max_upload_interval_seconds": max_upload_interval_seconds,
292297
"max_upload_records": max_upload_records,
298+
"name": name,
293299
"output_options": output_options,
294300
"ownership_challenge": ownership_challenge,
295301
},
@@ -630,6 +636,7 @@ async def update(
630636
max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN,
631637
max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN,
632638
max_upload_records: Optional[int] | NotGiven = NOT_GIVEN,
639+
name: Optional[str] | NotGiven = NOT_GIVEN,
633640
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
634641
ownership_challenge: str | NotGiven = NOT_GIVEN,
635642
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -687,6 +694,10 @@ async def update(
687694
lines than this. This parameter is not available for jobs with `edge` as its
688695
kind.
689696
697+
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
698+
this to a meaningful string, like the domain name, to make it easier to identify
699+
your job.
700+
690701
output_options: The structured replacement for `logpull_options`. When including this field, the
691702
`logpull_option` field will be ignored.
692703
@@ -724,6 +735,7 @@ async def update(
724735
"max_upload_bytes": max_upload_bytes,
725736
"max_upload_interval_seconds": max_upload_interval_seconds,
726737
"max_upload_records": max_upload_records,
738+
"name": name,
727739
"output_options": output_options,
728740
"ownership_challenge": ownership_challenge,
729741
},

src/cloudflare/types/logpush/job_update_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ class JobUpdateParams(TypedDict, total=False):
7979
available for jobs with `edge` as its kind.
8080
"""
8181

82+
name: Optional[str]
83+
"""Optional human readable job name.
84+
85+
Not unique. Cloudflare suggests that you set this to a meaningful string, like
86+
the domain name, to make it easier to identify your job.
87+
"""
88+
8289
output_options: Optional[OutputOptionsParam]
8390
"""The structured replacement for `logpull_options`.
8491

tests/api_resources/logpush/test_jobs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
126126
max_upload_bytes=5000000,
127127
max_upload_interval_seconds=30,
128128
max_upload_records=1000,
129+
name="example.com",
129130
output_options={
130131
"batch_prefix": "batch_prefix",
131132
"batch_suffix": "batch_suffix",
@@ -476,6 +477,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
476477
max_upload_bytes=5000000,
477478
max_upload_interval_seconds=30,
478479
max_upload_records=1000,
480+
name="example.com",
479481
output_options={
480482
"batch_prefix": "batch_prefix",
481483
"batch_suffix": "batch_suffix",

0 commit comments

Comments
 (0)