diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 94f455378b..f8bb301286 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -296,6 +296,14 @@ components: schema: format: int64 type: integer + CloudInventorySyncConfigID: + description: Unique identifier of the Storage Management configuration. + example: abc123 + in: path + name: id + required: true + schema: + type: string CloudWorkloadSecurityAgentRuleID: description: "The ID of the Agent rule" example: 3b5-v82-ns6 @@ -55624,6 +55632,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination" + - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination" ObservabilityPipelineConfigPipelineType: default: logs description: The type of data being ingested. Defaults to `logs` if not specified. @@ -59745,6 +59754,81 @@ components: type: string x-enum-varnames: - SPLUNK_HEC + ObservabilityPipelineSplunkHecMetricsDestination: + description: |- + The `splunk_hec_metrics` destination forwards metrics to Splunk using the HTTP Event Collector (HEC). + + **Supported pipeline types:** metrics + properties: + buffer: + $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" + compression: + $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationCompression" + default_namespace: + description: Optional default namespace for metrics sent to Splunk HEC. + example: "custom_namespace" + type: string + endpoint_url_key: + description: Name of the environment variable or secret that holds the Splunk HEC endpoint URL. + example: SPLUNK_HEC_ENDPOINT_URL + type: string + id: + description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + example: splunk-hec-metrics-destination + type: string + index: + description: Optional name of the Splunk index where metrics are written. + example: "metrics" + type: string + inputs: + description: A list of component IDs whose output is used as the `input` for this component. + example: ["metrics-filter-processor"] + items: + description: The ID of a component whose output is used as input for this destination. + type: string + type: array + source: + description: The Splunk source field value for metric events. + example: "observability_pipelines" + type: string + sourcetype: + description: The Splunk sourcetype to assign to metric events. + example: "custom_sourcetype" + type: string + tls: + $ref: "#/components/schemas/ObservabilityPipelineTls" + token_key: + description: Name of the environment variable or secret that holds the Splunk HEC token. + example: SPLUNK_HEC_TOKEN + type: string + type: + $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationType" + required: + - id + - type + - inputs + type: object + x-pipeline-types: [metrics] + ObservabilityPipelineSplunkHecMetricsDestinationCompression: + default: none + description: Compression algorithm applied when sending metrics to Splunk HEC. + enum: + - none + - gzip + example: none + type: string + x-enum-varnames: + - NONE + - GZIP + ObservabilityPipelineSplunkHecMetricsDestinationType: + default: splunk_hec_metrics + description: The destination type. Always `splunk_hec_metrics`. + enum: + - splunk_hec_metrics + example: splunk_hec_metrics + type: string + x-enum-varnames: + - SPLUNK_HEC_METRICS ObservabilityPipelineSplunkHecSource: description: |- The `splunk_hec` source implements the Splunk HTTP Event Collector (HEC) API. @@ -107705,6 +107789,33 @@ paths: operator: OR permissions: - aws_configurations_manage + /api/v2/cloudinventoryservice/syncconfigs/{id}: + delete: + description: |- + Delete a Storage Management configuration by its unique identifier. Deleting a configuration stops inventory file synchronization for the associated cloud account. + operationId: DeleteSyncConfig + parameters: + - $ref: "#/components/parameters/CloudInventorySyncConfigID" + responses: + "204": + description: No Content + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Storage Management configuration + tags: + - Storage Management + "x-permission": + operator: OR + permissions: + - aws_configurations_manage /api/v2/code-coverage/branch/summary: post: description: |- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 203d259c74..8c6243db4a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -25470,6 +25470,27 @@ datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_destination\ :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_metrics\_destination module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_metrics\_destination\_compression module +------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_compression + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_metrics\_destination\_type module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_source module --------------------------------------------------------------------------------- diff --git a/examples/v2/storage-management/DeleteSyncConfig.py b/examples/v2/storage-management/DeleteSyncConfig.py new file mode 100644 index 0000000000..3ce14c7b82 --- /dev/null +++ b/examples/v2/storage-management/DeleteSyncConfig.py @@ -0,0 +1,13 @@ +""" +Delete a Storage Management configuration returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.storage_management_api import StorageManagementApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = StorageManagementApi(api_client) + api_instance.delete_sync_config( + id="id", + ) diff --git a/src/datadog_api_client/v2/api/storage_management_api.py b/src/datadog_api_client/v2/api/storage_management_api.py index c900bc02ea..d528a75c50 100644 --- a/src/datadog_api_client/v2/api/storage_management_api.py +++ b/src/datadog_api_client/v2/api/storage_management_api.py @@ -21,6 +21,29 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._delete_sync_config_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/cloudinventoryservice/syncconfigs/{id}", + "operation_id": "delete_sync_config", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._upsert_sync_config_endpoint = _Endpoint( settings={ "response_type": (CloudInventorySyncConfigResponse,), @@ -41,6 +64,23 @@ def __init__(self, api_client=None): api_client=api_client, ) + def delete_sync_config( + self, + id: str, + ) -> None: + """Delete a Storage Management configuration. + + Delete a Storage Management configuration by its unique identifier. Deleting a configuration stops inventory file synchronization for the associated cloud account. + + :param id: Unique identifier of the Storage Management configuration. + :type id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + return self._delete_sync_config_endpoint.call_with_http_info(**kwargs) + def upsert_sync_config( self, body: UpsertCloudInventorySyncConfigRequest, diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config.py b/src/datadog_api_client/v2/model/observability_pipeline_config.py index 13a3ef23e0..afd1a78d88 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config.py @@ -97,6 +97,9 @@ from datadog_api_client.v2.model.observability_pipeline_datadog_metrics_destination import ( ObservabilityPipelineDatadogMetricsDestination, ) + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination import ( + ObservabilityPipelineSplunkHecMetricsDestination, + ) from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( ObservabilityPipelineDatadogAgentSource, ) @@ -200,6 +203,7 @@ def __init__( ObservabilityPipelineSyslogNgDestination, ObservabilityPipelineDatabricksZerobusDestination, ObservabilityPipelineDatadogMetricsDestination, + ObservabilityPipelineSplunkHecMetricsDestination, ] ], sources: List[ diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py index 0ddc4d1ff8..be0e39e2c7 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py @@ -226,6 +226,12 @@ def __init__(self, **kwargs): :param unity_catalog_endpoint_key: Name of the environment variable or the secret identifier that references your Databricks workspace URL, which is used to communicate with the Unity Catalog API. :type unity_catalog_endpoint_key: str, optional + + :param default_namespace: Optional default namespace for metrics sent to Splunk HEC. + :type default_namespace: str, optional + + :param source: The Splunk source field value for metric events. + :type source: str, optional """ super().__init__(kwargs) @@ -309,6 +315,9 @@ def _composed_schemas(_): from datadog_api_client.v2.model.observability_pipeline_datadog_metrics_destination import ( ObservabilityPipelineDatadogMetricsDestination, ) + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination import ( + ObservabilityPipelineSplunkHecMetricsDestination, + ) return { "oneOf": [ @@ -337,5 +346,6 @@ def _composed_schemas(_): ObservabilityPipelineSyslogNgDestination, ObservabilityPipelineDatabricksZerobusDestination, ObservabilityPipelineDatadogMetricsDestination, + ObservabilityPipelineSplunkHecMetricsDestination, ], } diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination.py new file mode 100644 index 0000000000..477fcd1092 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination.py @@ -0,0 +1,163 @@ +# 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 List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_compression import ( + ObservabilityPipelineSplunkHecMetricsDestinationCompression, + ) + from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_type import ( + ObservabilityPipelineSplunkHecMetricsDestinationType, + ) + from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import ( + ObservabilityPipelineDiskBufferOptions, + ) + from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import ( + ObservabilityPipelineMemoryBufferOptions, + ) + from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import ( + ObservabilityPipelineMemoryBufferSizeOptions, + ) + + +class ObservabilityPipelineSplunkHecMetricsDestination(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_compression import ( + ObservabilityPipelineSplunkHecMetricsDestinationCompression, + ) + from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls + from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_type import ( + ObservabilityPipelineSplunkHecMetricsDestinationType, + ) + + return { + "buffer": (ObservabilityPipelineBufferOptions,), + "compression": (ObservabilityPipelineSplunkHecMetricsDestinationCompression,), + "default_namespace": (str,), + "endpoint_url_key": (str,), + "id": (str,), + "index": (str,), + "inputs": ([str],), + "source": (str,), + "sourcetype": (str,), + "tls": (ObservabilityPipelineTls,), + "token_key": (str,), + "type": (ObservabilityPipelineSplunkHecMetricsDestinationType,), + } + + attribute_map = { + "buffer": "buffer", + "compression": "compression", + "default_namespace": "default_namespace", + "endpoint_url_key": "endpoint_url_key", + "id": "id", + "index": "index", + "inputs": "inputs", + "source": "source", + "sourcetype": "sourcetype", + "tls": "tls", + "token_key": "token_key", + "type": "type", + } + + def __init__( + self_, + id: str, + inputs: List[str], + type: ObservabilityPipelineSplunkHecMetricsDestinationType, + buffer: Union[ + ObservabilityPipelineBufferOptions, + ObservabilityPipelineDiskBufferOptions, + ObservabilityPipelineMemoryBufferOptions, + ObservabilityPipelineMemoryBufferSizeOptions, + UnsetType, + ] = unset, + compression: Union[ObservabilityPipelineSplunkHecMetricsDestinationCompression, UnsetType] = unset, + default_namespace: Union[str, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, + index: Union[str, UnsetType] = unset, + source: Union[str, UnsetType] = unset, + sourcetype: Union[str, UnsetType] = unset, + tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The ``splunk_hec_metrics`` destination forwards metrics to Splunk using the HTTP Event Collector (HEC). + + **Supported pipeline types:** metrics + + :param buffer: Configuration for buffer settings on destination components. + :type buffer: ObservabilityPipelineBufferOptions, optional + + :param compression: Compression algorithm applied when sending metrics to Splunk HEC. + :type compression: ObservabilityPipelineSplunkHecMetricsDestinationCompression, optional + + :param default_namespace: Optional default namespace for metrics sent to Splunk HEC. + :type default_namespace: str, optional + + :param endpoint_url_key: Name of the environment variable or secret that holds the Splunk HEC endpoint URL. + :type endpoint_url_key: str, optional + + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). + :type id: str + + :param index: Optional name of the Splunk index where metrics are written. + :type index: str, optional + + :param inputs: A list of component IDs whose output is used as the ``input`` for this component. + :type inputs: [str] + + :param source: The Splunk source field value for metric events. + :type source: str, optional + + :param sourcetype: The Splunk sourcetype to assign to metric events. + :type sourcetype: str, optional + + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. + :type tls: ObservabilityPipelineTls, optional + + :param token_key: Name of the environment variable or secret that holds the Splunk HEC token. + :type token_key: str, optional + + :param type: The destination type. Always ``splunk_hec_metrics``. + :type type: ObservabilityPipelineSplunkHecMetricsDestinationType + """ + if buffer is not unset: + kwargs["buffer"] = buffer + if compression is not unset: + kwargs["compression"] = compression + if default_namespace is not unset: + kwargs["default_namespace"] = default_namespace + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key + if index is not unset: + kwargs["index"] = index + if source is not unset: + kwargs["source"] = source + if sourcetype is not unset: + kwargs["sourcetype"] = sourcetype + if tls is not unset: + kwargs["tls"] = tls + if token_key is not unset: + kwargs["token_key"] = token_key + super().__init__(kwargs) + + self_.id = id + self_.inputs = inputs + self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_compression.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_compression.py new file mode 100644 index 0000000000..a0fb62edb8 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_compression.py @@ -0,0 +1,42 @@ +# 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 ObservabilityPipelineSplunkHecMetricsDestinationCompression(ModelSimple): + """ + Compression algorithm applied when sending metrics to Splunk HEC. + + :param value: If omitted defaults to "none". Must be one of ["none", "gzip"]. + :type value: str + """ + + allowed_values = { + "none", + "gzip", + } + NONE: ClassVar["ObservabilityPipelineSplunkHecMetricsDestinationCompression"] + GZIP: ClassVar["ObservabilityPipelineSplunkHecMetricsDestinationCompression"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelineSplunkHecMetricsDestinationCompression.NONE = ( + ObservabilityPipelineSplunkHecMetricsDestinationCompression("none") +) +ObservabilityPipelineSplunkHecMetricsDestinationCompression.GZIP = ( + ObservabilityPipelineSplunkHecMetricsDestinationCompression("gzip") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_type.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_type.py new file mode 100644 index 0000000000..825a741bb2 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_metrics_destination_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 ObservabilityPipelineSplunkHecMetricsDestinationType(ModelSimple): + """ + The destination type. Always `splunk_hec_metrics`. + + :param value: If omitted defaults to "splunk_hec_metrics". Must be one of ["splunk_hec_metrics"]. + :type value: str + """ + + allowed_values = { + "splunk_hec_metrics", + } + SPLUNK_HEC_METRICS: ClassVar["ObservabilityPipelineSplunkHecMetricsDestinationType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelineSplunkHecMetricsDestinationType.SPLUNK_HEC_METRICS = ( + ObservabilityPipelineSplunkHecMetricsDestinationType("splunk_hec_metrics") +) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 71577769a7..43f1649b2a 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5199,6 +5199,15 @@ from datadog_api_client.v2.model.observability_pipeline_splunk_hec_destination_type import ( ObservabilityPipelineSplunkHecDestinationType, ) +from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination import ( + ObservabilityPipelineSplunkHecMetricsDestination, +) +from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_compression import ( + ObservabilityPipelineSplunkHecMetricsDestinationCompression, +) +from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination_type import ( + ObservabilityPipelineSplunkHecMetricsDestinationType, +) from datadog_api_client.v2.model.observability_pipeline_splunk_hec_source import ObservabilityPipelineSplunkHecSource from datadog_api_client.v2.model.observability_pipeline_splunk_hec_source_type import ( ObservabilityPipelineSplunkHecSourceType, @@ -12061,6 +12070,9 @@ "ObservabilityPipelineSplunkHecDestinationEncoding", "ObservabilityPipelineSplunkHecDestinationTokenStrategy", "ObservabilityPipelineSplunkHecDestinationType", + "ObservabilityPipelineSplunkHecMetricsDestination", + "ObservabilityPipelineSplunkHecMetricsDestinationCompression", + "ObservabilityPipelineSplunkHecMetricsDestinationType", "ObservabilityPipelineSplunkHecSource", "ObservabilityPipelineSplunkHecSourceType", "ObservabilityPipelineSplunkHecSourceValidToken", diff --git a/tests/v2/features/storage_management.feature b/tests/v2/features/storage_management.feature index cde4a4e987..ae0a179453 100644 --- a/tests/v2/features/storage_management.feature +++ b/tests/v2/features/storage_management.feature @@ -8,15 +8,31 @@ Feature: Storage Management Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "StorageManagement" API - And new "UpsertSyncConfig" request - And body with value {"data": {"attributes": {"aws": {"aws_account_id": "123456789012", "destination_bucket_name": "my-inventory-bucket", "destination_bucket_region": "us-east-1", "destination_prefix": "logs/"}, "azure": {"client_id": "11111111-1111-1111-1111-111111111111", "container": "inventory-container", "resource_group": "my-resource-group", "storage_account": "mystorageaccount", "subscription_id": "33333333-3333-3333-3333-333333333333", "tenant_id": "22222222-2222-2222-2222-222222222222"}, "gcp": {"destination_bucket_name": "my-inventory-reports", "project_id": "my-gcp-project", "service_account_email": "reader@my-gcp-project.iam.gserviceaccount.com", "source_bucket_name": "my-monitored-bucket"}}, "id": "aws", "type": "cloud_provider"}} + + @generated @skip @team:DataDog/storage-management + Scenario: Delete a Storage Management configuration returns "No Content" response + Given new "DeleteSyncConfig" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/storage-management + Scenario: Delete a Storage Management configuration returns "Not Found" response + Given new "DeleteSyncConfig" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found @generated @skip @team:DataDog/storage-management Scenario: Enable Storage Management for a bucket returns "Bad Request" response + Given new "UpsertSyncConfig" request + And body with value {"data": {"attributes": {"aws": {"aws_account_id": "123456789012", "destination_bucket_name": "my-inventory-bucket", "destination_bucket_region": "us-east-1", "destination_prefix": "logs/"}, "azure": {"client_id": "11111111-1111-1111-1111-111111111111", "container": "inventory-container", "resource_group": "my-resource-group", "storage_account": "mystorageaccount", "subscription_id": "33333333-3333-3333-3333-333333333333", "tenant_id": "22222222-2222-2222-2222-222222222222"}, "gcp": {"destination_bucket_name": "my-inventory-reports", "project_id": "my-gcp-project", "service_account_email": "reader@my-gcp-project.iam.gserviceaccount.com", "source_bucket_name": "my-monitored-bucket"}}, "id": "aws", "type": "cloud_provider"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/storage-management Scenario: Enable Storage Management for a bucket returns "OK" response + Given new "UpsertSyncConfig" request + And body with value {"data": {"attributes": {"aws": {"aws_account_id": "123456789012", "destination_bucket_name": "my-inventory-bucket", "destination_bucket_region": "us-east-1", "destination_prefix": "logs/"}, "azure": {"client_id": "11111111-1111-1111-1111-111111111111", "container": "inventory-container", "resource_group": "my-resource-group", "storage_account": "mystorageaccount", "subscription_id": "33333333-3333-3333-3333-333333333333", "tenant_id": "22222222-2222-2222-2222-222222222222"}, "gcp": {"destination_bucket_name": "my-inventory-reports", "project_id": "my-gcp-project", "service_account_email": "reader@my-gcp-project.iam.gserviceaccount.com", "source_bucket_name": "my-monitored-bucket"}}, "id": "aws", "type": "cloud_provider"}} When the request is sent Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 09d6acff28..0878797ffd 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1561,6 +1561,12 @@ "type": "idempotent" } }, + "DeleteSyncConfig": { + "tag": "Storage Management", + "undo": { + "type": "idempotent" + } + }, "GetCodeCoverageBranchSummary": { "tag": "Code Coverage", "undo": {