From 3066c0f7c0e735477f97b4c6214e99df7e7630c4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 9 Jul 2025 08:35:29 +0000 Subject: [PATCH] Regenerate client from commit 7331abb4 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 150 ++++++++++++++++++ docs/datadog_api_client.v2.model.rst | 56 +++++++ .../CreateLogsCustomDestination_1006705740.py | 67 ++++++++ ...m_destination_create_request_attributes.py | 4 + .../custom_destination_forward_destination.py | 13 ++ ..._destination_google_security_operations.py | 82 ++++++++++ ...ination_google_security_operations_type.py | 37 +++++ ...le_security_operations_destination_auth.py | 83 ++++++++++ ...curity_operations_destination_auth_type.py | 37 +++++ .../custom_destination_response_attributes.py | 4 + ...estination_response_forward_destination.py | 13 ++ ..._destination_google_security_operations.py | 82 ++++++++++ ...ination_google_security_operations_type.py | 37 +++++ ...le_security_operations_destination_auth.py | 62 ++++++++ ...curity_operations_destination_auth_type.py | 37 +++++ ...m_destination_update_request_attributes.py | 4 + src/datadog_api_client/v2/models/__init__.py | 32 ++++ ...tom_destination_returns_ok_response.frozen | 1 + ...ustom_destination_returns_ok_response.yaml | 41 +++++ .../features/logs_custom_destinations.feature | 27 ++++ 21 files changed, 873 insertions(+), 4 deletions(-) create mode 100644 examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1006705740.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations_type.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth_type.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations_type.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth.py create mode 100644 src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth_type.py create mode 100644 tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.yaml diff --git a/.apigentools-info b/.apigentools-info index 0a452f7c06..3083b5cd39 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-07-08 19:08:06.138597", - "spec_repo_commit": "7b042e12" + "regenerated": "2025-07-09 08:34:45.470841", + "spec_repo_commit": "7331abb4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-07-08 19:08:06.154349", - "spec_repo_commit": "7b042e12" + "regenerated": "2025-07-09 08:34:45.486657", + "spec_repo_commit": "7331abb4" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8ab2278d00..d341e15813 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10668,6 +10668,7 @@ components: - $ref: '#/components/schemas/CustomDestinationForwardDestinationSplunk' - $ref: '#/components/schemas/CustomDestinationForwardDestinationElasticsearch' - $ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinel' + - $ref: '#/components/schemas/CustomDestinationForwardDestinationGoogleSecurityOperations' CustomDestinationForwardDestinationElasticsearch: description: The Elasticsearch destination. properties: @@ -10725,6 +10726,42 @@ components: type: string x-enum-varnames: - ELASTICSEARCH + CustomDestinationForwardDestinationGoogleSecurityOperations: + description: The Google Security Operations destination. + properties: + auth: + $ref: '#/components/schemas/CustomDestinationGoogleSecurityOperationsDestinationAuth' + customer_id: + description: The customer ID of the Google Security Operations account. + example: 123-456-7890 + type: string + namespace: + description: The namespace of the Google Security Operations account. + example: google-security-operations-namespace + type: string + regional_endpoint: + description: The `CustomDestinationForwardDestinationGoogleSecurityOperations` + `regional_endpoint`. + example: https://malachiteingestion-pa.googleapis.com + type: string + type: + $ref: '#/components/schemas/CustomDestinationForwardDestinationGoogleSecurityOperationsType' + required: + - type + - customer_id + - regional_endpoint + - namespace + - auth + type: object + CustomDestinationForwardDestinationGoogleSecurityOperationsType: + default: google_security_operations + description: Type of the Google Security Operations destination. + enum: + - google_security_operations + example: google_security_operations + type: string + x-enum-varnames: + - GOOGLE_SECURITY_OPERATIONS CustomDestinationForwardDestinationHttp: description: The HTTP destination. properties: @@ -10826,6 +10863,55 @@ components: type: string x-enum-varnames: - SPLUNK_HEC + CustomDestinationGoogleSecurityOperationsDestinationAuth: + description: Google Security Operations destination authentication. + properties: + client_email: + description: The Google Security Operations client email. + example: client@example.com + type: string + client_id: + description: The Google Security Operations client ID. This field is not + returned by the API. + example: def123456 + type: string + writeOnly: true + private_key: + description: The Google Security Operations private key. This field is not + returned by the API. + example: '-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END + PRIVATE KEY-----\n' + type: string + writeOnly: true + private_key_id: + description: The Google Security Operations private key ID. This field is + not returned by the API. + example: abc12345678 + type: string + writeOnly: true + project_id: + description: Google Security Operations project ID. + example: gcp-project + type: string + type: + $ref: '#/components/schemas/CustomDestinationGoogleSecurityOperationsDestinationAuthType' + required: + - type + - project_id + - private_key_id + - client_email + - client_id + - private_key + type: object + CustomDestinationGoogleSecurityOperationsDestinationAuthType: + default: gcp_private_key + description: Type of the Google Security Operations destination authentication. + enum: + - gcp_private_key + example: gcp_private_key + type: string + x-enum-varnames: + - GCP_PRIVATE_KEY CustomDestinationHttpDestinationAuth: description: Authentication method of the HTTP requests. oneOf: @@ -10971,6 +11057,7 @@ components: - $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationSplunk' - $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationElasticsearch' - $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationMicrosoftSentinel' + - $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationGoogleSecurityOperations' CustomDestinationResponseForwardDestinationElasticsearch: description: The Elasticsearch destination. properties: @@ -11028,6 +11115,42 @@ components: type: string x-enum-varnames: - ELASTICSEARCH + CustomDestinationResponseForwardDestinationGoogleSecurityOperations: + description: The Google Security Operations destination. + properties: + auth: + $ref: '#/components/schemas/CustomDestinationResponseGoogleSecurityOperationsDestinationAuth' + customer_id: + description: The customer ID of the Google Security Operations account. + example: 123-456-7890 + type: string + namespace: + description: The namespace of the Google Security Operations account. + example: google-security-operations-namespace + type: string + regional_endpoint: + description: The `CustomDestinationResponseForwardDestinationGoogleSecurityOperations` + `regional_endpoint`. + example: https://malachiteingestion-pa.googleapis.com + type: string + type: + $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType' + required: + - type + - customer_id + - regional_endpoint + - namespace + - auth + type: object + CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType: + default: google_security_operations + description: Type of the Google Security Operations destination. + enum: + - google_security_operations + example: google_security_operations + type: string + x-enum-varnames: + - GOOGLE_SECURITY_OPERATIONS CustomDestinationResponseForwardDestinationHttp: description: The HTTP destination. properties: @@ -11122,6 +11245,33 @@ components: type: string x-enum-varnames: - SPLUNK_HEC + CustomDestinationResponseGoogleSecurityOperationsDestinationAuth: + description: Google Security Operations destination authentication. + properties: + client_email: + description: The Google Security Operations client email. + example: client@example.com + type: string + project_id: + description: Google Security Operations project ID. + example: gcp-project + type: string + type: + $ref: '#/components/schemas/CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType' + required: + - type + - project_id + - client_email + type: object + CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType: + default: gcp_private_key + description: Type of the Google Security Operations destination authentication. + enum: + - gcp_private_key + example: gcp_private_key + type: string + x-enum-varnames: + - GCP_PRIVATE_KEY CustomDestinationResponseHttpDestinationAuth: description: Authentication method of the HTTP requests. oneOf: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 1ac9a1206e..ba0b1e6b34 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4211,6 +4211,20 @@ datadog\_api\_client.v2.model.custom\_destination\_forward\_destination\_elastic :members: :show-inheritance: +datadog\_api\_client.v2.model.custom\_destination\_forward\_destination\_google\_security\_operations module +------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.custom\_destination\_forward\_destination\_google\_security\_operations\_type module +------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_destination\_forward\_destination\_http module ------------------------------------------------------------------------------------ @@ -4253,6 +4267,20 @@ datadog\_api\_client.v2.model.custom\_destination\_forward\_destination\_splunk\ :members: :show-inheritance: +datadog\_api\_client.v2.model.custom\_destination\_google\_security\_operations\_destination\_auth module +--------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.custom\_destination\_google\_security\_operations\_destination\_auth\_type module +--------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_destination\_http\_destination\_auth module --------------------------------------------------------------------------------- @@ -4337,6 +4365,20 @@ datadog\_api\_client.v2.model.custom\_destination\_response\_forward\_destinatio :members: :show-inheritance: +datadog\_api\_client.v2.model.custom\_destination\_response\_forward\_destination\_google\_security\_operations module +---------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.custom\_destination\_response\_forward\_destination\_google\_security\_operations\_type module +---------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_destination\_response\_forward\_destination\_http module ---------------------------------------------------------------------------------------------- @@ -4379,6 +4421,20 @@ datadog\_api\_client.v2.model.custom\_destination\_response\_forward\_destinatio :members: :show-inheritance: +datadog\_api\_client.v2.model.custom\_destination\_response\_google\_security\_operations\_destination\_auth module +------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.custom\_destination\_response\_google\_security\_operations\_destination\_auth\_type module +------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_destination\_response\_http\_destination\_auth module ------------------------------------------------------------------------------------------- diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1006705740.py b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1006705740.py new file mode 100644 index 0000000000..1e854ebae6 --- /dev/null +++ b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1006705740.py @@ -0,0 +1,67 @@ +""" +Create a Google Security Operations custom destination returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.logs_custom_destinations_api import LogsCustomDestinationsApi +from datadog_api_client.v2.model.custom_destination_attribute_tags_restriction_list_type import ( + CustomDestinationAttributeTagsRestrictionListType, +) +from datadog_api_client.v2.model.custom_destination_create_request import CustomDestinationCreateRequest +from datadog_api_client.v2.model.custom_destination_create_request_attributes import ( + CustomDestinationCreateRequestAttributes, +) +from datadog_api_client.v2.model.custom_destination_create_request_definition import ( + CustomDestinationCreateRequestDefinition, +) +from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations import ( + CustomDestinationForwardDestinationGoogleSecurityOperations, +) +from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations_type import ( + CustomDestinationForwardDestinationGoogleSecurityOperationsType, +) +from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth import ( + CustomDestinationGoogleSecurityOperationsDestinationAuth, +) +from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth_type import ( + CustomDestinationGoogleSecurityOperationsDestinationAuthType, +) +from datadog_api_client.v2.model.custom_destination_type import CustomDestinationType + +body = CustomDestinationCreateRequest( + data=CustomDestinationCreateRequestDefinition( + attributes=CustomDestinationCreateRequestAttributes( + enabled=False, + forward_tags=False, + forward_tags_restriction_list=[ + "datacenter", + "host", + ], + forward_tags_restriction_list_type=CustomDestinationAttributeTagsRestrictionListType.ALLOW_LIST, + forwarder_destination=CustomDestinationForwardDestinationGoogleSecurityOperations( + type=CustomDestinationForwardDestinationGoogleSecurityOperationsType.GOOGLE_SECURITY_OPERATIONS, + customer_id="123-456-7890", + regional_endpoint="https://malachiteingestion-pa.googleapis.com", + namespace="google-security-operations-namespace", + auth=CustomDestinationGoogleSecurityOperationsDestinationAuth( + type=CustomDestinationGoogleSecurityOperationsDestinationAuthType.GCP_PRIVATE_KEY, + project_id="gcp-project", + private_key_id="abc12345678", + client_email="client@example.com", + client_id="def123456", + private_key="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END PRIVATE KEY-----\n", + ), + ), + name="Nginx logs", + query="source:nginx", + ), + type=CustomDestinationType.CUSTOM_DESTINATION, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = LogsCustomDestinationsApi(api_client) + response = api_instance.create_logs_custom_destination(body=body) + + print(response) diff --git a/src/datadog_api_client/v2/model/custom_destination_create_request_attributes.py b/src/datadog_api_client/v2/model/custom_destination_create_request_attributes.py index 883657e211..d3acd0afa0 100644 --- a/src/datadog_api_client/v2/model/custom_destination_create_request_attributes.py +++ b/src/datadog_api_client/v2/model/custom_destination_create_request_attributes.py @@ -30,6 +30,9 @@ from datadog_api_client.v2.model.custom_destination_forward_destination_microsoft_sentinel import ( CustomDestinationForwardDestinationMicrosoftSentinel, ) + from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations import ( + CustomDestinationForwardDestinationGoogleSecurityOperations, + ) class CustomDestinationCreateRequestAttributes(ModelNormal): @@ -77,6 +80,7 @@ def __init__( CustomDestinationForwardDestinationSplunk, CustomDestinationForwardDestinationElasticsearch, CustomDestinationForwardDestinationMicrosoftSentinel, + CustomDestinationForwardDestinationGoogleSecurityOperations, ], name: str, enabled: Union[bool, UnsetType] = unset, diff --git a/src/datadog_api_client/v2/model/custom_destination_forward_destination.py b/src/datadog_api_client/v2/model/custom_destination_forward_destination.py index 75f06267dd..71ba709b33 100644 --- a/src/datadog_api_client/v2/model/custom_destination_forward_destination.py +++ b/src/datadog_api_client/v2/model/custom_destination_forward_destination.py @@ -57,6 +57,15 @@ def __init__(self, **kwargs): :param tenant_id: Tenant ID from the Datadog Azure integration. :type tenant_id: str + + :param customer_id: The customer ID of the Google Security Operations account. + :type customer_id: str + + :param namespace: The namespace of the Google Security Operations account. + :type namespace: str + + :param regional_endpoint: The `CustomDestinationForwardDestinationGoogleSecurityOperations` `regional_endpoint`. + :type regional_endpoint: str """ super().__init__(kwargs) @@ -81,6 +90,9 @@ def _composed_schemas(_): from datadog_api_client.v2.model.custom_destination_forward_destination_microsoft_sentinel import ( CustomDestinationForwardDestinationMicrosoftSentinel, ) + from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations import ( + CustomDestinationForwardDestinationGoogleSecurityOperations, + ) return { "oneOf": [ @@ -88,5 +100,6 @@ def _composed_schemas(_): CustomDestinationForwardDestinationSplunk, CustomDestinationForwardDestinationElasticsearch, CustomDestinationForwardDestinationMicrosoftSentinel, + CustomDestinationForwardDestinationGoogleSecurityOperations, ], } diff --git a/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations.py b/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations.py new file mode 100644 index 0000000000..434176aecc --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations.py @@ -0,0 +1,82 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth import ( + CustomDestinationGoogleSecurityOperationsDestinationAuth, + ) + from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations_type import ( + CustomDestinationForwardDestinationGoogleSecurityOperationsType, + ) + + +class CustomDestinationForwardDestinationGoogleSecurityOperations(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth import ( + CustomDestinationGoogleSecurityOperationsDestinationAuth, + ) + from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations_type import ( + CustomDestinationForwardDestinationGoogleSecurityOperationsType, + ) + + return { + "auth": (CustomDestinationGoogleSecurityOperationsDestinationAuth,), + "customer_id": (str,), + "namespace": (str,), + "regional_endpoint": (str,), + "type": (CustomDestinationForwardDestinationGoogleSecurityOperationsType,), + } + + attribute_map = { + "auth": "auth", + "customer_id": "customer_id", + "namespace": "namespace", + "regional_endpoint": "regional_endpoint", + "type": "type", + } + + def __init__( + self_, + auth: CustomDestinationGoogleSecurityOperationsDestinationAuth, + customer_id: str, + namespace: str, + regional_endpoint: str, + type: CustomDestinationForwardDestinationGoogleSecurityOperationsType, + **kwargs, + ): + """ + The Google Security Operations destination. + + :param auth: Google Security Operations destination authentication. + :type auth: CustomDestinationGoogleSecurityOperationsDestinationAuth + + :param customer_id: The customer ID of the Google Security Operations account. + :type customer_id: str + + :param namespace: The namespace of the Google Security Operations account. + :type namespace: str + + :param regional_endpoint: The ``CustomDestinationForwardDestinationGoogleSecurityOperations`` ``regional_endpoint``. + :type regional_endpoint: str + + :param type: Type of the Google Security Operations destination. + :type type: CustomDestinationForwardDestinationGoogleSecurityOperationsType + """ + super().__init__(kwargs) + + self_.auth = auth + self_.customer_id = customer_id + self_.namespace = namespace + self_.regional_endpoint = regional_endpoint + self_.type = type diff --git a/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations_type.py b/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations_type.py new file mode 100644 index 0000000000..7551ac7cb1 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_forward_destination_google_security_operations_type.py @@ -0,0 +1,37 @@ +# 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 CustomDestinationForwardDestinationGoogleSecurityOperationsType(ModelSimple): + """ + Type of the Google Security Operations destination. + + :param value: If omitted defaults to "google_security_operations". Must be one of ["google_security_operations"]. + :type value: str + """ + + allowed_values = { + "google_security_operations", + } + GOOGLE_SECURITY_OPERATIONS: ClassVar["CustomDestinationForwardDestinationGoogleSecurityOperationsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CustomDestinationForwardDestinationGoogleSecurityOperationsType.GOOGLE_SECURITY_OPERATIONS = ( + CustomDestinationForwardDestinationGoogleSecurityOperationsType("google_security_operations") +) diff --git a/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth.py b/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth.py new file mode 100644 index 0000000000..a379aa7651 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth.py @@ -0,0 +1,83 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth_type import ( + CustomDestinationGoogleSecurityOperationsDestinationAuthType, + ) + + +class CustomDestinationGoogleSecurityOperationsDestinationAuth(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth_type import ( + CustomDestinationGoogleSecurityOperationsDestinationAuthType, + ) + + return { + "client_email": (str,), + "client_id": (str,), + "private_key": (str,), + "private_key_id": (str,), + "project_id": (str,), + "type": (CustomDestinationGoogleSecurityOperationsDestinationAuthType,), + } + + attribute_map = { + "client_email": "client_email", + "client_id": "client_id", + "private_key": "private_key", + "private_key_id": "private_key_id", + "project_id": "project_id", + "type": "type", + } + + def __init__( + self_, + client_email: str, + client_id: str, + private_key: str, + private_key_id: str, + project_id: str, + type: CustomDestinationGoogleSecurityOperationsDestinationAuthType, + **kwargs, + ): + """ + Google Security Operations destination authentication. + + :param client_email: The Google Security Operations client email. + :type client_email: str + + :param client_id: The Google Security Operations client ID. This field is not returned by the API. + :type client_id: str + + :param private_key: The Google Security Operations private key. This field is not returned by the API. + :type private_key: str + + :param private_key_id: The Google Security Operations private key ID. This field is not returned by the API. + :type private_key_id: str + + :param project_id: Google Security Operations project ID. + :type project_id: str + + :param type: Type of the Google Security Operations destination authentication. + :type type: CustomDestinationGoogleSecurityOperationsDestinationAuthType + """ + super().__init__(kwargs) + + self_.client_email = client_email + self_.client_id = client_id + self_.private_key = private_key + self_.private_key_id = private_key_id + self_.project_id = project_id + self_.type = type diff --git a/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth_type.py b/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth_type.py new file mode 100644 index 0000000000..6b4b81580d --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_google_security_operations_destination_auth_type.py @@ -0,0 +1,37 @@ +# 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 CustomDestinationGoogleSecurityOperationsDestinationAuthType(ModelSimple): + """ + Type of the Google Security Operations destination authentication. + + :param value: If omitted defaults to "gcp_private_key". Must be one of ["gcp_private_key"]. + :type value: str + """ + + allowed_values = { + "gcp_private_key", + } + GCP_PRIVATE_KEY: ClassVar["CustomDestinationGoogleSecurityOperationsDestinationAuthType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CustomDestinationGoogleSecurityOperationsDestinationAuthType.GCP_PRIVATE_KEY = ( + CustomDestinationGoogleSecurityOperationsDestinationAuthType("gcp_private_key") +) diff --git a/src/datadog_api_client/v2/model/custom_destination_response_attributes.py b/src/datadog_api_client/v2/model/custom_destination_response_attributes.py index 663f2b472a..dc5c024c44 100644 --- a/src/datadog_api_client/v2/model/custom_destination_response_attributes.py +++ b/src/datadog_api_client/v2/model/custom_destination_response_attributes.py @@ -32,6 +32,9 @@ from datadog_api_client.v2.model.custom_destination_response_forward_destination_microsoft_sentinel import ( CustomDestinationResponseForwardDestinationMicrosoftSentinel, ) + from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperations, + ) class CustomDestinationResponseAttributes(ModelNormal): @@ -83,6 +86,7 @@ def __init__( CustomDestinationResponseForwardDestinationSplunk, CustomDestinationResponseForwardDestinationElasticsearch, CustomDestinationResponseForwardDestinationMicrosoftSentinel, + CustomDestinationResponseForwardDestinationGoogleSecurityOperations, UnsetType, ] = unset, name: Union[str, UnsetType] = unset, diff --git a/src/datadog_api_client/v2/model/custom_destination_response_forward_destination.py b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination.py index 809eced5df..0c3ec8c1f3 100644 --- a/src/datadog_api_client/v2/model/custom_destination_response_forward_destination.py +++ b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination.py @@ -54,6 +54,15 @@ def __init__(self, **kwargs): :param tenant_id: Tenant ID from the Datadog Azure integration. :type tenant_id: str + + :param customer_id: The customer ID of the Google Security Operations account. + :type customer_id: str + + :param namespace: The namespace of the Google Security Operations account. + :type namespace: str + + :param regional_endpoint: The `CustomDestinationResponseForwardDestinationGoogleSecurityOperations` `regional_endpoint`. + :type regional_endpoint: str """ super().__init__(kwargs) @@ -78,6 +87,9 @@ def _composed_schemas(_): from datadog_api_client.v2.model.custom_destination_response_forward_destination_microsoft_sentinel import ( CustomDestinationResponseForwardDestinationMicrosoftSentinel, ) + from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperations, + ) return { "oneOf": [ @@ -85,5 +97,6 @@ def _composed_schemas(_): CustomDestinationResponseForwardDestinationSplunk, CustomDestinationResponseForwardDestinationElasticsearch, CustomDestinationResponseForwardDestinationMicrosoftSentinel, + CustomDestinationResponseForwardDestinationGoogleSecurityOperations, ], } diff --git a/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations.py b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations.py new file mode 100644 index 0000000000..2350117fce --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations.py @@ -0,0 +1,82 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuth, + ) + from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations_type import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType, + ) + + +class CustomDestinationResponseForwardDestinationGoogleSecurityOperations(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuth, + ) + from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations_type import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType, + ) + + return { + "auth": (CustomDestinationResponseGoogleSecurityOperationsDestinationAuth,), + "customer_id": (str,), + "namespace": (str,), + "regional_endpoint": (str,), + "type": (CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType,), + } + + attribute_map = { + "auth": "auth", + "customer_id": "customer_id", + "namespace": "namespace", + "regional_endpoint": "regional_endpoint", + "type": "type", + } + + def __init__( + self_, + auth: CustomDestinationResponseGoogleSecurityOperationsDestinationAuth, + customer_id: str, + namespace: str, + regional_endpoint: str, + type: CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType, + **kwargs, + ): + """ + The Google Security Operations destination. + + :param auth: Google Security Operations destination authentication. + :type auth: CustomDestinationResponseGoogleSecurityOperationsDestinationAuth + + :param customer_id: The customer ID of the Google Security Operations account. + :type customer_id: str + + :param namespace: The namespace of the Google Security Operations account. + :type namespace: str + + :param regional_endpoint: The ``CustomDestinationResponseForwardDestinationGoogleSecurityOperations`` ``regional_endpoint``. + :type regional_endpoint: str + + :param type: Type of the Google Security Operations destination. + :type type: CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType + """ + super().__init__(kwargs) + + self_.auth = auth + self_.customer_id = customer_id + self_.namespace = namespace + self_.regional_endpoint = regional_endpoint + self_.type = type diff --git a/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations_type.py b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations_type.py new file mode 100644 index 0000000000..890d20f221 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_response_forward_destination_google_security_operations_type.py @@ -0,0 +1,37 @@ +# 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 CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType(ModelSimple): + """ + Type of the Google Security Operations destination. + + :param value: If omitted defaults to "google_security_operations". Must be one of ["google_security_operations"]. + :type value: str + """ + + allowed_values = { + "google_security_operations", + } + GOOGLE_SECURITY_OPERATIONS: ClassVar["CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType.GOOGLE_SECURITY_OPERATIONS = ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType("google_security_operations") +) diff --git a/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth.py b/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth.py new file mode 100644 index 0000000000..10c1e987c0 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth.py @@ -0,0 +1,62 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth_type import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType, + ) + + +class CustomDestinationResponseGoogleSecurityOperationsDestinationAuth(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth_type import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType, + ) + + return { + "client_email": (str,), + "project_id": (str,), + "type": (CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType,), + } + + attribute_map = { + "client_email": "client_email", + "project_id": "project_id", + "type": "type", + } + + def __init__( + self_, + client_email: str, + project_id: str, + type: CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType, + **kwargs, + ): + """ + Google Security Operations destination authentication. + + :param client_email: The Google Security Operations client email. + :type client_email: str + + :param project_id: Google Security Operations project ID. + :type project_id: str + + :param type: Type of the Google Security Operations destination authentication. + :type type: CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType + """ + super().__init__(kwargs) + + self_.client_email = client_email + self_.project_id = project_id + self_.type = type diff --git a/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth_type.py b/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth_type.py new file mode 100644 index 0000000000..2407c3f9e0 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_destination_response_google_security_operations_destination_auth_type.py @@ -0,0 +1,37 @@ +# 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 CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType(ModelSimple): + """ + Type of the Google Security Operations destination authentication. + + :param value: If omitted defaults to "gcp_private_key". Must be one of ["gcp_private_key"]. + :type value: str + """ + + allowed_values = { + "gcp_private_key", + } + GCP_PRIVATE_KEY: ClassVar["CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType.GCP_PRIVATE_KEY = ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType("gcp_private_key") +) diff --git a/src/datadog_api_client/v2/model/custom_destination_update_request_attributes.py b/src/datadog_api_client/v2/model/custom_destination_update_request_attributes.py index 5929dbc94a..5762d0607d 100644 --- a/src/datadog_api_client/v2/model/custom_destination_update_request_attributes.py +++ b/src/datadog_api_client/v2/model/custom_destination_update_request_attributes.py @@ -30,6 +30,9 @@ from datadog_api_client.v2.model.custom_destination_forward_destination_microsoft_sentinel import ( CustomDestinationForwardDestinationMicrosoftSentinel, ) + from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations import ( + CustomDestinationForwardDestinationGoogleSecurityOperations, + ) class CustomDestinationUpdateRequestAttributes(ModelNormal): @@ -81,6 +84,7 @@ def __init__( CustomDestinationForwardDestinationSplunk, CustomDestinationForwardDestinationElasticsearch, CustomDestinationForwardDestinationMicrosoftSentinel, + CustomDestinationForwardDestinationGoogleSecurityOperations, UnsetType, ] = unset, name: Union[str, UnsetType] = unset, diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 1a21b983ad..03422fb878 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -805,6 +805,12 @@ from datadog_api_client.v2.model.custom_destination_forward_destination_elasticsearch_type import ( CustomDestinationForwardDestinationElasticsearchType, ) +from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations import ( + CustomDestinationForwardDestinationGoogleSecurityOperations, +) +from datadog_api_client.v2.model.custom_destination_forward_destination_google_security_operations_type import ( + CustomDestinationForwardDestinationGoogleSecurityOperationsType, +) from datadog_api_client.v2.model.custom_destination_forward_destination_http import ( CustomDestinationForwardDestinationHttp, ) @@ -823,6 +829,12 @@ from datadog_api_client.v2.model.custom_destination_forward_destination_splunk_type import ( CustomDestinationForwardDestinationSplunkType, ) +from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth import ( + CustomDestinationGoogleSecurityOperationsDestinationAuth, +) +from datadog_api_client.v2.model.custom_destination_google_security_operations_destination_auth_type import ( + CustomDestinationGoogleSecurityOperationsDestinationAuthType, +) from datadog_api_client.v2.model.custom_destination_http_destination_auth import CustomDestinationHttpDestinationAuth from datadog_api_client.v2.model.custom_destination_http_destination_auth_basic import ( CustomDestinationHttpDestinationAuthBasic, @@ -851,6 +863,12 @@ from datadog_api_client.v2.model.custom_destination_response_forward_destination_elasticsearch_type import ( CustomDestinationResponseForwardDestinationElasticsearchType, ) +from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperations, +) +from datadog_api_client.v2.model.custom_destination_response_forward_destination_google_security_operations_type import ( + CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType, +) from datadog_api_client.v2.model.custom_destination_response_forward_destination_http import ( CustomDestinationResponseForwardDestinationHttp, ) @@ -869,6 +887,12 @@ from datadog_api_client.v2.model.custom_destination_response_forward_destination_splunk_type import ( CustomDestinationResponseForwardDestinationSplunkType, ) +from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuth, +) +from datadog_api_client.v2.model.custom_destination_response_google_security_operations_destination_auth_type import ( + CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType, +) from datadog_api_client.v2.model.custom_destination_response_http_destination_auth import ( CustomDestinationResponseHttpDestinationAuth, ) @@ -4172,12 +4196,16 @@ "CustomDestinationForwardDestination", "CustomDestinationForwardDestinationElasticsearch", "CustomDestinationForwardDestinationElasticsearchType", + "CustomDestinationForwardDestinationGoogleSecurityOperations", + "CustomDestinationForwardDestinationGoogleSecurityOperationsType", "CustomDestinationForwardDestinationHttp", "CustomDestinationForwardDestinationHttpType", "CustomDestinationForwardDestinationMicrosoftSentinel", "CustomDestinationForwardDestinationMicrosoftSentinelType", "CustomDestinationForwardDestinationSplunk", "CustomDestinationForwardDestinationSplunkType", + "CustomDestinationGoogleSecurityOperationsDestinationAuth", + "CustomDestinationGoogleSecurityOperationsDestinationAuthType", "CustomDestinationHttpDestinationAuth", "CustomDestinationHttpDestinationAuthBasic", "CustomDestinationHttpDestinationAuthBasicType", @@ -4190,12 +4218,16 @@ "CustomDestinationResponseForwardDestination", "CustomDestinationResponseForwardDestinationElasticsearch", "CustomDestinationResponseForwardDestinationElasticsearchType", + "CustomDestinationResponseForwardDestinationGoogleSecurityOperations", + "CustomDestinationResponseForwardDestinationGoogleSecurityOperationsType", "CustomDestinationResponseForwardDestinationHttp", "CustomDestinationResponseForwardDestinationHttpType", "CustomDestinationResponseForwardDestinationMicrosoftSentinel", "CustomDestinationResponseForwardDestinationMicrosoftSentinelType", "CustomDestinationResponseForwardDestinationSplunk", "CustomDestinationResponseForwardDestinationSplunkType", + "CustomDestinationResponseGoogleSecurityOperationsDestinationAuth", + "CustomDestinationResponseGoogleSecurityOperationsDestinationAuthType", "CustomDestinationResponseHttpDestinationAuth", "CustomDestinationResponseHttpDestinationAuthBasic", "CustomDestinationResponseHttpDestinationAuthBasicType", diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.frozen new file mode 100644 index 0000000000..b8d60d0659 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.frozen @@ -0,0 +1 @@ +2025-07-09T08:26:14.805Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.yaml new file mode 100644 index 0000000000..c88642eda6 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_a_google_security_operations_custom_destination_returns_ok_response.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forward_tags_restriction_list":["datacenter","host"],"forward_tags_restriction_list_type":"ALLOW_LIST","forwarder_destination":{"auth":{"client_email":"client@example.com","client_id":"def123456","private_key":"-----BEGIN + PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END PRIVATE KEY-----\n","private_key_id":"abc12345678","project_id":"gcp-project","type":"gcp_private_key"},"customer_id":"123-456-7890","namespace":"google-security-operations-namespace","regional_endpoint":"https://malachiteingestion-pa.googleapis.com","type":"google_security_operations"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + string: '{"data":{"id":"363586eb-0e4c-45c6-ba95-5afaddead03f","attributes":{"name":"Nginx + logs","query":"source:nginx","enabled":false,"forwarder_destination":{"customer_id":"123-456-7890","regional_endpoint":"https://malachiteingestion-pa.googleapis.com","namespace":"google-security-operations-namespace","auth":{"project_id":"gcp-project","client_email":"client@example.com","type":"gcp_private_key"},"type":"google_security_operations"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":["datacenter","host"],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/363586eb-0e4c-45c6-ba95-5afaddead03f + response: + body: + string: '' + headers: + content-type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/features/logs_custom_destinations.feature b/tests/v2/features/logs_custom_destinations.feature index 44b8540485..d56c94570d 100644 --- a/tests/v2/features/logs_custom_destinations.feature +++ b/tests/v2/features/logs_custom_destinations.feature @@ -57,6 +57,33 @@ Feature: Logs Custom Destinations And the response "data.attributes.forward_tags_restriction_list" array contains value "host" And the response "data.attributes.forward_tags_restriction_list_type" is equal to "ALLOW_LIST" + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Create a Google Security Operations custom destination returns "OK" response + Given new "CreateLogsCustomDestination" request + And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forward_tags_restriction_list": ["datacenter", "host"], "forward_tags_restriction_list_type": "ALLOW_LIST", "forwarder_destination": {"type": "google_security_operations", "customer_id": "123-456-7890", "regional_endpoint": "https://malachiteingestion-pa.googleapis.com", "namespace": "google-security-operations-namespace", "auth": {"type": "gcp_private_key", "project_id": "gcp-project", "private_key_id": "abc12345678", "client_email": "client@example.com", "client_id": "def123456", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END PRIVATE KEY-----\n"}}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data" has field "id" + And the response "data.attributes.name" is equal to "Nginx logs" + And the response "data.attributes.query" is equal to "source:nginx" + And the response "data.attributes.forwarder_destination.type" is equal to "google_security_operations" + And the response "data.attributes.forwarder_destination.customer_id" is equal to "123-456-7890" + And the response "data.attributes.forwarder_destination.regional_endpoint" is equal to "https://malachiteingestion-pa.googleapis.com" + And the response "data.attributes.forwarder_destination.namespace" is equal to "google-security-operations-namespace" + And the response "data.attributes.forwarder_destination.auth.type" is equal to "gcp_private_key" + And the response "data.attributes.forwarder_destination.auth.project_id" is equal to "gcp-project" + And the response "data.attributes.forwarder_destination.auth.client_email" is equal to "client@example.com" + And the response "data.attributes.forwarder_destination.auth" does not have field "private_key" + And the response "data.attributes.forwarder_destination.auth" does not have field "private_key_id" + And the response "data.attributes.forwarder_destination.auth" does not have field "client_id" + And the response "data.attributes.enabled" is false + And the response "data.attributes.forward_tags" is false + And the response "data.attributes.forward_tags_restriction_list" has length 2 + And the response "data.attributes.forward_tags_restriction_list" array contains value "datacenter" + And the response "data.attributes.forward_tags_restriction_list" array contains value "host" + And the response "data.attributes.forward_tags_restriction_list_type" is equal to "ALLOW_LIST" + @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create a Microsoft Sentinel custom destination returns "OK" response Given new "CreateLogsCustomDestination" request