Class: DatadogAPIClient::V2::GovernanceConsoleAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::GovernanceConsoleAPI
- Defined in:
- lib/datadog_api_client/v2/api/governance_console_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_governance_config(opts = {}) ⇒ Object
Get the Governance Console configuration.
-
#get_governance_config_with_http_info(opts = {}) ⇒ Array<(GovernanceConfigResponse, Integer, Hash)>
Get the Governance Console configuration.
-
#get_governance_control(detection_type, opts = {}) ⇒ Object
Get a control.
-
#get_governance_control_notification_settings(detection_type, opts = {}) ⇒ Object
Get control notification settings.
-
#get_governance_control_notification_settings_with_http_info(detection_type, opts = {}) ⇒ Array<(ControlNotificationSettingsResponse, Integer, Hash)>
Get control notification settings.
-
#get_governance_control_with_http_info(detection_type, opts = {}) ⇒ Array<(GovernanceControlResponse, Integer, Hash)>
Get a control.
-
#get_governance_detection(detection_id, opts = {}) ⇒ Object
Get a detection.
-
#get_governance_detection_with_http_info(detection_id, opts = {}) ⇒ Array<(GovernanceControlDetectionResponse, Integer, Hash)>
Get a detection.
-
#get_governance_notification_settings(opts = {}) ⇒ Object
Get notification settings.
-
#get_governance_notification_settings_with_http_info(opts = {}) ⇒ Array<(GovernanceNotificationSettingsResponse, Integer, Hash)>
Get notification settings.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ GovernanceConsoleAPI
constructor
A new instance of GovernanceConsoleAPI.
-
#list_governance_control_detections(detection_type, opts = {}) ⇒ Object
List control detections.
-
#list_governance_control_detections_with_http_info(detection_type, opts = {}) ⇒ Array<(GovernanceControlDetectionsResponse, Integer, Hash)>
List control detections.
-
#list_governance_controls(opts = {}) ⇒ Object
List controls.
-
#list_governance_controls_with_http_info(opts = {}) ⇒ Array<(GovernanceControlsResponse, Integer, Hash)>
List controls.
-
#list_governance_insights(opts = {}) ⇒ Object
List insights.
-
#list_governance_insights_with_http_info(opts = {}) ⇒ Array<(GovernanceInsightsResponse, Integer, Hash)>
List insights.
-
#mitigate_governance_detections(body, opts = {}) ⇒ Object
Mitigate detections.
-
#mitigate_governance_detections_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mitigate detections.
-
#update_governance_control(detection_type, body, opts = {}) ⇒ Object
Update a control.
-
#update_governance_control_notification_settings(detection_type, body, opts = {}) ⇒ Object
Update control notification settings.
-
#update_governance_control_notification_settings_with_http_info(detection_type, body, opts = {}) ⇒ Array<(ControlNotificationSettingsResponse, Integer, Hash)>
Update control notification settings.
-
#update_governance_control_with_http_info(detection_type, body, opts = {}) ⇒ Array<(GovernanceControlResponse, Integer, Hash)>
Update a control.
-
#update_governance_detection(detection_id, body, opts = {}) ⇒ Object
Update a detection.
-
#update_governance_detection_with_http_info(detection_id, body, opts = {}) ⇒ Array<(GovernanceControlDetectionResponse, Integer, Hash)>
Update a detection.
-
#update_governance_notification_settings(body, opts = {}) ⇒ Object
Update notification settings.
-
#update_governance_notification_settings_with_http_info(body, opts = {}) ⇒ Array<(GovernanceNotificationSettingsResponse, Integer, Hash)>
Update notification settings.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ GovernanceConsoleAPI
Returns a new instance of GovernanceConsoleAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#get_governance_config(opts = {}) ⇒ Object
Get the Governance Console configuration.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 29 def get_governance_config(opts = {}) data, _status_code, _headers = get_governance_config_with_http_info(opts) data end |
#get_governance_config_with_http_info(opts = {}) ⇒ Array<(GovernanceConfigResponse, Integer, Hash)>
Get the Governance Console configuration.
Retrieve the Governance Console configuration for the organization, including whether the Console is enabled, whether assignment notifications are enabled, and whether usage attribution is configured.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 42 def get_governance_config_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_governance_config".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_governance_config") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_governance_config")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.get_governance_config ...' end # resource path local_var_path = '/api/v2/governance/config' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_governance_config, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#get_governance_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_governance_control(detection_type, opts = {}) ⇒ Object
Get a control.
97 98 99 100 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 97 def get_governance_control(detection_type, opts = {}) data, _status_code, _headers = get_governance_control_with_http_info(detection_type, opts) data end |
#get_governance_control_notification_settings(detection_type, opts = {}) ⇒ Object
Get control notification settings.
169 170 171 172 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 169 def get_governance_control_notification_settings(detection_type, opts = {}) data, _status_code, _headers = get_governance_control_notification_settings_with_http_info(detection_type, opts) data end |
#get_governance_control_notification_settings_with_http_info(detection_type, opts = {}) ⇒ Array<(ControlNotificationSettingsResponse, Integer, Hash)>
Get control notification settings.
Retrieve the notification settings for the governance control with the given detection type, including, for each supported event type, whether notifications are enabled and which destinations receive them.
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 183 def get_governance_control_notification_settings_with_http_info(detection_type, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_governance_control_notification_settings".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_governance_control_notification_settings") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_governance_control_notification_settings")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.get_governance_control_notification_settings ...' end # verify the required parameter 'detection_type' is set if @api_client.config.client_side_validation && detection_type.nil? fail ArgumentError, "Missing the required parameter 'detection_type' when calling GovernanceConsoleAPI.get_governance_control_notification_settings" end # resource path local_var_path = '/api/v2/governance/control/{detection_type}/notification_settings'.sub('{detection_type}', CGI.escape(detection_type.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ControlNotificationSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_governance_control_notification_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#get_governance_control_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_governance_control_with_http_info(detection_type, opts = {}) ⇒ Array<(GovernanceControlResponse, Integer, Hash)>
Get a control.
Retrieve a single governance control by its detection type, including the organization's current detection, notification, and mitigation configuration and detection counts.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 110 def get_governance_control_with_http_info(detection_type, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_governance_control".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_governance_control") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_governance_control")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.get_governance_control ...' end # verify the required parameter 'detection_type' is set if @api_client.config.client_side_validation && detection_type.nil? fail ArgumentError, "Missing the required parameter 'detection_type' when calling GovernanceConsoleAPI.get_governance_control" end # resource path local_var_path = '/api/v2/governance/control/{detection_type}'.sub('{detection_type}', CGI.escape(detection_type.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceControlResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_governance_control, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#get_governance_control\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_governance_detection(detection_id, opts = {}) ⇒ Object
Get a detection.
242 243 244 245 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 242 def get_governance_detection(detection_id, opts = {}) data, _status_code, _headers = get_governance_detection_with_http_info(detection_id, opts) data end |
#get_governance_detection_with_http_info(detection_id, opts = {}) ⇒ Array<(GovernanceControlDetectionResponse, Integer, Hash)>
Get a detection.
Retrieve a single governance detection by its unique identifier.
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 254 def get_governance_detection_with_http_info(detection_id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_governance_detection".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_governance_detection") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_governance_detection")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.get_governance_detection ...' end # verify the required parameter 'detection_id' is set if @api_client.config.client_side_validation && detection_id.nil? fail ArgumentError, "Missing the required parameter 'detection_id' when calling GovernanceConsoleAPI.get_governance_detection" end # resource path local_var_path = '/api/v2/governance/detections/{detection_id}'.sub('{detection_id}', CGI.escape(detection_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceControlDetectionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_governance_detection, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#get_governance_detection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_governance_notification_settings(opts = {}) ⇒ Object
Get notification settings.
313 314 315 316 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 313 def get_governance_notification_settings(opts = {}) data, _status_code, _headers = get_governance_notification_settings_with_http_info(opts) data end |
#get_governance_notification_settings_with_http_info(opts = {}) ⇒ Array<(GovernanceNotificationSettingsResponse, Integer, Hash)>
Get notification settings.
Retrieve the organization-wide governance notification settings, including whether users are notified when detections are assigned to them.
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 325 def get_governance_notification_settings_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_governance_notification_settings".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_governance_notification_settings") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_governance_notification_settings")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.get_governance_notification_settings ...' end # resource path local_var_path = '/api/v2/governance/notification_settings' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceNotificationSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_governance_notification_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#get_governance_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_governance_control_detections(detection_type, opts = {}) ⇒ Object
List control detections.
380 381 382 383 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 380 def list_governance_control_detections(detection_type, opts = {}) data, _status_code, _headers = list_governance_control_detections_with_http_info(detection_type, opts) data end |
#list_governance_control_detections_with_http_info(detection_type, opts = {}) ⇒ Array<(GovernanceControlDetectionsResponse, Integer, Hash)>
List control detections.
Retrieve the detections produced by the governance control with the given detection type. Results can be filtered by state and free-text query, sorted, and paginated.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 398 def list_governance_control_detections_with_http_info(detection_type, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_governance_control_detections".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_governance_control_detections") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_governance_control_detections")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.list_governance_control_detections ...' end # verify the required parameter 'detection_type' is set if @api_client.config.client_side_validation && detection_type.nil? fail ArgumentError, "Missing the required parameter 'detection_type' when calling GovernanceConsoleAPI.list_governance_control_detections" end # resource path local_var_path = '/api/v2/governance/control/{detection_type}/detections'.sub('{detection_type}', CGI.escape(detection_type.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'filter[state]'] = opts[:'filter_state'] if !opts[:'filter_state'].nil? query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceControlDetectionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_governance_control_detections, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#list_governance_control_detections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_governance_controls(opts = {}) ⇒ Object
List controls.
462 463 464 465 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 462 def list_governance_controls(opts = {}) data, _status_code, _headers = list_governance_controls_with_http_info(opts) data end |
#list_governance_controls_with_http_info(opts = {}) ⇒ Array<(GovernanceControlsResponse, Integer, Hash)>
List controls.
Retrieve the list of governance controls configured for the organization. Each control pairs a detection definition with the organization's current detection, notification, and mitigation configuration, along with counts of active and mitigated detections.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 475 def list_governance_controls_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_governance_controls".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_governance_controls") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_governance_controls")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.list_governance_controls ...' end # resource path local_var_path = '/api/v2/governance/control' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceControlsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_governance_controls, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#list_governance_controls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_governance_insights(opts = {}) ⇒ Object
List insights.
530 531 532 533 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 530 def list_governance_insights(opts = {}) data, _status_code, _headers = list_governance_insights_with_http_info(opts) data end |
#list_governance_insights_with_http_info(opts = {}) ⇒ Array<(GovernanceInsightsResponse, Integer, Hash)>
List insights.
Retrieve the list of governance insights available to the organization. Each insight reports the query used to compute it, so that the value can be computed client-side. Insights can be filtered by product.
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 544 def list_governance_insights_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_governance_insights".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_governance_insights") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_governance_insights")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.list_governance_insights ...' end # resource path local_var_path = '/api/v2/governance/insights' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[product]'] = @api_client.build_collection_param(opts[:'filter_product'], :multi) if !opts[:'filter_product'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GovernanceInsightsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_governance_insights, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) [:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#list_governance_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mitigate_governance_detections(body, opts = {}) ⇒ Object
Mitigate detections.
601 602 603 604 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 601 def mitigate_governance_detections(body, opts = {}) mitigate_governance_detections_with_http_info(body, opts) nil end |
#mitigate_governance_detections_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mitigate detections.
Apply a mitigation to a set of governance detections of a given detection type. When the mitigation type is omitted, the control's configured mitigation is used. The request is accepted for asynchronous processing.
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 615 def mitigate_governance_detections_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.mitigate_governance_detections".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.mitigate_governance_detections") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.mitigate_governance_detections")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.mitigate_governance_detections ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling GovernanceConsoleAPI.mitigate_governance_detections" end # resource path local_var_path = '/api/v2/governance/detections/mitigate' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :mitigate_governance_detections, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#mitigate_governance_detections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_governance_control(detection_type, body, opts = {}) ⇒ Object
Update a control.
676 677 678 679 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 676 def update_governance_control(detection_type, body, opts = {}) data, _status_code, _headers = update_governance_control_with_http_info(detection_type, body, opts) data end |
#update_governance_control_notification_settings(detection_type, body, opts = {}) ⇒ Object
Update control notification settings.
756 757 758 759 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 756 def update_governance_control_notification_settings(detection_type, body, opts = {}) data, _status_code, _headers = update_governance_control_notification_settings_with_http_info(detection_type, body, opts) data end |
#update_governance_control_notification_settings_with_http_info(detection_type, body, opts = {}) ⇒ Array<(ControlNotificationSettingsResponse, Integer, Hash)>
Update control notification settings.
Replace the notification settings for the governance control with the given detection type, setting, for each supported event type, whether notifications are enabled and which destinations receive them.
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 771 def update_governance_control_notification_settings_with_http_info(detection_type, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_governance_control_notification_settings".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_governance_control_notification_settings") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_governance_control_notification_settings")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.update_governance_control_notification_settings ...' end # verify the required parameter 'detection_type' is set if @api_client.config.client_side_validation && detection_type.nil? fail ArgumentError, "Missing the required parameter 'detection_type' when calling GovernanceConsoleAPI.update_governance_control_notification_settings" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling GovernanceConsoleAPI.update_governance_control_notification_settings" end # resource path local_var_path = '/api/v2/governance/control/{detection_type}/notification_settings'.sub('{detection_type}', CGI.escape(detection_type.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ControlNotificationSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_governance_control_notification_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#update_governance_control_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_governance_control_with_http_info(detection_type, body, opts = {}) ⇒ Array<(GovernanceControlResponse, Integer, Hash)>
Update a control.
Update the detection, notification, and mitigation configuration of a governance control. Only the attributes present in the request are modified. Changing the mitigation type or its parameters may require additional permissions.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 691 def update_governance_control_with_http_info(detection_type, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_governance_control".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_governance_control") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_governance_control")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.update_governance_control ...' end # verify the required parameter 'detection_type' is set if @api_client.config.client_side_validation && detection_type.nil? fail ArgumentError, "Missing the required parameter 'detection_type' when calling GovernanceConsoleAPI.update_governance_control" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling GovernanceConsoleAPI.update_governance_control" end # resource path local_var_path = '/api/v2/governance/control/{detection_type}'.sub('{detection_type}', CGI.escape(detection_type.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'GovernanceControlResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_governance_control, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#update_governance_control\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_governance_detection(detection_id, body, opts = {}) ⇒ Object
Update a detection.
836 837 838 839 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 836 def update_governance_detection(detection_id, body, opts = {}) data, _status_code, _headers = update_governance_detection_with_http_info(detection_id, body, opts) data end |
#update_governance_detection_with_http_info(detection_id, body, opts = {}) ⇒ Array<(GovernanceControlDetectionResponse, Integer, Hash)>
Update a detection.
Update a governance detection by its unique identifier. Only the attributes present in the request are modified, allowing a detection to be acknowledged as an exception, reopened, reassigned, or deferred for mitigation.
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 851 def update_governance_detection_with_http_info(detection_id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_governance_detection".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_governance_detection") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_governance_detection")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.update_governance_detection ...' end # verify the required parameter 'detection_id' is set if @api_client.config.client_side_validation && detection_id.nil? fail ArgumentError, "Missing the required parameter 'detection_id' when calling GovernanceConsoleAPI.update_governance_detection" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling GovernanceConsoleAPI.update_governance_detection" end # resource path local_var_path = '/api/v2/governance/detections/{detection_id}'.sub('{detection_id}', CGI.escape(detection_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'GovernanceControlDetectionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_governance_detection, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#update_governance_detection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_governance_notification_settings(body, opts = {}) ⇒ Object
Update notification settings.
916 917 918 919 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 916 def update_governance_notification_settings(body, opts = {}) data, _status_code, _headers = update_governance_notification_settings_with_http_info(body, opts) data end |
#update_governance_notification_settings_with_http_info(body, opts = {}) ⇒ Array<(GovernanceNotificationSettingsResponse, Integer, Hash)>
Update notification settings.
Update the organization-wide governance notification settings. Only the attributes present in the request are modified.
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
# File 'lib/datadog_api_client/v2/api/governance_console_api.rb', line 929 def update_governance_notification_settings_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_governance_notification_settings".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_governance_notification_settings") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_governance_notification_settings")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GovernanceConsoleAPI.update_governance_notification_settings ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling GovernanceConsoleAPI.update_governance_notification_settings" end # resource path local_var_path = '/api/v2/governance/notification_settings' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'GovernanceNotificationSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_governance_notification_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: GovernanceConsoleAPI#update_governance_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |