Skip to content

Commit 73c418f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8cd544c of spec repo (#3401)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 982c187 commit 73c418f

11 files changed

Lines changed: 525 additions & 3 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,14 @@ components:
296296
schema:
297297
format: int64
298298
type: integer
299+
CloudInventorySyncConfigID:
300+
description: Unique identifier of the Storage Management configuration.
301+
example: abc123
302+
in: path
303+
name: id
304+
required: true
305+
schema:
306+
type: string
299307
CloudWorkloadSecurityAgentRuleID:
300308
description: "The ID of the Agent rule"
301309
example: 3b5-v82-ns6
@@ -55624,6 +55632,7 @@ components:
5562455632
- $ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestination"
5562555633
- $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination"
5562655634
- $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination"
55635+
- $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination"
5562755636
ObservabilityPipelineConfigPipelineType:
5562855637
default: logs
5562955638
description: The type of data being ingested. Defaults to `logs` if not specified.
@@ -59745,6 +59754,81 @@ components:
5974559754
type: string
5974659755
x-enum-varnames:
5974759756
- SPLUNK_HEC
59757+
ObservabilityPipelineSplunkHecMetricsDestination:
59758+
description: |-
59759+
The `splunk_hec_metrics` destination forwards metrics to Splunk using the HTTP Event Collector (HEC).
59760+
59761+
**Supported pipeline types:** metrics
59762+
properties:
59763+
buffer:
59764+
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
59765+
compression:
59766+
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationCompression"
59767+
default_namespace:
59768+
description: Optional default namespace for metrics sent to Splunk HEC.
59769+
example: "custom_namespace"
59770+
type: string
59771+
endpoint_url_key:
59772+
description: Name of the environment variable or secret that holds the Splunk HEC endpoint URL.
59773+
example: SPLUNK_HEC_ENDPOINT_URL
59774+
type: string
59775+
id:
59776+
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).
59777+
example: splunk-hec-metrics-destination
59778+
type: string
59779+
index:
59780+
description: Optional name of the Splunk index where metrics are written.
59781+
example: "metrics"
59782+
type: string
59783+
inputs:
59784+
description: A list of component IDs whose output is used as the `input` for this component.
59785+
example: ["metrics-filter-processor"]
59786+
items:
59787+
description: The ID of a component whose output is used as input for this destination.
59788+
type: string
59789+
type: array
59790+
source:
59791+
description: The Splunk source field value for metric events.
59792+
example: "observability_pipelines"
59793+
type: string
59794+
sourcetype:
59795+
description: The Splunk sourcetype to assign to metric events.
59796+
example: "custom_sourcetype"
59797+
type: string
59798+
tls:
59799+
$ref: "#/components/schemas/ObservabilityPipelineTls"
59800+
token_key:
59801+
description: Name of the environment variable or secret that holds the Splunk HEC token.
59802+
example: SPLUNK_HEC_TOKEN
59803+
type: string
59804+
type:
59805+
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationType"
59806+
required:
59807+
- id
59808+
- type
59809+
- inputs
59810+
type: object
59811+
x-pipeline-types: [metrics]
59812+
ObservabilityPipelineSplunkHecMetricsDestinationCompression:
59813+
default: none
59814+
description: Compression algorithm applied when sending metrics to Splunk HEC.
59815+
enum:
59816+
- none
59817+
- gzip
59818+
example: none
59819+
type: string
59820+
x-enum-varnames:
59821+
- NONE
59822+
- GZIP
59823+
ObservabilityPipelineSplunkHecMetricsDestinationType:
59824+
default: splunk_hec_metrics
59825+
description: The destination type. Always `splunk_hec_metrics`.
59826+
enum:
59827+
- splunk_hec_metrics
59828+
example: splunk_hec_metrics
59829+
type: string
59830+
x-enum-varnames:
59831+
- SPLUNK_HEC_METRICS
5974859832
ObservabilityPipelineSplunkHecSource:
5974959833
description: |-
5975059834
The `splunk_hec` source implements the Splunk HTTP Event Collector (HEC) API.
@@ -107705,6 +107789,33 @@ paths:
107705107789
operator: OR
107706107790
permissions:
107707107791
- aws_configurations_manage
107792+
/api/v2/cloudinventoryservice/syncconfigs/{id}:
107793+
delete:
107794+
description: |-
107795+
Delete a Storage Management configuration by its unique identifier. Deleting a configuration stops inventory file synchronization for the associated cloud account.
107796+
operationId: DeleteSyncConfig
107797+
parameters:
107798+
- $ref: "#/components/parameters/CloudInventorySyncConfigID"
107799+
responses:
107800+
"204":
107801+
description: No Content
107802+
"403":
107803+
$ref: "#/components/responses/ForbiddenResponse"
107804+
"404":
107805+
content:
107806+
application/json:
107807+
schema:
107808+
$ref: "#/components/schemas/JSONAPIErrorResponse"
107809+
description: Not Found
107810+
"429":
107811+
$ref: "#/components/responses/TooManyRequestsResponse"
107812+
summary: Delete a Storage Management configuration
107813+
tags:
107814+
- Storage Management
107815+
"x-permission":
107816+
operator: OR
107817+
permissions:
107818+
- aws_configurations_manage
107708107819
/api/v2/code-coverage/branch/summary:
107709107820
post:
107710107821
description: |-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a Storage Management configuration returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::StorageManagementAPI.new
5+
api_instance.delete_sync_config("id")

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,9 @@
24232423
"v2.UpsertSyncConfig" => {
24242424
"body" => "UpsertCloudInventorySyncConfigRequest",
24252425
},
2426+
"v2.DeleteSyncConfig" => {
2427+
"id" => "String",
2428+
},
24262429
"v2.GetCodeCoverageBranchSummary" => {
24272430
"body" => "BranchCoverageSummaryRequest",
24282431
},

features/v2/storage_management.feature

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,31 @@ Feature: Storage Management
88
Given a valid "apiKeyAuth" key in the system
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "StorageManagement" API
11-
And new "UpsertSyncConfig" request
12-
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"}}
11+
12+
@generated @skip @team:DataDog/storage-management
13+
Scenario: Delete a Storage Management configuration returns "No Content" response
14+
Given new "DeleteSyncConfig" request
15+
And request contains "id" parameter from "REPLACE.ME"
16+
When the request is sent
17+
Then the response status is 204 No Content
18+
19+
@generated @skip @team:DataDog/storage-management
20+
Scenario: Delete a Storage Management configuration returns "Not Found" response
21+
Given new "DeleteSyncConfig" request
22+
And request contains "id" parameter from "REPLACE.ME"
23+
When the request is sent
24+
Then the response status is 404 Not Found
1325

1426
@generated @skip @team:DataDog/storage-management
1527
Scenario: Enable Storage Management for a bucket returns "Bad Request" response
28+
Given new "UpsertSyncConfig" request
29+
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"}}
1630
When the request is sent
1731
Then the response status is 400 Bad Request
1832

1933
@generated @skip @team:DataDog/storage-management
2034
Scenario: Enable Storage Management for a bucket returns "OK" response
35+
Given new "UpsertSyncConfig" request
36+
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"}}
2137
When the request is sent
2238
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,12 @@
15611561
"type": "idempotent"
15621562
}
15631563
},
1564+
"DeleteSyncConfig": {
1565+
"tag": "Storage Management",
1566+
"undo": {
1567+
"type": "idempotent"
1568+
}
1569+
},
15641570
"GetCodeCoverageBranchSummary": {
15651571
"tag": "Code Coverage",
15661572
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4732,6 +4732,9 @@ def overrides
47324732
"v2.observability_pipeline_splunk_hec_destination_encoding" => "ObservabilityPipelineSplunkHecDestinationEncoding",
47334733
"v2.observability_pipeline_splunk_hec_destination_token_strategy" => "ObservabilityPipelineSplunkHecDestinationTokenStrategy",
47344734
"v2.observability_pipeline_splunk_hec_destination_type" => "ObservabilityPipelineSplunkHecDestinationType",
4735+
"v2.observability_pipeline_splunk_hec_metrics_destination" => "ObservabilityPipelineSplunkHecMetricsDestination",
4736+
"v2.observability_pipeline_splunk_hec_metrics_destination_compression" => "ObservabilityPipelineSplunkHecMetricsDestinationCompression",
4737+
"v2.observability_pipeline_splunk_hec_metrics_destination_type" => "ObservabilityPipelineSplunkHecMetricsDestinationType",
47354738
"v2.observability_pipeline_splunk_hec_source" => "ObservabilityPipelineSplunkHecSource",
47364739
"v2.observability_pipeline_splunk_hec_source_type" => "ObservabilityPipelineSplunkHecSourceType",
47374740
"v2.observability_pipeline_splunk_hec_source_valid_token" => "ObservabilityPipelineSplunkHecSourceValidToken",

lib/datadog_api_client/v2/api/storage_management_api.rb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,71 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
2323
@api_client = api_client
2424
end
2525

26+
# Delete a Storage Management configuration.
27+
#
28+
# @see #delete_sync_config_with_http_info
29+
def delete_sync_config(id, opts = {})
30+
delete_sync_config_with_http_info(id, opts)
31+
nil
32+
end
33+
34+
# Delete a Storage Management configuration.
35+
#
36+
# Delete a Storage Management configuration by its unique identifier. Deleting a configuration stops inventory file synchronization for the associated cloud account.
37+
#
38+
# @param id [String] Unique identifier of the Storage Management configuration.
39+
# @param opts [Hash] the optional parameters
40+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41+
def delete_sync_config_with_http_info(id, opts = {})
42+
43+
if @api_client.config.debugging
44+
@api_client.config.logger.debug 'Calling API: StorageManagementAPI.delete_sync_config ...'
45+
end
46+
# verify the required parameter 'id' is set
47+
if @api_client.config.client_side_validation && id.nil?
48+
fail ArgumentError, "Missing the required parameter 'id' when calling StorageManagementAPI.delete_sync_config"
49+
end
50+
# resource path
51+
local_var_path = '/api/v2/cloudinventoryservice/syncconfigs/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
52+
53+
# query parameters
54+
query_params = opts[:query_params] || {}
55+
56+
# header parameters
57+
header_params = opts[:header_params] || {}
58+
# HTTP header 'Accept' (if needed)
59+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60+
61+
# form parameters
62+
form_params = opts[:form_params] || {}
63+
64+
# http body (model)
65+
post_body = opts[:debug_body]
66+
67+
# return_type
68+
return_type = opts[:debug_return_type]
69+
70+
# auth_names
71+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
72+
73+
new_options = opts.merge(
74+
:operation => :delete_sync_config,
75+
:header_params => header_params,
76+
:query_params => query_params,
77+
:form_params => form_params,
78+
:body => post_body,
79+
:auth_names => auth_names,
80+
:return_type => return_type,
81+
:api_version => "V2"
82+
)
83+
84+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
85+
if @api_client.config.debugging
86+
@api_client.config.logger.debug "API called: StorageManagementAPI#delete_sync_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87+
end
88+
return data, status_code, headers
89+
end
90+
2691
# Enable Storage Management for a bucket.
2792
#
2893
# @see #upsert_sync_config_with_http_info

lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def openapi_one_of
5050
:'ObservabilityPipelineSumoLogicDestination',
5151
:'ObservabilityPipelineSyslogNgDestination',
5252
:'ObservabilityPipelineDatabricksZerobusDestination',
53-
:'ObservabilityPipelineDatadogMetricsDestination'
53+
:'ObservabilityPipelineDatadogMetricsDestination',
54+
:'ObservabilityPipelineSplunkHecMetricsDestination'
5455
]
5556
end
5657
# Builds the object

0 commit comments

Comments
 (0)