From c119ca769ec4d6f09808c241290d27a59c8a43c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:22:46 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 2 +- src/cloudflare/resources/logpush/jobs.py | 12 ++++++++++++ src/cloudflare/types/logpush/job_update_params.py | 7 +++++++ tests/api_resources/logpush/test_jobs.py | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 00d524a93a9..6de665a4df7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1483 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77d24d8ee7a53652384015d4c06afc3d75874dd5cef16ea729d485d82e69e793.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be6e5d0e98bf870ee346bf2c9b38b2d0507817cb8a57cf25e8f6cac26163177f.yml diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 59007334df7..76ed1b79c19 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -196,6 +196,7 @@ def update( max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, # 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( lines than this. This parameter is not available for jobs with `edge` as its kind. + name: Optional human readable job name. Not unique. Cloudflare suggests that you set + this to a meaningful string, like the domain name, to make it easier to identify + your job. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -290,6 +295,7 @@ def update( "max_upload_bytes": max_upload_bytes, "max_upload_interval_seconds": max_upload_interval_seconds, "max_upload_records": max_upload_records, + "name": name, "output_options": output_options, "ownership_challenge": ownership_challenge, }, @@ -630,6 +636,7 @@ async def update( max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, # 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( lines than this. This parameter is not available for jobs with `edge` as its kind. + name: Optional human readable job name. Not unique. Cloudflare suggests that you set + this to a meaningful string, like the domain name, to make it easier to identify + your job. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -724,6 +735,7 @@ async def update( "max_upload_bytes": max_upload_bytes, "max_upload_interval_seconds": max_upload_interval_seconds, "max_upload_records": max_upload_records, + "name": name, "output_options": output_options, "ownership_challenge": ownership_challenge, }, diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index 857882c86bf..dda7f649121 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -79,6 +79,13 @@ class JobUpdateParams(TypedDict, total=False): available for jobs with `edge` as its kind. """ + name: Optional[str] + """Optional human readable job name. + + Not unique. Cloudflare suggests that you set this to a meaningful string, like + the domain name, to make it easier to identify your job. + """ + output_options: Optional[OutputOptionsParam] """The structured replacement for `logpull_options`. diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index a35edd8c19e..0674d1ec883 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -126,6 +126,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, + name="example.com", output_options={ "batch_prefix": "batch_prefix", "batch_suffix": "batch_suffix", @@ -476,6 +477,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, + name="example.com", output_options={ "batch_prefix": "batch_prefix", "batch_suffix": "batch_suffix",