Class: DatadogAPIClient::V2::BitsSecurityAnalystAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::BitsSecurityAnalystAPI
- Defined in:
- lib/datadog_api_client/v2/api/bits_security_analyst_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_security_agent_outreach_policy_domain(body, opts = {}) ⇒ Object
Add an allowed outreach domain.
-
#add_security_agent_outreach_policy_domain_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Add an allowed outreach domain.
-
#count_security_agent_investigations(field, opts = {}) ⇒ Object
Count Bits Security Analyst investigations.
-
#count_security_agent_investigations_with_http_info(field, opts = {}) ⇒ Array<(SecurityAgentInvestigationCountsResponse, Integer, Hash)>
Count Bits Security Analyst investigations.
-
#get_security_agent_investigation(investigation_id, opts = {}) ⇒ Object
Get a Bits Security Analyst investigation.
-
#get_security_agent_investigation_with_http_info(investigation_id, opts = {}) ⇒ Array<(SecurityAgentInvestigationResponse, Integer, Hash)>
Get a Bits Security Analyst investigation.
-
#get_security_agent_outreach_policy(opts = {}) ⇒ Object
Get the user outreach policy.
-
#get_security_agent_outreach_policy_with_http_info(opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Get the user outreach policy.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ BitsSecurityAnalystAPI
constructor
A new instance of BitsSecurityAnalystAPI.
-
#list_security_agent_investigations(opts = {}) ⇒ Object
List Bits Security Analyst investigations.
-
#list_security_agent_investigations_with_http_info(opts = {}) ⇒ Array<(SecurityAgentInvestigationsListResponse, Integer, Hash)>
List Bits Security Analyst investigations.
-
#remove_security_agent_outreach_policy_domain(domain, opts = {}) ⇒ Object
Remove an allowed outreach domain.
-
#remove_security_agent_outreach_policy_domain_with_http_info(domain, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Remove an allowed outreach domain.
-
#update_security_agent_outreach_mode(body, opts = {}) ⇒ Object
Update the outreach mode.
-
#update_security_agent_outreach_mode_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachModeResponse, Integer, Hash)>
Update the outreach mode.
-
#update_security_agent_outreach_policy_rules(body, opts = {}) ⇒ Object
Update outreach policy rules.
-
#update_security_agent_outreach_policy_rules_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Update outreach policy rules.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ BitsSecurityAnalystAPI
Returns a new instance of BitsSecurityAnalystAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_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/bits_security_analyst_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#add_security_agent_outreach_policy_domain(body, opts = {}) ⇒ Object
Add an allowed outreach domain.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 29 def add_security_agent_outreach_policy_domain(body, opts = {}) data, _status_code, _headers = add_security_agent_outreach_policy_domain_with_http_info(body, opts) data end |
#add_security_agent_outreach_policy_domain_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Add an allowed outreach domain.
Add one allowed email domain. User outreach is only sent to users whose email domain is allowed. The
domain must be a fully qualified domain name, like example.com; it is lowercased before being stored.
An organization can allow at most 20 domains.
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 93 94 95 96 97 98 99 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 43 def add_security_agent_outreach_policy_domain_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.add_security_agent_outreach_policy_domain".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_security_agent_outreach_policy_domain") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_security_agent_outreach_policy_domain")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.add_security_agent_outreach_policy_domain ...' 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 BitsSecurityAnalystAPI.add_security_agent_outreach_policy_domain" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains' # 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] || 'SecurityAgentOutreachPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :add_security_agent_outreach_policy_domain, :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: BitsSecurityAnalystAPI#add_security_agent_outreach_policy_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#count_security_agent_investigations(field, opts = {}) ⇒ Object
Count Bits Security Analyst investigations.
104 105 106 107 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 104 def count_security_agent_investigations(field, opts = {}) data, _status_code, _headers = count_security_agent_investigations_with_http_info(field, opts) data end |
#count_security_agent_investigations_with_http_info(field, opts = {}) ⇒ Array<(SecurityAgentInvestigationCountsResponse, Integer, Hash)>
Count Bits Security Analyst investigations.
Count completed Bits Security Analyst investigations by the values of one field. Buckets are sorted by
ascending count. With field=entity or field=signal_source, an investigation counts in the bucket of
each of its entities or sources.
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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 128 def count_security_agent_investigations_with_http_info(field, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.count_security_agent_investigations".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.count_security_agent_investigations") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.count_security_agent_investigations")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.count_security_agent_investigations ...' end # verify the required parameter 'field' is set if @api_client.config.client_side_validation && field.nil? fail ArgumentError, "Missing the required parameter 'field' when calling BitsSecurityAnalystAPI.count_security_agent_investigations" end # verify enum value allowable_values = ['verdict', 'rule_type', 'signal_source', 'entity'] if @api_client.config.client_side_validation && !allowable_values.include?(field) fail ArgumentError, "invalid value for \"field\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/investigations/count' # query parameters query_params = opts[:query_params] || {} query_params[:'field'] = field query_params[:'filter[title]'] = opts[:'filter_title'] if !opts[:'filter_title'].nil? query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? query_params[:'filter[verdict]'] = opts[:'filter_verdict'] if !opts[:'filter_verdict'].nil? query_params[:'filter[rule_id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil? query_params[:'filter[rule_type]'] = opts[:'filter_rule_type'] if !opts[:'filter_rule_type'].nil? query_params[:'filter[signal_severity]'] = opts[:'filter_signal_severity'] if !opts[:'filter_signal_severity'].nil? query_params[:'filter[signal_source]'] = opts[:'filter_signal_source'] if !opts[:'filter_signal_source'].nil? query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil? query_params[:'filter[entity]'] = opts[:'filter_entity'] if !opts[:'filter_entity'].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] || 'SecurityAgentInvestigationCountsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :count_security_agent_investigations, :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: BitsSecurityAnalystAPI#count_security_agent_investigations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_agent_investigation(investigation_id, opts = {}) ⇒ Object
Get a Bits Security Analyst investigation.
203 204 205 206 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 203 def get_security_agent_investigation(investigation_id, opts = {}) data, _status_code, _headers = get_security_agent_investigation_with_http_info(investigation_id, opts) data end |
#get_security_agent_investigation_with_http_info(investigation_id, opts = {}) ⇒ Array<(SecurityAgentInvestigationResponse, Integer, Hash)>
Get a Bits Security Analyst investigation.
Get a Bits Security Analyst investigation by its ID, with its verdict, conclusion, evidence, steps, and
response suggestions. While the investigation is running, the response has a Retry-After header.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 217 def get_security_agent_investigation_with_http_info(investigation_id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_security_agent_investigation".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_security_agent_investigation") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_security_agent_investigation")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.get_security_agent_investigation ...' end # verify the required parameter 'investigation_id' is set if @api_client.config.client_side_validation && investigation_id.nil? fail ArgumentError, "Missing the required parameter 'investigation_id' when calling BitsSecurityAnalystAPI.get_security_agent_investigation" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/investigations/{investigation_id}'.sub('{investigation_id}', CGI.escape(investigation_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[investigations]'] = @api_client.build_collection_param(opts[:'fields_investigations'], :csv) if !opts[:'fields_investigations'].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] || 'SecurityAgentInvestigationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_security_agent_investigation, :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: BitsSecurityAnalystAPI#get_security_agent_investigation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_agent_outreach_policy(opts = {}) ⇒ Object
Get the user outreach policy.
277 278 279 280 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 277 def get_security_agent_outreach_policy(opts = {}) data, _status_code, _headers = get_security_agent_outreach_policy_with_http_info(opts) data end |
#get_security_agent_outreach_policy_with_http_info(opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Get the user outreach policy.
Get the organization's user outreach policy for Bits Security Analyst: the outreach mode, the per-rule automation state, the allowed email domains that user outreach can be sent to, and, for the caller, domains that could be allowed next.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 290 def get_security_agent_outreach_policy_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_security_agent_outreach_policy".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_security_agent_outreach_policy") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_security_agent_outreach_policy")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.get_security_agent_outreach_policy ...' end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/outreach_policy' # 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] || 'SecurityAgentOutreachPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_security_agent_outreach_policy, :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: BitsSecurityAnalystAPI#get_security_agent_outreach_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_security_agent_investigations(opts = {}) ⇒ Object
List Bits Security Analyst investigations.
345 346 347 348 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 345 def list_security_agent_investigations(opts = {}) data, _status_code, _headers = list_security_agent_investigations_with_http_info(opts) data end |
#list_security_agent_investigations_with_http_info(opts = {}) ⇒ Array<(SecurityAgentInvestigationsListResponse, Integer, Hash)>
List Bits Security Analyst investigations.
List Bits Security Analyst investigations.
Without filter[signal_id], returns the latest investigation of each signal, filtered, sorted, and paginated.
With filter[signal_id], returns every investigation of that signal, newest first. When the signal has no
investigation, the first page carries meta.reason, which says why.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 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 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 375 def list_security_agent_investigations_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_security_agent_investigations".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_security_agent_investigations") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_security_agent_investigations")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.list_security_agent_investigations ...' end if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling BitsSecurityAnalystAPI.list_security_agent_investigations, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BitsSecurityAnalystAPI.list_security_agent_investigations, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BitsSecurityAnalystAPI.list_security_agent_investigations, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/investigations' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[signal_id]'] = opts[:'filter_signal_id'] if !opts[:'filter_signal_id'].nil? query_params[:'filter[title]'] = opts[:'filter_title'] if !opts[:'filter_title'].nil? query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? query_params[:'filter[verdict]'] = opts[:'filter_verdict'] if !opts[:'filter_verdict'].nil? query_params[:'filter[state]'] = opts[:'filter_state'] if !opts[:'filter_state'].nil? query_params[:'filter[rule_id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil? query_params[:'filter[rule_type]'] = opts[:'filter_rule_type'] if !opts[:'filter_rule_type'].nil? query_params[:'filter[signal_severity]'] = opts[:'filter_signal_severity'] if !opts[:'filter_signal_severity'].nil? query_params[:'filter[signal_source]'] = opts[:'filter_signal_source'] if !opts[:'filter_signal_source'].nil? query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil? query_params[:'filter[entity]'] = opts[:'filter_entity'] if !opts[:'filter_entity'].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] || 'SecurityAgentInvestigationsListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_security_agent_investigations, :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: BitsSecurityAnalystAPI#list_security_agent_investigations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_security_agent_outreach_policy_domain(domain, opts = {}) ⇒ Object
Remove an allowed outreach domain.
454 455 456 457 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 454 def remove_security_agent_outreach_policy_domain(domain, opts = {}) data, _status_code, _headers = remove_security_agent_outreach_policy_domain_with_http_info(domain, opts) data end |
#remove_security_agent_outreach_policy_domain_with_http_info(domain, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Remove an allowed outreach domain.
Remove one allowed email domain, by its name.
466 467 468 469 470 471 472 473 474 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 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 466 def remove_security_agent_outreach_policy_domain_with_http_info(domain, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.remove_security_agent_outreach_policy_domain".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_security_agent_outreach_policy_domain") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_security_agent_outreach_policy_domain")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.remove_security_agent_outreach_policy_domain ...' end # verify the required parameter 'domain' is set if @api_client.config.client_side_validation && domain.nil? fail ArgumentError, "Missing the required parameter 'domain' when calling BitsSecurityAnalystAPI.remove_security_agent_outreach_policy_domain" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain}'.sub('{domain}', CGI.escape(domain.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] || 'SecurityAgentOutreachPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :remove_security_agent_outreach_policy_domain, :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::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BitsSecurityAnalystAPI#remove_security_agent_outreach_policy_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_security_agent_outreach_mode(body, opts = {}) ⇒ Object
Update the outreach mode.
525 526 527 528 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 525 def update_security_agent_outreach_mode(body, opts = {}) data, _status_code, _headers = update_security_agent_outreach_mode_with_http_info(body, opts) data end |
#update_security_agent_outreach_mode_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachModeResponse, Integer, Hash)>
Update the outreach mode.
Set the organization's outreach mode: off (no user outreach), manual (outreach is only sent when an
analyst triggers it), or automated (rules with outreach enabled auto-send automated interviews to users
whose email domain is allowed).
539 540 541 542 543 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 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 539 def update_security_agent_outreach_mode_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_security_agent_outreach_mode".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_security_agent_outreach_mode") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_security_agent_outreach_mode")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.update_security_agent_outreach_mode ...' 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 BitsSecurityAnalystAPI.update_security_agent_outreach_mode" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/outreach_policy' # 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] || 'SecurityAgentOutreachModeResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_security_agent_outreach_mode, :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: BitsSecurityAnalystAPI#update_security_agent_outreach_mode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_security_agent_outreach_policy_rules(body, opts = {}) ⇒ Object
Update outreach policy rules.
600 601 602 603 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 600 def update_security_agent_outreach_policy_rules(body, opts = {}) data, _status_code, _headers = update_security_agent_outreach_policy_rules_with_http_info(body, opts) data end |
#update_security_agent_outreach_policy_rules_with_http_info(body, opts = {}) ⇒ Array<(SecurityAgentOutreachPolicyResponse, Integer, Hash)>
Update outreach policy rules.
Upsert the outreach automation state of detection rules. Each rule in the request gets the given state;
rules not in the request keep their state. A rule with is_enabled: true auto-sends automated interviews
in automated mode.
614 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 |
# File 'lib/datadog_api_client/v2/api/bits_security_analyst_api.rb', line 614 def update_security_agent_outreach_policy_rules_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_security_agent_outreach_policy_rules".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_security_agent_outreach_policy_rules") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_security_agent_outreach_policy_rules")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BitsSecurityAnalystAPI.update_security_agent_outreach_policy_rules ...' 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 BitsSecurityAnalystAPI.update_security_agent_outreach_policy_rules" end # resource path local_var_path = '/api/v2/security_monitoring/security_agent/outreach_policy/rules' # 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] || 'SecurityAgentOutreachPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_security_agent_outreach_policy_rules, :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: BitsSecurityAnalystAPI#update_security_agent_outreach_policy_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |