Skip to content

Commit b80ac89

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add compression_method field to Log Archives (#4043)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 113b71c commit b80ac89

9 files changed

Lines changed: 62 additions & 5 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41615,6 +41615,8 @@ components:
4161541615
LogsArchiveAttributes:
4161641616
description: The attributes associated with the archive.
4161741617
properties:
41618+
compression_method:
41619+
$ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod"
4161841620
destination:
4161941621
$ref: "#/components/schemas/LogsArchiveDestination"
4162041622
include_tags:
@@ -41652,6 +41654,17 @@ components:
4165241654
- query
4165341655
- destination
4165441656
type: object
41657+
LogsArchiveAttributesCompressionMethod:
41658+
default: GZIP
41659+
description: The type of compression for the archive.
41660+
enum:
41661+
- GZIP
41662+
- ZSTD
41663+
example: GZIP
41664+
type: string
41665+
x-enum-varnames:
41666+
- GZIP
41667+
- ZSTD
4165541668
LogsArchiveCreateRequest:
4165641669
description: The logs archive.
4165741670
properties:
@@ -41661,6 +41674,8 @@ components:
4166141674
LogsArchiveCreateRequestAttributes:
4166241675
description: The attributes associated with the archive.
4166341676
properties:
41677+
compression_method:
41678+
$ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod"
4166441679
destination:
4166541680
$ref: "#/components/schemas/LogsArchiveCreateRequestDestination"
4166641681
include_tags:
@@ -111745,6 +111760,7 @@ paths:
111745111760
value:
111746111761
data:
111747111762
attributes:
111763+
compression_method: GZIP
111748111764
destination:
111749111765
container: container-name
111750111766
storage_account: account-name
@@ -111918,6 +111934,7 @@ paths:
111918111934
value:
111919111935
data:
111920111936
attributes:
111937+
compression_method: GZIP
111921111938
destination:
111922111939
container: container-name
111923111940
storage_account: account-name

examples/v2/logs-archives/CreateLogsArchive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const params: v2.LogsArchivesApiCreateLogsArchiveRequest = {
1111
body: {
1212
data: {
1313
attributes: {
14+
compressionMethod: "GZIP",
1415
destination: {
1516
container: "container-name",
1617
integration: {

examples/v2/logs-archives/UpdateLogsArchive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const params: v2.LogsArchivesApiUpdateLogsArchiveRequest = {
1111
body: {
1212
data: {
1313
attributes: {
14+
compressionMethod: "GZIP",
1415
destination: {
1516
container: "container-name",
1617
integration: {

features/v2/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": {"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, "name": "Nginx Archive", "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": {"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, "name": "Nginx Archive", "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": {"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, "name": "Nginx Archive", "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": {"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, "name": "Nginx Archive", "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": {"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, "name": "Nginx Archive", "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

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,6 +3914,7 @@ export { LogsAggregateSortType } from "./models/LogsAggregateSortType";
39143914
export { LogsAggregationFunction } from "./models/LogsAggregationFunction";
39153915
export { LogsArchive } from "./models/LogsArchive";
39163916
export { LogsArchiveAttributes } from "./models/LogsArchiveAttributes";
3917+
export { LogsArchiveAttributesCompressionMethod } from "./models/LogsArchiveAttributesCompressionMethod";
39173918
export { LogsArchiveCreateRequest } from "./models/LogsArchiveCreateRequest";
39183919
export { LogsArchiveCreateRequestAttributes } from "./models/LogsArchiveCreateRequestAttributes";
39193920
export { LogsArchiveCreateRequestDefinition } from "./models/LogsArchiveCreateRequestDefinition";

packages/datadog-api-client-v2/models/LogsArchiveAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { LogsArchiveAttributesCompressionMethod } from "./LogsArchiveAttributesCompressionMethod";
67
import { LogsArchiveDestination } from "./LogsArchiveDestination";
78
import { LogsArchiveState } from "./LogsArchiveState";
89

@@ -12,6 +13,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1213
* The attributes associated with the archive.
1314
*/
1415
export class LogsArchiveAttributes {
16+
/**
17+
* The type of compression for the archive.
18+
*/
19+
"compressionMethod"?: LogsArchiveAttributesCompressionMethod;
1520
/**
1621
* An archive's destination.
1722
*/
@@ -58,6 +63,10 @@ export class LogsArchiveAttributes {
5863
* @ignore
5964
*/
6065
static readonly attributeTypeMap: AttributeTypeMap = {
66+
compressionMethod: {
67+
baseName: "compression_method",
68+
type: "LogsArchiveAttributesCompressionMethod",
69+
},
6170
destination: {
6271
baseName: "destination",
6372
type: "LogsArchiveDestination",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { UnparsedObject } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* The type of compression for the archive.
11+
*/
12+
13+
export type LogsArchiveAttributesCompressionMethod =
14+
| typeof GZIP
15+
| typeof ZSTD
16+
| UnparsedObject;
17+
export const GZIP = "GZIP";
18+
export const ZSTD = "ZSTD";

packages/datadog-api-client-v2/models/LogsArchiveCreateRequestAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { LogsArchiveAttributesCompressionMethod } from "./LogsArchiveAttributesCompressionMethod";
67
import { LogsArchiveCreateRequestDestination } from "./LogsArchiveCreateRequestDestination";
78

89
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
@@ -11,6 +12,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1112
* The attributes associated with the archive.
1213
*/
1314
export class LogsArchiveCreateRequestAttributes {
15+
/**
16+
* The type of compression for the archive.
17+
*/
18+
"compressionMethod"?: LogsArchiveAttributesCompressionMethod;
1419
/**
1520
* An archive's destination.
1621
*/
@@ -53,6 +58,10 @@ export class LogsArchiveCreateRequestAttributes {
5358
* @ignore
5459
*/
5560
static readonly attributeTypeMap: AttributeTypeMap = {
61+
compressionMethod: {
62+
baseName: "compression_method",
63+
type: "LogsArchiveAttributesCompressionMethod",
64+
},
5665
destination: {
5766
baseName: "destination",
5867
type: "LogsArchiveCreateRequestDestination",

packages/datadog-api-client-v2/models/ObjectSerializer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5009,6 +5009,7 @@ const enumsMap: { [key: string]: any[] } = {
50095009
"avg",
50105010
"median",
50115011
],
5012+
LogsArchiveAttributesCompressionMethod: ["GZIP", "ZSTD"],
50125013
LogsArchiveDestinationAzureType: ["azure"],
50135014
LogsArchiveDestinationGCSType: ["gcs"],
50145015
LogsArchiveDestinationS3Type: ["s3"],

0 commit comments

Comments
 (0)