From e3d6686eeb9533b6d1e5ccfe880d765b2ff08a51 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 1 May 2026 14:48:05 +0000 Subject: [PATCH] Regenerate client from commit 0e6d1c2 of spec repo --- .generator/schemas/v2/openapi.yaml | 17 +++++++++ docs/datadog_api_client.v2.model.rst | 7 ++++ .../v2/logs-archives/CreateLogsArchive.py | 4 ++ .../v2/logs-archives/UpdateLogsArchive.py | 4 ++ .../v2/model/logs_archive_attributes.py | 14 +++++++ ...s_archive_attributes_compression_method.py | 38 +++++++++++++++++++ .../logs_archive_create_request_attributes.py | 14 +++++++ src/datadog_api_client/v2/models/__init__.py | 4 ++ tests/v2/features/logs_archives.feature | 10 ++--- 9 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 src/datadog_api_client/v2/model/logs_archive_attributes_compression_method.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 382c9233aa..e1e1f1984d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -41379,6 +41379,8 @@ components: LogsArchiveAttributes: description: The attributes associated with the archive. properties: + compression_method: + $ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod" destination: $ref: "#/components/schemas/LogsArchiveDestination" include_tags: @@ -41416,6 +41418,17 @@ components: - query - destination type: object + LogsArchiveAttributesCompressionMethod: + default: GZIP + description: The type of compression for the archive. + enum: + - GZIP + - ZSTD + example: GZIP + type: string + x-enum-varnames: + - GZIP + - ZSTD LogsArchiveCreateRequest: description: The logs archive. properties: @@ -41425,6 +41438,8 @@ components: LogsArchiveCreateRequestAttributes: description: The attributes associated with the archive. properties: + compression_method: + $ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod" destination: $ref: "#/components/schemas/LogsArchiveCreateRequestDestination" include_tags: @@ -106036,6 +106051,7 @@ paths: value: data: attributes: + compression_method: GZIP destination: container: container-name storage_account: account-name @@ -106175,6 +106191,7 @@ paths: value: data: attributes: + compression_method: GZIP destination: container: container-name storage_account: account-name diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index bb0817ad6d..3d1941d8cf 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -17833,6 +17833,13 @@ datadog\_api\_client.v2.model.logs\_archive\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.logs\_archive\_attributes\_compression\_method module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.logs_archive_attributes_compression_method + :members: + :show-inheritance: + datadog\_api\_client.v2.model.logs\_archive\_create\_request module ------------------------------------------------------------------- diff --git a/examples/v2/logs-archives/CreateLogsArchive.py b/examples/v2/logs-archives/CreateLogsArchive.py index 51323624fc..47de53abf7 100644 --- a/examples/v2/logs-archives/CreateLogsArchive.py +++ b/examples/v2/logs-archives/CreateLogsArchive.py @@ -4,6 +4,9 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.logs_archives_api import LogsArchivesApi +from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, +) from datadog_api_client.v2.model.logs_archive_create_request import LogsArchiveCreateRequest from datadog_api_client.v2.model.logs_archive_create_request_attributes import LogsArchiveCreateRequestAttributes from datadog_api_client.v2.model.logs_archive_create_request_definition import LogsArchiveCreateRequestDefinition @@ -14,6 +17,7 @@ body = LogsArchiveCreateRequest( data=LogsArchiveCreateRequestDefinition( attributes=LogsArchiveCreateRequestAttributes( + compression_method=LogsArchiveAttributesCompressionMethod.GZIP, destination=LogsArchiveDestinationAzure( container="container-name", integration=LogsArchiveIntegrationAzure( diff --git a/examples/v2/logs-archives/UpdateLogsArchive.py b/examples/v2/logs-archives/UpdateLogsArchive.py index d837a9eb6a..febc6efc24 100644 --- a/examples/v2/logs-archives/UpdateLogsArchive.py +++ b/examples/v2/logs-archives/UpdateLogsArchive.py @@ -4,6 +4,9 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.logs_archives_api import LogsArchivesApi +from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, +) from datadog_api_client.v2.model.logs_archive_create_request import LogsArchiveCreateRequest from datadog_api_client.v2.model.logs_archive_create_request_attributes import LogsArchiveCreateRequestAttributes from datadog_api_client.v2.model.logs_archive_create_request_definition import LogsArchiveCreateRequestDefinition @@ -14,6 +17,7 @@ body = LogsArchiveCreateRequest( data=LogsArchiveCreateRequestDefinition( attributes=LogsArchiveCreateRequestAttributes( + compression_method=LogsArchiveAttributesCompressionMethod.GZIP, destination=LogsArchiveDestinationAzure( container="container-name", integration=LogsArchiveIntegrationAzure( diff --git a/src/datadog_api_client/v2/model/logs_archive_attributes.py b/src/datadog_api_client/v2/model/logs_archive_attributes.py index 912f31dabd..c92e560c3c 100644 --- a/src/datadog_api_client/v2/model/logs_archive_attributes.py +++ b/src/datadog_api_client/v2/model/logs_archive_attributes.py @@ -15,6 +15,9 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, + ) from datadog_api_client.v2.model.logs_archive_destination import LogsArchiveDestination from datadog_api_client.v2.model.logs_archive_state import LogsArchiveState from datadog_api_client.v2.model.logs_archive_destination_azure import LogsArchiveDestinationAzure @@ -25,10 +28,14 @@ class LogsArchiveAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, + ) from datadog_api_client.v2.model.logs_archive_destination import LogsArchiveDestination from datadog_api_client.v2.model.logs_archive_state import LogsArchiveState return { + "compression_method": (LogsArchiveAttributesCompressionMethod,), "destination": (LogsArchiveDestination,), "include_tags": (bool,), "name": (str,), @@ -39,6 +46,7 @@ def openapi_types(_): } attribute_map = { + "compression_method": "compression_method", "destination": "destination", "include_tags": "include_tags", "name": "name", @@ -58,6 +66,7 @@ def __init__( ], name: str, query: str, + compression_method: Union[LogsArchiveAttributesCompressionMethod, UnsetType] = unset, include_tags: Union[bool, UnsetType] = unset, rehydration_max_scan_size_in_gb: Union[int, none_type, UnsetType] = unset, rehydration_tags: Union[List[str], UnsetType] = unset, @@ -67,6 +76,9 @@ def __init__( """ The attributes associated with the archive. + :param compression_method: The type of compression for the archive. + :type compression_method: LogsArchiveAttributesCompressionMethod, optional + :param destination: An archive's destination. :type destination: LogsArchiveDestination, none_type @@ -89,6 +101,8 @@ def __init__( :param state: The state of the archive. :type state: LogsArchiveState, optional """ + if compression_method is not unset: + kwargs["compression_method"] = compression_method if include_tags is not unset: kwargs["include_tags"] = include_tags if rehydration_max_scan_size_in_gb is not unset: diff --git a/src/datadog_api_client/v2/model/logs_archive_attributes_compression_method.py b/src/datadog_api_client/v2/model/logs_archive_attributes_compression_method.py new file mode 100644 index 0000000000..fde668e78a --- /dev/null +++ b/src/datadog_api_client/v2/model/logs_archive_attributes_compression_method.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LogsArchiveAttributesCompressionMethod(ModelSimple): + """ + The type of compression for the archive. + + :param value: If omitted defaults to "GZIP". Must be one of ["GZIP", "ZSTD"]. + :type value: str + """ + + allowed_values = { + "GZIP", + "ZSTD", + } + GZIP: ClassVar["LogsArchiveAttributesCompressionMethod"] + ZSTD: ClassVar["LogsArchiveAttributesCompressionMethod"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LogsArchiveAttributesCompressionMethod.GZIP = LogsArchiveAttributesCompressionMethod("GZIP") +LogsArchiveAttributesCompressionMethod.ZSTD = LogsArchiveAttributesCompressionMethod("ZSTD") diff --git a/src/datadog_api_client/v2/model/logs_archive_create_request_attributes.py b/src/datadog_api_client/v2/model/logs_archive_create_request_attributes.py index b747a2af1f..55fc7cf446 100644 --- a/src/datadog_api_client/v2/model/logs_archive_create_request_attributes.py +++ b/src/datadog_api_client/v2/model/logs_archive_create_request_attributes.py @@ -15,6 +15,9 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, + ) from datadog_api_client.v2.model.logs_archive_create_request_destination import LogsArchiveCreateRequestDestination from datadog_api_client.v2.model.logs_archive_destination_azure import LogsArchiveDestinationAzure from datadog_api_client.v2.model.logs_archive_destination_gcs import LogsArchiveDestinationGCS @@ -24,11 +27,15 @@ class LogsArchiveCreateRequestAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, + ) from datadog_api_client.v2.model.logs_archive_create_request_destination import ( LogsArchiveCreateRequestDestination, ) return { + "compression_method": (LogsArchiveAttributesCompressionMethod,), "destination": (LogsArchiveCreateRequestDestination,), "include_tags": (bool,), "name": (str,), @@ -38,6 +45,7 @@ def openapi_types(_): } attribute_map = { + "compression_method": "compression_method", "destination": "destination", "include_tags": "include_tags", "name": "name", @@ -56,6 +64,7 @@ def __init__( ], name: str, query: str, + compression_method: Union[LogsArchiveAttributesCompressionMethod, UnsetType] = unset, include_tags: Union[bool, UnsetType] = unset, rehydration_max_scan_size_in_gb: Union[int, none_type, UnsetType] = unset, rehydration_tags: Union[List[str], UnsetType] = unset, @@ -64,6 +73,9 @@ def __init__( """ The attributes associated with the archive. + :param compression_method: The type of compression for the archive. + :type compression_method: LogsArchiveAttributesCompressionMethod, optional + :param destination: An archive's destination. :type destination: LogsArchiveCreateRequestDestination @@ -83,6 +95,8 @@ def __init__( :param rehydration_tags: An array of tags to add to rehydrated logs from an archive. :type rehydration_tags: [str], optional """ + if compression_method is not unset: + kwargs["compression_method"] = compression_method if include_tags is not unset: kwargs["include_tags"] = include_tags if rehydration_max_scan_size_in_gb is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index e120b39440..61534121ae 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3374,6 +3374,9 @@ from datadog_api_client.v2.model.logs_aggregation_function import LogsAggregationFunction from datadog_api_client.v2.model.logs_archive import LogsArchive from datadog_api_client.v2.model.logs_archive_attributes import LogsArchiveAttributes +from datadog_api_client.v2.model.logs_archive_attributes_compression_method import ( + LogsArchiveAttributesCompressionMethod, +) from datadog_api_client.v2.model.logs_archive_create_request import LogsArchiveCreateRequest from datadog_api_client.v2.model.logs_archive_create_request_attributes import LogsArchiveCreateRequestAttributes from datadog_api_client.v2.model.logs_archive_create_request_definition import LogsArchiveCreateRequestDefinition @@ -10005,6 +10008,7 @@ "LogsAggregationFunction", "LogsArchive", "LogsArchiveAttributes", + "LogsArchiveAttributesCompressionMethod", "LogsArchiveCreateRequest", "LogsArchiveCreateRequestAttributes", "LogsArchiveCreateRequestDefinition", diff --git a/tests/v2/features/logs_archives.feature b/tests/v2/features/logs_archives.feature index a6de8c72d4..4b58769df5 100644 --- a/tests/v2/features/logs_archives.feature +++ b/tests/v2/features/logs_archives.feature @@ -12,14 +12,14 @@ Feature: Logs Archives @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "Bad Request" response Given new "CreateLogsArchive" request - 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"}} + 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"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "OK" response Given new "CreateLogsArchive" request - 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"}} + 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"}} When the request is sent Then the response status is 200 OK @@ -150,7 +150,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Bad Request" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - 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"}} + 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"}} When the request is sent Then the response status is 400 Bad Request @@ -158,7 +158,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Not found" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - 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"}} + 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"}} When the request is sent Then the response status is 404 Not found @@ -166,7 +166,7 @@ Feature: Logs Archives Scenario: Update an archive returns "OK" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - 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"}} + 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"}} When the request is sent Then the response status is 200 OK