From 497bdca4f1939dbba7eb7d32f415018005572399 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:30:12 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#395) --- .stats.yml | 2 +- .../resources/logpush/datasets/fields.py | 6 +- .../resources/logpush/datasets/jobs.py | 6 +- src/cloudflare/resources/logpush/jobs.py | 150 ++++++++++++++++-- .../types/logpush/job_create_params.py | 48 +++++- .../types/logpush/job_update_params.py | 42 ++++- src/cloudflare/types/logpush/logpush_job.py | 48 +++++- tests/api_resources/logpush/test_jobs.py | 16 ++ 8 files changed, 288 insertions(+), 30 deletions(-) diff --git a/.stats.yml b/.stats.yml index 310e06abf2c..1765a1fb19f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml diff --git a/src/cloudflare/resources/logpush/datasets/fields.py b/src/cloudflare/resources/logpush/datasets/fields.py index 8fd43b17e1c..611c0f0f15a 100644 --- a/src/cloudflare/resources/logpush/datasets/fields.py +++ b/src/cloudflare/resources/logpush/datasets/fields.py @@ -51,7 +51,8 @@ def get( key-value pairs, where keys are field names, and values are descriptions. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -120,7 +121,8 @@ async def get( key-value pairs, where keys are field names, and values are descriptions. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/cloudflare/resources/logpush/datasets/jobs.py b/src/cloudflare/resources/logpush/datasets/jobs.py index 92dc0138053..4da84bf1027 100644 --- a/src/cloudflare/resources/logpush/datasets/jobs.py +++ b/src/cloudflare/resources/logpush/datasets/jobs.py @@ -50,7 +50,8 @@ def get( Lists Logpush jobs for an account or zone for a dataset. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -117,7 +118,8 @@ async def get( Lists Logpush jobs for an account or zone for a dataset. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 68d0a5dade2..b91faac731a 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -51,7 +51,11 @@ def create( dataset: Optional[str] | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + 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, @@ -74,13 +78,19 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - dataset: Name of the dataset. + dataset: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -88,6 +98,23 @@ def create( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + 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. @@ -125,7 +152,11 @@ def create( "dataset": dataset, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "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, @@ -151,7 +182,11 @@ def update( destination_conf: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + 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, 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. @@ -177,9 +212,14 @@ def update( enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -187,6 +227,23 @@ def update( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -219,7 +276,11 @@ def update( "destination_conf": destination_conf, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "output_options": output_options, "ownership_challenge": ownership_challenge, }, @@ -413,7 +474,11 @@ async def create( dataset: Optional[str] | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + 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, @@ -436,13 +501,19 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - dataset: Name of the dataset. + dataset: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -450,6 +521,23 @@ async def create( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + 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. @@ -487,7 +575,11 @@ async def create( "dataset": dataset, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "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, @@ -513,7 +605,11 @@ async def update( destination_conf: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + 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, 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. @@ -539,9 +635,14 @@ async def update( enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -549,6 +650,23 @@ async def update( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -581,7 +699,11 @@ async def update( "destination_conf": destination_conf, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "output_options": output_options, "ownership_challenge": ownership_challenge, }, diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index 39f9ecca17d..a1887398142 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -25,16 +25,29 @@ class JobCreateParams(TypedDict, total=False): """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" dataset: Optional[str] - """Name of the dataset.""" + """Name of the dataset. + + A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). + """ enabled: bool """Flag that indicates if the job is enabled.""" frequency: Optional[Literal["high", "low"]] - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ logpull_options: Optional[str] @@ -46,6 +59,33 @@ class JobCreateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + name: Optional[str] """Optional human readable job name. diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index 4246f9d3521..857882c86bf 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -28,10 +28,19 @@ class JobUpdateParams(TypedDict, total=False): """Flag that indicates if the job is enabled.""" frequency: Optional[Literal["high", "low"]] - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ logpull_options: Optional[str] @@ -43,6 +52,33 @@ class JobUpdateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + output_options: Optional[OutputOptionsParam] """The structured replacement for `logpull_options`. diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index 0abab1cd0b8..adfb6bb1587 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -15,7 +15,11 @@ class LogpushJob(BaseModel): """Unique id of the job.""" dataset: Optional[str] = None - """Name of the dataset.""" + """Name of the dataset. + + A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). + """ destination_conf: Optional[str] = None """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. @@ -36,10 +40,19 @@ class LogpushJob(BaseModel): """ frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] = None + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ last_complete: Optional[datetime] = None @@ -68,6 +81,33 @@ class LogpushJob(BaseModel): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] = None + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] = None + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] = None + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + name: Optional[str] = None """Optional human readable job name. diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 73db5328ba0..05950cab7b9 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -36,7 +36,11 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: dataset="http_requests", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, name="example.com", output_options={ "cve_2021_4428": True, @@ -117,7 +121,11 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, output_options={ "cve_2021_4428": True, "batch_prefix": "string", @@ -378,7 +386,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare dataset="http_requests", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, name="example.com", output_options={ "cve_2021_4428": True, @@ -459,7 +471,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, output_options={ "cve_2021_4428": True, "batch_prefix": "string",