datadog_api_client 2.19.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +97 -44
- data/.generator/schemas/v2/openapi.yaml +704 -42
- data/.generator/src/generator/templates/api.j2 +5 -5
- data/CHANGELOG.md +20 -0
- data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
- data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/TriggerCITests.rb +1 -1
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -1
- data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
- data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
- data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
- data/examples/v2/api-management/GetOpenAPI.rb +11 -0
- data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
- data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
- data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
- data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
- data/lib/datadog_api_client/configuration.rb +4 -0
- data/lib/datadog_api_client/inflector.rb +22 -0
- data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
- data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
- data/lib/datadog_api_client/v1/models/log.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
- data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
- data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
- data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
- data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
- data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
- data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
- data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +1 -1
- data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +34 -3
- data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
|
@@ -160,6 +160,73 @@ module DatadogAPIClient::V2
|
|
|
160
160
|
return data, status_code, headers
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
+
# Create a suppression rule.
|
|
164
|
+
#
|
|
165
|
+
# @see #create_security_monitoring_suppression_with_http_info
|
|
166
|
+
def create_security_monitoring_suppression(body, opts = {})
|
|
167
|
+
data, _status_code, _headers = create_security_monitoring_suppression_with_http_info(body, opts)
|
|
168
|
+
data
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Create a suppression rule.
|
|
172
|
+
#
|
|
173
|
+
# Create a new suppression rule.
|
|
174
|
+
#
|
|
175
|
+
# @param body [SecurityMonitoringSuppressionCreateRequest] The definition of the new suppression rule.
|
|
176
|
+
# @param opts [Hash] the optional parameters
|
|
177
|
+
# @return [Array<(SecurityMonitoringSuppressionResponse, Integer, Hash)>] SecurityMonitoringSuppressionResponse data, response status code and response headers
|
|
178
|
+
def create_security_monitoring_suppression_with_http_info(body, opts = {})
|
|
179
|
+
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_security_monitoring_suppression ...'
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'body' is set
|
|
184
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.create_security_monitoring_suppression"
|
|
186
|
+
end
|
|
187
|
+
# resource path
|
|
188
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions'
|
|
189
|
+
|
|
190
|
+
# query parameters
|
|
191
|
+
query_params = opts[:query_params] || {}
|
|
192
|
+
|
|
193
|
+
# header parameters
|
|
194
|
+
header_params = opts[:header_params] || {}
|
|
195
|
+
# HTTP header 'Accept' (if needed)
|
|
196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
197
|
+
# HTTP header 'Content-Type'
|
|
198
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionResponse'
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:operation => :create_security_monitoring_suppression,
|
|
214
|
+
:header_params => header_params,
|
|
215
|
+
:query_params => query_params,
|
|
216
|
+
:form_params => form_params,
|
|
217
|
+
:body => post_body,
|
|
218
|
+
:auth_names => auth_names,
|
|
219
|
+
:return_type => return_type,
|
|
220
|
+
:api_version => "V2"
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#create_security_monitoring_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
|
|
163
230
|
# Delete a security filter.
|
|
164
231
|
#
|
|
165
232
|
# @see #delete_security_filter_with_http_info
|
|
@@ -290,6 +357,71 @@ module DatadogAPIClient::V2
|
|
|
290
357
|
return data, status_code, headers
|
|
291
358
|
end
|
|
292
359
|
|
|
360
|
+
# Delete a suppression rule.
|
|
361
|
+
#
|
|
362
|
+
# @see #delete_security_monitoring_suppression_with_http_info
|
|
363
|
+
def delete_security_monitoring_suppression(suppression_id, opts = {})
|
|
364
|
+
delete_security_monitoring_suppression_with_http_info(suppression_id, opts)
|
|
365
|
+
nil
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Delete a suppression rule.
|
|
369
|
+
#
|
|
370
|
+
# Delete a specific suppression rule.
|
|
371
|
+
#
|
|
372
|
+
# @param suppression_id [String] The ID of the suppression rule
|
|
373
|
+
# @param opts [Hash] the optional parameters
|
|
374
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
375
|
+
def delete_security_monitoring_suppression_with_http_info(suppression_id, opts = {})
|
|
376
|
+
|
|
377
|
+
if @api_client.config.debugging
|
|
378
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.delete_security_monitoring_suppression ...'
|
|
379
|
+
end
|
|
380
|
+
# verify the required parameter 'suppression_id' is set
|
|
381
|
+
if @api_client.config.client_side_validation && suppression_id.nil?
|
|
382
|
+
fail ArgumentError, "Missing the required parameter 'suppression_id' when calling SecurityMonitoringAPI.delete_security_monitoring_suppression"
|
|
383
|
+
end
|
|
384
|
+
# resource path
|
|
385
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions/{suppression_id}'.sub('{suppression_id}', CGI.escape(suppression_id.to_s).gsub('%2F', '/'))
|
|
386
|
+
|
|
387
|
+
# query parameters
|
|
388
|
+
query_params = opts[:query_params] || {}
|
|
389
|
+
|
|
390
|
+
# header parameters
|
|
391
|
+
header_params = opts[:header_params] || {}
|
|
392
|
+
# HTTP header 'Accept' (if needed)
|
|
393
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
394
|
+
|
|
395
|
+
# form parameters
|
|
396
|
+
form_params = opts[:form_params] || {}
|
|
397
|
+
|
|
398
|
+
# http body (model)
|
|
399
|
+
post_body = opts[:debug_body]
|
|
400
|
+
|
|
401
|
+
# return_type
|
|
402
|
+
return_type = opts[:debug_return_type]
|
|
403
|
+
|
|
404
|
+
# auth_names
|
|
405
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
406
|
+
|
|
407
|
+
new_options = opts.merge(
|
|
408
|
+
:operation => :delete_security_monitoring_suppression,
|
|
409
|
+
:header_params => header_params,
|
|
410
|
+
:query_params => query_params,
|
|
411
|
+
:form_params => form_params,
|
|
412
|
+
:body => post_body,
|
|
413
|
+
:auth_names => auth_names,
|
|
414
|
+
:return_type => return_type,
|
|
415
|
+
:api_version => "V2"
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
419
|
+
if @api_client.config.debugging
|
|
420
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#delete_security_monitoring_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
421
|
+
end
|
|
422
|
+
return data, status_code, headers
|
|
423
|
+
end
|
|
424
|
+
|
|
293
425
|
# Modify the triage assignee of a security signal.
|
|
294
426
|
#
|
|
295
427
|
# @see #edit_security_monitoring_signal_assignee_with_http_info
|
|
@@ -780,6 +912,71 @@ module DatadogAPIClient::V2
|
|
|
780
912
|
return data, status_code, headers
|
|
781
913
|
end
|
|
782
914
|
|
|
915
|
+
# Get a suppression rule.
|
|
916
|
+
#
|
|
917
|
+
# @see #get_security_monitoring_suppression_with_http_info
|
|
918
|
+
def get_security_monitoring_suppression(suppression_id, opts = {})
|
|
919
|
+
data, _status_code, _headers = get_security_monitoring_suppression_with_http_info(suppression_id, opts)
|
|
920
|
+
data
|
|
921
|
+
end
|
|
922
|
+
|
|
923
|
+
# Get a suppression rule.
|
|
924
|
+
#
|
|
925
|
+
# Get the details of a specific suppression rule.
|
|
926
|
+
#
|
|
927
|
+
# @param suppression_id [String] The ID of the suppression rule
|
|
928
|
+
# @param opts [Hash] the optional parameters
|
|
929
|
+
# @return [Array<(SecurityMonitoringSuppressionResponse, Integer, Hash)>] SecurityMonitoringSuppressionResponse data, response status code and response headers
|
|
930
|
+
def get_security_monitoring_suppression_with_http_info(suppression_id, opts = {})
|
|
931
|
+
|
|
932
|
+
if @api_client.config.debugging
|
|
933
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_security_monitoring_suppression ...'
|
|
934
|
+
end
|
|
935
|
+
# verify the required parameter 'suppression_id' is set
|
|
936
|
+
if @api_client.config.client_side_validation && suppression_id.nil?
|
|
937
|
+
fail ArgumentError, "Missing the required parameter 'suppression_id' when calling SecurityMonitoringAPI.get_security_monitoring_suppression"
|
|
938
|
+
end
|
|
939
|
+
# resource path
|
|
940
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions/{suppression_id}'.sub('{suppression_id}', CGI.escape(suppression_id.to_s).gsub('%2F', '/'))
|
|
941
|
+
|
|
942
|
+
# query parameters
|
|
943
|
+
query_params = opts[:query_params] || {}
|
|
944
|
+
|
|
945
|
+
# header parameters
|
|
946
|
+
header_params = opts[:header_params] || {}
|
|
947
|
+
# HTTP header 'Accept' (if needed)
|
|
948
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
949
|
+
|
|
950
|
+
# form parameters
|
|
951
|
+
form_params = opts[:form_params] || {}
|
|
952
|
+
|
|
953
|
+
# http body (model)
|
|
954
|
+
post_body = opts[:debug_body]
|
|
955
|
+
|
|
956
|
+
# return_type
|
|
957
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionResponse'
|
|
958
|
+
|
|
959
|
+
# auth_names
|
|
960
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
961
|
+
|
|
962
|
+
new_options = opts.merge(
|
|
963
|
+
:operation => :get_security_monitoring_suppression,
|
|
964
|
+
:header_params => header_params,
|
|
965
|
+
:query_params => query_params,
|
|
966
|
+
:form_params => form_params,
|
|
967
|
+
:body => post_body,
|
|
968
|
+
:auth_names => auth_names,
|
|
969
|
+
:return_type => return_type,
|
|
970
|
+
:api_version => "V2"
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
974
|
+
if @api_client.config.debugging
|
|
975
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_security_monitoring_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
976
|
+
end
|
|
977
|
+
return data, status_code, headers
|
|
978
|
+
end
|
|
979
|
+
|
|
783
980
|
# List findings.
|
|
784
981
|
#
|
|
785
982
|
# @see #list_findings_with_http_info
|
|
@@ -1164,6 +1361,66 @@ module DatadogAPIClient::V2
|
|
|
1164
1361
|
end
|
|
1165
1362
|
end
|
|
1166
1363
|
|
|
1364
|
+
# Get all suppression rules.
|
|
1365
|
+
#
|
|
1366
|
+
# @see #list_security_monitoring_suppressions_with_http_info
|
|
1367
|
+
def list_security_monitoring_suppressions(opts = {})
|
|
1368
|
+
data, _status_code, _headers = list_security_monitoring_suppressions_with_http_info(opts)
|
|
1369
|
+
data
|
|
1370
|
+
end
|
|
1371
|
+
|
|
1372
|
+
# Get all suppression rules.
|
|
1373
|
+
#
|
|
1374
|
+
# Get the list of all suppression rules.
|
|
1375
|
+
#
|
|
1376
|
+
# @param opts [Hash] the optional parameters
|
|
1377
|
+
# @return [Array<(SecurityMonitoringSuppressionsResponse, Integer, Hash)>] SecurityMonitoringSuppressionsResponse data, response status code and response headers
|
|
1378
|
+
def list_security_monitoring_suppressions_with_http_info(opts = {})
|
|
1379
|
+
|
|
1380
|
+
if @api_client.config.debugging
|
|
1381
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_suppressions ...'
|
|
1382
|
+
end
|
|
1383
|
+
# resource path
|
|
1384
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions'
|
|
1385
|
+
|
|
1386
|
+
# query parameters
|
|
1387
|
+
query_params = opts[:query_params] || {}
|
|
1388
|
+
|
|
1389
|
+
# header parameters
|
|
1390
|
+
header_params = opts[:header_params] || {}
|
|
1391
|
+
# HTTP header 'Accept' (if needed)
|
|
1392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1393
|
+
|
|
1394
|
+
# form parameters
|
|
1395
|
+
form_params = opts[:form_params] || {}
|
|
1396
|
+
|
|
1397
|
+
# http body (model)
|
|
1398
|
+
post_body = opts[:debug_body]
|
|
1399
|
+
|
|
1400
|
+
# return_type
|
|
1401
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionsResponse'
|
|
1402
|
+
|
|
1403
|
+
# auth_names
|
|
1404
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1405
|
+
|
|
1406
|
+
new_options = opts.merge(
|
|
1407
|
+
:operation => :list_security_monitoring_suppressions,
|
|
1408
|
+
:header_params => header_params,
|
|
1409
|
+
:query_params => query_params,
|
|
1410
|
+
:form_params => form_params,
|
|
1411
|
+
:body => post_body,
|
|
1412
|
+
:auth_names => auth_names,
|
|
1413
|
+
:return_type => return_type,
|
|
1414
|
+
:api_version => "V2"
|
|
1415
|
+
)
|
|
1416
|
+
|
|
1417
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
1418
|
+
if @api_client.config.debugging
|
|
1419
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_suppressions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1420
|
+
end
|
|
1421
|
+
return data, status_code, headers
|
|
1422
|
+
end
|
|
1423
|
+
|
|
1167
1424
|
# Mute or unmute a batch of findings.
|
|
1168
1425
|
#
|
|
1169
1426
|
# @see #mute_findings_with_http_info
|
|
@@ -1469,5 +1726,77 @@ module DatadogAPIClient::V2
|
|
|
1469
1726
|
end
|
|
1470
1727
|
return data, status_code, headers
|
|
1471
1728
|
end
|
|
1729
|
+
|
|
1730
|
+
# Update a suppression rule.
|
|
1731
|
+
#
|
|
1732
|
+
# @see #update_security_monitoring_suppression_with_http_info
|
|
1733
|
+
def update_security_monitoring_suppression(suppression_id, body, opts = {})
|
|
1734
|
+
data, _status_code, _headers = update_security_monitoring_suppression_with_http_info(suppression_id, body, opts)
|
|
1735
|
+
data
|
|
1736
|
+
end
|
|
1737
|
+
|
|
1738
|
+
# Update a suppression rule.
|
|
1739
|
+
#
|
|
1740
|
+
# Update a specific suppression rule.
|
|
1741
|
+
#
|
|
1742
|
+
# @param suppression_id [String] The ID of the suppression rule
|
|
1743
|
+
# @param body [SecurityMonitoringSuppressionUpdateRequest] New definition of the suppression rule. Supports partial updates.
|
|
1744
|
+
# @param opts [Hash] the optional parameters
|
|
1745
|
+
# @return [Array<(SecurityMonitoringSuppressionResponse, Integer, Hash)>] SecurityMonitoringSuppressionResponse data, response status code and response headers
|
|
1746
|
+
def update_security_monitoring_suppression_with_http_info(suppression_id, body, opts = {})
|
|
1747
|
+
|
|
1748
|
+
if @api_client.config.debugging
|
|
1749
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.update_security_monitoring_suppression ...'
|
|
1750
|
+
end
|
|
1751
|
+
# verify the required parameter 'suppression_id' is set
|
|
1752
|
+
if @api_client.config.client_side_validation && suppression_id.nil?
|
|
1753
|
+
fail ArgumentError, "Missing the required parameter 'suppression_id' when calling SecurityMonitoringAPI.update_security_monitoring_suppression"
|
|
1754
|
+
end
|
|
1755
|
+
# verify the required parameter 'body' is set
|
|
1756
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1757
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.update_security_monitoring_suppression"
|
|
1758
|
+
end
|
|
1759
|
+
# resource path
|
|
1760
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions/{suppression_id}'.sub('{suppression_id}', CGI.escape(suppression_id.to_s).gsub('%2F', '/'))
|
|
1761
|
+
|
|
1762
|
+
# query parameters
|
|
1763
|
+
query_params = opts[:query_params] || {}
|
|
1764
|
+
|
|
1765
|
+
# header parameters
|
|
1766
|
+
header_params = opts[:header_params] || {}
|
|
1767
|
+
# HTTP header 'Accept' (if needed)
|
|
1768
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1769
|
+
# HTTP header 'Content-Type'
|
|
1770
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1771
|
+
|
|
1772
|
+
# form parameters
|
|
1773
|
+
form_params = opts[:form_params] || {}
|
|
1774
|
+
|
|
1775
|
+
# http body (model)
|
|
1776
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1777
|
+
|
|
1778
|
+
# return_type
|
|
1779
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionResponse'
|
|
1780
|
+
|
|
1781
|
+
# auth_names
|
|
1782
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1783
|
+
|
|
1784
|
+
new_options = opts.merge(
|
|
1785
|
+
:operation => :update_security_monitoring_suppression,
|
|
1786
|
+
:header_params => header_params,
|
|
1787
|
+
:query_params => query_params,
|
|
1788
|
+
:form_params => form_params,
|
|
1789
|
+
:body => post_body,
|
|
1790
|
+
:auth_names => auth_names,
|
|
1791
|
+
:return_type => return_type,
|
|
1792
|
+
:api_version => "V2"
|
|
1793
|
+
)
|
|
1794
|
+
|
|
1795
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
1796
|
+
if @api_client.config.debugging
|
|
1797
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#update_security_monitoring_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1798
|
+
end
|
|
1799
|
+
return data, status_code, headers
|
|
1800
|
+
end
|
|
1472
1801
|
end
|
|
1473
1802
|
end
|
|
@@ -717,6 +717,28 @@ module DatadogAPIClient::V2
|
|
|
717
717
|
return data, status_code, headers
|
|
718
718
|
end
|
|
719
719
|
|
|
720
|
+
# Get team memberships.
|
|
721
|
+
#
|
|
722
|
+
# Provide a paginated version of {#get_team_memberships}, returning all items.
|
|
723
|
+
#
|
|
724
|
+
# To use it you need to use a block: get_team_memberships_with_pagination { |item| p item }
|
|
725
|
+
#
|
|
726
|
+
# @yield [UserTeam] Paginated items
|
|
727
|
+
def get_team_memberships_with_pagination(team_id, opts = {})
|
|
728
|
+
api_version = "V2"
|
|
729
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
730
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
731
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
|
732
|
+
while true do
|
|
733
|
+
response = get_team_memberships(team_id, opts)
|
|
734
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
735
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
736
|
+
break
|
|
737
|
+
end
|
|
738
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
|
739
|
+
end
|
|
740
|
+
end
|
|
741
|
+
|
|
720
742
|
# Get permission settings for a team.
|
|
721
743
|
#
|
|
722
744
|
# @see #get_team_permission_settings_with_http_info
|
|
@@ -642,7 +642,7 @@ module DatadogAPIClient::V2
|
|
|
642
642
|
return data, status_code, headers
|
|
643
643
|
end
|
|
644
644
|
|
|
645
|
-
# Get hourly usage for
|
|
645
|
+
# Get hourly usage for Lambda traced invocations.
|
|
646
646
|
#
|
|
647
647
|
# @see #get_usage_lambda_traced_invocations_with_http_info
|
|
648
648
|
def get_usage_lambda_traced_invocations(start_hr, opts = {})
|
|
@@ -650,9 +650,9 @@ module DatadogAPIClient::V2
|
|
|
650
650
|
data
|
|
651
651
|
end
|
|
652
652
|
|
|
653
|
-
# Get hourly usage for
|
|
653
|
+
# Get hourly usage for Lambda traced invocations.
|
|
654
654
|
#
|
|
655
|
-
# Get hourly usage for
|
|
655
|
+
# Get hourly usage for Lambda traced invocations.
|
|
656
656
|
# **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
|
|
657
657
|
#
|
|
658
658
|
# @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Response for `CreateOpenAPI` operation.
|
|
21
|
+
class CreateOpenAPIResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Data envelope for `CreateOpenAPIResponse`.
|
|
25
|
+
attr_accessor :data
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
# @!visibility private
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'data' => :'data'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'data' => :'CreateOpenAPIResponseData'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Initializes the object
|
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
if (!attributes.is_a?(Hash))
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponse` initialize method"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
|
+
end
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'data')
|
|
60
|
+
self.data = attributes[:'data']
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Checks equality by comparing each attribute.
|
|
65
|
+
# @param o [Object] Object to be compared
|
|
66
|
+
# @!visibility private
|
|
67
|
+
def ==(o)
|
|
68
|
+
return true if self.equal?(o)
|
|
69
|
+
self.class == o.class &&
|
|
70
|
+
data == o.data
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Calculates hash code according to all attributes.
|
|
74
|
+
# @return [Integer] Hash code
|
|
75
|
+
# @!visibility private
|
|
76
|
+
def hash
|
|
77
|
+
[data].hash
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Attributes for `CreateOpenAPI`.
|
|
21
|
+
class CreateOpenAPIResponseAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# List of endpoints which couldn't be parsed.
|
|
25
|
+
attr_accessor :failed_endpoints
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
# @!visibility private
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'failed_endpoints' => :'failed_endpoints'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'failed_endpoints' => :'Array<OpenAPIEndpoint>'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Initializes the object
|
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
if (!attributes.is_a?(Hash))
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponseAttributes` initialize method"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
|
+
end
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'failed_endpoints')
|
|
60
|
+
if (value = attributes[:'failed_endpoints']).is_a?(Array)
|
|
61
|
+
self.failed_endpoints = value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Checks equality by comparing each attribute.
|
|
67
|
+
# @param o [Object] Object to be compared
|
|
68
|
+
# @!visibility private
|
|
69
|
+
def ==(o)
|
|
70
|
+
return true if self.equal?(o)
|
|
71
|
+
self.class == o.class &&
|
|
72
|
+
failed_endpoints == o.failed_endpoints
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Calculates hash code according to all attributes.
|
|
76
|
+
# @return [Integer] Hash code
|
|
77
|
+
# @!visibility private
|
|
78
|
+
def hash
|
|
79
|
+
[failed_endpoints].hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Data envelope for `CreateOpenAPIResponse`.
|
|
21
|
+
class CreateOpenAPIResponseData
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Attributes for `CreateOpenAPI`.
|
|
25
|
+
attr_accessor :attributes
|
|
26
|
+
|
|
27
|
+
# API identifier.
|
|
28
|
+
attr_accessor :id
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
# @!visibility private
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'attributes' => :'attributes',
|
|
35
|
+
:'id' => :'id'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'attributes' => :'CreateOpenAPIResponseAttributes',
|
|
44
|
+
:'id' => :'UUID'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Initializes the object
|
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
50
|
+
# @!visibility private
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponseData` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'attributes')
|
|
65
|
+
self.attributes = attributes[:'attributes']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'id')
|
|
69
|
+
self.id = attributes[:'id']
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Checks equality by comparing each attribute.
|
|
74
|
+
# @param o [Object] Object to be compared
|
|
75
|
+
# @!visibility private
|
|
76
|
+
def ==(o)
|
|
77
|
+
return true if self.equal?(o)
|
|
78
|
+
self.class == o.class &&
|
|
79
|
+
attributes == o.attributes &&
|
|
80
|
+
id == o.id
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Calculates hash code according to all attributes.
|
|
84
|
+
# @return [Integer] Hash code
|
|
85
|
+
# @!visibility private
|
|
86
|
+
def hash
|
|
87
|
+
[attributes, id].hash
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|