Skip to content

Commit ca52e2d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b2528ad of spec repo
1 parent 2fe562f commit ca52e2d

6 files changed

Lines changed: 37 additions & 5 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7265,6 +7265,12 @@ components:
72657265
maximum: 99.99
72667266
minimum: 50
72677267
type: number
7268+
description:
7269+
description: |-
7270+
A description of the index, to help explain its purpose or configuration to other users.
7271+
Maximum length of 250 characters.
7272+
example: "Contains logs matching the criteria defined by the filter."
7273+
type: string
72687274
exclusion_filters:
72697275
description: |-
72707276
An array of exclusion objects. The logs are tested against the query of each filter,
@@ -7339,6 +7345,12 @@ components:
73397345
maximum: 99.99
73407346
minimum: 50
73417347
type: number
7348+
description:
7349+
description: |-
7350+
A description of the index, to help explain its purpose or configuration to other users.
7351+
Maximum length of 250 characters.
7352+
example: "Contains logs matching the criteria defined by the filter."
7353+
type: string
73427354
disable_daily_limit:
73437355
description: |-
73447356
If true, sets the `daily_limit` value to null and the index is not limited on a daily basis (any

examples/v1/logs-indexes/CreateLogsIndex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
reset_utc_offset="+02:00",
1818
),
1919
daily_limit_warning_threshold_percentage=70.0,
20+
description="Contains logs matching the criteria defined by the filter.",
2021
exclusion_filters=[
2122
LogsExclusion(
2223
filter=LogsExclusionFilter(

examples/v1/logs-indexes/UpdateLogsIndex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
reset_utc_offset="+02:00",
1818
),
1919
daily_limit_warning_threshold_percentage=70.0,
20+
description="Contains logs matching the criteria defined by the filter.",
2021
disable_daily_limit=False,
2122
exclusion_filters=[
2223
LogsExclusion(

src/datadog_api_client/v1/model/logs_index.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def openapi_types(_):
3737
"daily_limit": (int,),
3838
"daily_limit_reset": (LogsDailyLimitReset,),
3939
"daily_limit_warning_threshold_percentage": (float,),
40+
"description": (str,),
4041
"exclusion_filters": ([LogsExclusion],),
4142
"filter": (LogsFilter,),
4243
"is_rate_limited": (bool,),
@@ -50,6 +51,7 @@ def openapi_types(_):
5051
"daily_limit": "daily_limit",
5152
"daily_limit_reset": "daily_limit_reset",
5253
"daily_limit_warning_threshold_percentage": "daily_limit_warning_threshold_percentage",
54+
"description": "description",
5355
"exclusion_filters": "exclusion_filters",
5456
"filter": "filter",
5557
"is_rate_limited": "is_rate_limited",
@@ -69,6 +71,7 @@ def __init__(
6971
daily_limit: Union[int, UnsetType] = unset,
7072
daily_limit_reset: Union[LogsDailyLimitReset, UnsetType] = unset,
7173
daily_limit_warning_threshold_percentage: Union[float, UnsetType] = unset,
74+
description: Union[str, UnsetType] = unset,
7275
exclusion_filters: Union[List[LogsExclusion], UnsetType] = unset,
7376
is_rate_limited: Union[bool, UnsetType] = unset,
7477
num_flex_logs_retention_days: Union[int, UnsetType] = unset,
@@ -88,6 +91,10 @@ def __init__(
8891
:param daily_limit_warning_threshold_percentage: A percentage threshold of the daily quota at which a Datadog warning event is generated.
8992
:type daily_limit_warning_threshold_percentage: float, optional
9093
94+
:param description: A description of the index, to help explain its purpose or configuration to other users.
95+
Maximum length of 250 characters.
96+
:type description: str, optional
97+
9198
:param exclusion_filters: An array of exclusion objects. The logs are tested against the query of each filter,
9299
following the order of the array. Only the first matching active exclusion matters,
93100
others (if any) are ignored.
@@ -122,6 +129,8 @@ def __init__(
122129
kwargs["daily_limit_reset"] = daily_limit_reset
123130
if daily_limit_warning_threshold_percentage is not unset:
124131
kwargs["daily_limit_warning_threshold_percentage"] = daily_limit_warning_threshold_percentage
132+
if description is not unset:
133+
kwargs["description"] = description
125134
if exclusion_filters is not unset:
126135
kwargs["exclusion_filters"] = exclusion_filters
127136
if is_rate_limited is not unset:

src/datadog_api_client/v1/model/logs_index_update_request.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def openapi_types(_):
3737
"daily_limit": (int,),
3838
"daily_limit_reset": (LogsDailyLimitReset,),
3939
"daily_limit_warning_threshold_percentage": (float,),
40+
"description": (str,),
4041
"disable_daily_limit": (bool,),
4142
"exclusion_filters": ([LogsExclusion],),
4243
"filter": (LogsFilter,),
@@ -49,6 +50,7 @@ def openapi_types(_):
4950
"daily_limit": "daily_limit",
5051
"daily_limit_reset": "daily_limit_reset",
5152
"daily_limit_warning_threshold_percentage": "daily_limit_warning_threshold_percentage",
53+
"description": "description",
5254
"disable_daily_limit": "disable_daily_limit",
5355
"exclusion_filters": "exclusion_filters",
5456
"filter": "filter",
@@ -63,6 +65,7 @@ def __init__(
6365
daily_limit: Union[int, UnsetType] = unset,
6466
daily_limit_reset: Union[LogsDailyLimitReset, UnsetType] = unset,
6567
daily_limit_warning_threshold_percentage: Union[float, UnsetType] = unset,
68+
description: Union[str, UnsetType] = unset,
6669
disable_daily_limit: Union[bool, UnsetType] = unset,
6770
exclusion_filters: Union[List[LogsExclusion], UnsetType] = unset,
6871
num_flex_logs_retention_days: Union[int, UnsetType] = unset,
@@ -82,6 +85,10 @@ def __init__(
8285
:param daily_limit_warning_threshold_percentage: A percentage threshold of the daily quota at which a Datadog warning event is generated.
8386
:type daily_limit_warning_threshold_percentage: float, optional
8487
88+
:param description: A description of the index, to help explain its purpose or configuration to other users.
89+
Maximum length of 250 characters.
90+
:type description: str, optional
91+
8592
:param disable_daily_limit: If true, sets the ``daily_limit`` value to null and the index is not limited on a daily basis (any
8693
specified ``daily_limit`` value in the request is ignored). If false or omitted, the index's current
8794
``daily_limit`` is maintained.
@@ -118,6 +125,8 @@ def __init__(
118125
kwargs["daily_limit_reset"] = daily_limit_reset
119126
if daily_limit_warning_threshold_percentage is not unset:
120127
kwargs["daily_limit_warning_threshold_percentage"] = daily_limit_warning_threshold_percentage
128+
if description is not unset:
129+
kwargs["description"] = description
121130
if disable_daily_limit is not unset:
122131
kwargs["disable_daily_limit"] = disable_daily_limit
123132
if exclusion_filters is not unset:

tests/v1/features/logs_indexes.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ Feature: Logs Indexes
1111
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
1212
Scenario: Create an index returns "Invalid Parameter Error" response
1313
Given new "CreateLogsIndex" request
14-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
14+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
1515
When the request is sent
1616
Then the response status is 400 Invalid Parameter Error
1717

1818
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
1919
Scenario: Create an index returns "OK" response
2020
Given new "CreateLogsIndex" request
21-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
21+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
2222
When the request is sent
2323
Then the response status is 200 OK
2424

2525
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
2626
Scenario: Create an index returns "Unprocessable Entity" response
2727
Given new "CreateLogsIndex" request
28-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
28+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
2929
When the request is sent
3030
Then the response status is 422 Unprocessable Entity
3131

@@ -73,15 +73,15 @@ Feature: Logs Indexes
7373
Scenario: Update an index returns "Invalid Parameter Error" response
7474
Given new "UpdateLogsIndex" request
7575
And request contains "name" parameter from "REPLACE.ME"
76-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
76+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
7777
When the request is sent
7878
Then the response status is 400 Invalid Parameter Error
7979

8080
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
8181
Scenario: Update an index returns "OK" response
8282
Given new "UpdateLogsIndex" request
8383
And request contains "name" parameter from "REPLACE.ME"
84-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
84+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
8585
When the request is sent
8686
Then the response status is 200 OK
8787

0 commit comments

Comments
 (0)