Skip to content

Commit ebb904d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e9e9518 of spec repo (#3607)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent feed56c commit ebb904d

6 files changed

Lines changed: 81 additions & 5 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51629,10 +51629,24 @@ components:
5162951629
If it is set to "false", the tags will be deleted when the logs are sent to the archive.
5163051630
example: false
5163151631
type: boolean
51632+
lookup_attributes:
51633+
description: An array of attributes to use as lookup keys for the archive.
51634+
example: ["trace_id", "user_id"]
51635+
items:
51636+
description: A lookup attribute name.
51637+
type: string
51638+
type: array
5163251639
name:
5163351640
description: The archive name.
5163451641
example: Nginx Archive
5163551642
type: string
51643+
partitioning_attributes:
51644+
description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first.
51645+
example: ["service", "status"]
51646+
items:
51647+
description: A partition attribute name.
51648+
type: string
51649+
type: array
5163651650
query:
5163751651
description: The archive query/filter. Logs matching this query are included in the archive.
5163851652
example: source:nginx
@@ -51688,10 +51702,24 @@ components:
5168851702
If it is set to "false", the tags will be deleted when the logs are sent to the archive.
5168951703
example: false
5169051704
type: boolean
51705+
lookup_attributes:
51706+
description: An array of attributes to use as lookup keys for the archive.
51707+
example: ["trace_id", "user_id"]
51708+
items:
51709+
description: A lookup attribute name.
51710+
type: string
51711+
type: array
5169151712
name:
5169251713
description: The archive name.
5169351714
example: Nginx Archive
5169451715
type: string
51716+
partitioning_attributes:
51717+
description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first.
51718+
example: ["service", "status"]
51719+
items:
51720+
description: A partition attribute name.
51721+
type: string
51722+
type: array
5169551723
query:
5169651724
description: The archive query/filter. Logs matching this query are included in the archive.
5169751725
example: source:nginx

examples/v2/logs-archives/CreateLogsArchive.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@
2828
type=LogsArchiveDestinationAzureType.AZURE,
2929
),
3030
include_tags=False,
31+
lookup_attributes=[
32+
"trace_id",
33+
"user_id",
34+
],
3135
name="Nginx Archive",
36+
partitioning_attributes=[
37+
"service",
38+
"status",
39+
],
3240
query="source:nginx",
3341
rehydration_max_scan_size_in_gb=100,
3442
rehydration_tags=[

examples/v2/logs-archives/UpdateLogsArchive.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@
2828
type=LogsArchiveDestinationAzureType.AZURE,
2929
),
3030
include_tags=False,
31+
lookup_attributes=[
32+
"trace_id",
33+
"user_id",
34+
],
3135
name="Nginx Archive",
36+
partitioning_attributes=[
37+
"service",
38+
"status",
39+
],
3240
query="source:nginx",
3341
rehydration_max_scan_size_in_gb=100,
3442
rehydration_tags=[

src/datadog_api_client/v2/model/logs_archive_attributes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def openapi_types(_):
3838
"compression_method": (LogsArchiveAttributesCompressionMethod,),
3939
"destination": (LogsArchiveDestination,),
4040
"include_tags": (bool,),
41+
"lookup_attributes": ([str],),
4142
"name": (str,),
43+
"partitioning_attributes": ([str],),
4244
"query": (str,),
4345
"rehydration_max_scan_size_in_gb": (int, none_type),
4446
"rehydration_tags": ([str],),
@@ -49,7 +51,9 @@ def openapi_types(_):
4951
"compression_method": "compression_method",
5052
"destination": "destination",
5153
"include_tags": "include_tags",
54+
"lookup_attributes": "lookup_attributes",
5255
"name": "name",
56+
"partitioning_attributes": "partitioning_attributes",
5357
"query": "query",
5458
"rehydration_max_scan_size_in_gb": "rehydration_max_scan_size_in_gb",
5559
"rehydration_tags": "rehydration_tags",
@@ -68,6 +72,8 @@ def __init__(
6872
query: str,
6973
compression_method: Union[LogsArchiveAttributesCompressionMethod, UnsetType] = unset,
7074
include_tags: Union[bool, UnsetType] = unset,
75+
lookup_attributes: Union[List[str], UnsetType] = unset,
76+
partitioning_attributes: Union[List[str], UnsetType] = unset,
7177
rehydration_max_scan_size_in_gb: Union[int, none_type, UnsetType] = unset,
7278
rehydration_tags: Union[List[str], UnsetType] = unset,
7379
state: Union[LogsArchiveState, UnsetType] = unset,
@@ -86,9 +92,15 @@ def __init__(
8692
If it is set to "false", the tags will be deleted when the logs are sent to the archive.
8793
:type include_tags: bool, optional
8894
95+
:param lookup_attributes: An array of attributes to use as lookup keys for the archive.
96+
:type lookup_attributes: [str], optional
97+
8998
:param name: The archive name.
9099
:type name: str
91100
101+
:param partitioning_attributes: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first.
102+
:type partitioning_attributes: [str], optional
103+
92104
:param query: The archive query/filter. Logs matching this query are included in the archive.
93105
:type query: str
94106
@@ -105,6 +117,10 @@ def __init__(
105117
kwargs["compression_method"] = compression_method
106118
if include_tags is not unset:
107119
kwargs["include_tags"] = include_tags
120+
if lookup_attributes is not unset:
121+
kwargs["lookup_attributes"] = lookup_attributes
122+
if partitioning_attributes is not unset:
123+
kwargs["partitioning_attributes"] = partitioning_attributes
108124
if rehydration_max_scan_size_in_gb is not unset:
109125
kwargs["rehydration_max_scan_size_in_gb"] = rehydration_max_scan_size_in_gb
110126
if rehydration_tags is not unset:

src/datadog_api_client/v2/model/logs_archive_create_request_attributes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def openapi_types(_):
3838
"compression_method": (LogsArchiveAttributesCompressionMethod,),
3939
"destination": (LogsArchiveCreateRequestDestination,),
4040
"include_tags": (bool,),
41+
"lookup_attributes": ([str],),
4142
"name": (str,),
43+
"partitioning_attributes": ([str],),
4244
"query": (str,),
4345
"rehydration_max_scan_size_in_gb": (int, none_type),
4446
"rehydration_tags": ([str],),
@@ -48,7 +50,9 @@ def openapi_types(_):
4850
"compression_method": "compression_method",
4951
"destination": "destination",
5052
"include_tags": "include_tags",
53+
"lookup_attributes": "lookup_attributes",
5154
"name": "name",
55+
"partitioning_attributes": "partitioning_attributes",
5256
"query": "query",
5357
"rehydration_max_scan_size_in_gb": "rehydration_max_scan_size_in_gb",
5458
"rehydration_tags": "rehydration_tags",
@@ -66,6 +70,8 @@ def __init__(
6670
query: str,
6771
compression_method: Union[LogsArchiveAttributesCompressionMethod, UnsetType] = unset,
6872
include_tags: Union[bool, UnsetType] = unset,
73+
lookup_attributes: Union[List[str], UnsetType] = unset,
74+
partitioning_attributes: Union[List[str], UnsetType] = unset,
6975
rehydration_max_scan_size_in_gb: Union[int, none_type, UnsetType] = unset,
7076
rehydration_tags: Union[List[str], UnsetType] = unset,
7177
**kwargs,
@@ -83,9 +89,15 @@ def __init__(
8389
If it is set to "false", the tags will be deleted when the logs are sent to the archive.
8490
:type include_tags: bool, optional
8591
92+
:param lookup_attributes: An array of attributes to use as lookup keys for the archive.
93+
:type lookup_attributes: [str], optional
94+
8695
:param name: The archive name.
8796
:type name: str
8897
98+
:param partitioning_attributes: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first.
99+
:type partitioning_attributes: [str], optional
100+
89101
:param query: The archive query/filter. Logs matching this query are included in the archive.
90102
:type query: str
91103
@@ -99,6 +111,10 @@ def __init__(
99111
kwargs["compression_method"] = compression_method
100112
if include_tags is not unset:
101113
kwargs["include_tags"] = include_tags
114+
if lookup_attributes is not unset:
115+
kwargs["lookup_attributes"] = lookup_attributes
116+
if partitioning_attributes is not unset:
117+
kwargs["partitioning_attributes"] = partitioning_attributes
102118
if rehydration_max_scan_size_in_gb is not unset:
103119
kwargs["rehydration_max_scan_size_in_gb"] = rehydration_max_scan_size_in_gb
104120
if rehydration_tags is not unset:

tests/v2/features/logs_archives.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Logs Archives
1212
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
1313
Scenario: Create an archive returns "Bad Request" response
1414
Given new "CreateLogsArchive" request
15-
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
15+
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
2020
Scenario: Create an archive returns "OK" response
2121
Given new "CreateLogsArchive" request
22-
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
22+
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

@@ -150,23 +150,23 @@ Feature: Logs Archives
150150
Scenario: Update an archive returns "Bad Request" response
151151
Given new "UpdateLogsArchive" request
152152
And request contains "archive_id" parameter from "REPLACE.ME"
153-
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
153+
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
154154
When the request is sent
155155
Then the response status is 400 Bad Request
156156

157157
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
158158
Scenario: Update an archive returns "Not found" response
159159
Given new "UpdateLogsArchive" request
160160
And request contains "archive_id" parameter from "REPLACE.ME"
161-
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
161+
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
162162
When the request is sent
163163
Then the response status is 404 Not found
164164

165165
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
166166
Scenario: Update an archive returns "OK" response
167167
Given new "UpdateLogsArchive" request
168168
And request contains "archive_id" parameter from "REPLACE.ME"
169-
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
169+
And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}}
170170
When the request is sent
171171
Then the response status is 200 OK
172172

0 commit comments

Comments
 (0)